-
Notifications
You must be signed in to change notification settings - Fork 279
Open
Labels
Description
Feature Request Description
The ExpandableText component’s expanded view uses a ResponsivePopover whose width cannot be constrained, which can lead to overly wide popovers on large screens and negatively affect readability. Additionally, the component does not offer a way to preserve whitespace and newline characters, causing multi-line content (such as descriptions, logs, etc.) to be rendered as a single flow of text.
Proposed Solution
Enhance ExpandableText with:
- Support for limiting the expanded
ResponsivePopoverwidth via a dedicated property (e.g.,popoverMaxWidthormaxWidth), accepting CSS size values (e.g.,480px,40rem). - A property to preserve whitespace and line breaks (e.g.,
preserveWhitespace: booleanorwhiteSpaceMode: "normal" | "pre-wrap"), applyingwhite-space: pre-wrapin the expanded view (and optionally in the collapsed view) so that spaces and newline characters are retained.
Thank you.
Proposed Alternatives
- Use other components (e.g.,
TextAreain read-only mode or a customResponsivePopover) to display multi-line content, but this forfeits the built-in truncation/expansion behavior ofExpandableText. - Attempt styling via global CSS is limited due to Shadow DOM encapsulation and does not reliably control the internal
TextandResponsivePopover.
Organization
SAP
Additional Context
Environment: UI5 Web Components 2.16.2
Typical use cases include displaying multi-line log entries, formatted descriptions where line breaks and spacing carry meaning. Controlling max width improves readability and prevents the popover from spanning too wide on large viewports.
Priority
Medium
Privacy Policy
- I’m not disclosing any internal or sensitive information.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
New