Repository navigation
feat(ui): implement textContain prop on DTand DD - #2125
Merged
Merged
Conversation
…nition Signed-off-by: Franz Heidl <franz.heidl@sap.com>
… DT/DD branch Signed-off-by: Franz Heidl <franz.heidl@sap.com>
🦋 Changeset detectedLatest commit: 17b39aa The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Signed-off-by: Franz Heidl <franz.heidl@sap.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Long unbroken text still overflows in break-word mode, and start truncation overrides right-aligned terms.
2 open issues
What changed in this PR
Extends the shared textContain API to DT and DD, bringing description lists in line with DataGridCell and addressing #2122.
Changes:
- Adds wrapping and truncation modes, including inner truncation wrappers and bidirectional text isolation.
- Adds component tests and a Storybook example covering all modes.
- Adds release metadata and Intent review-state records.
| File | Description |
|---|---|
packages/ui-components/src/components/DescriptionTerm/DescriptionTerm.test.tsx |
Tests term containment classes and wrappers. |
packages/ui-components/src/components/DescriptionTerm/DescriptionTerm.component.tsx |
Adds textContain support to terms. |
packages/ui-components/src/components/DescriptionList/DescriptionList.stories.tsx |
Demonstrates each containment mode. |
packages/ui-components/src/components/DescriptionDefinition/DescriptionDefinition.test.tsx |
Tests definition containment classes and wrappers. |
packages/ui-components/src/components/DescriptionDefinition/DescriptionDefinition.component.tsx |
Adds textContain support to definitions. |
.intent/review-state.json |
Records source-review outcomes. |
.changeset/olive-showers-admire.md |
Records a UI-components patch release. |
Review effort: Balanced
…nd DD Signed-off-by: Franz Heidl <franz.heidl@sap.com>
Signed-off-by: Franz Heidl <franz.heidl@sap.com>
edda
reviewed
Oct 27, 2026
Signed-off-by: Franz Heidl <franz.heidl@sap.com>
edda
approved these changes
Oct 28, 2026
guoda-puidokaite
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Implements the
textContainprop onDescriptionTerm(DT) andDescriptionDefinition(DD), following the same pattern established forDataGridCellin #1955.Both components now accept
textContain?: TextContainTypefrom the sharedsrc/shared/textContainutility:"truncate-end"/"truncate-start": single-line truncation with ellipsis, rendered on an inner<span>block wrapper (required because<dt>/<dd>are grid containers andtext-overflowdoes not apply to grid containers directly);truncate-startwraps content in<bdi>to prevent bidi reordering"break-word"/"break-all"/"no-wrap": applied directly to the elementjn:min-w-0added for all non-no-wrapvalues so the grid item can shrink within its trackCloses #2122.
Changes
DescriptionTerm.component.tsx,DescriptionDefinition.component.tsx: addtextContainprop + conditional truncation wrapperDescriptionTerm.test.tsx,DescriptionDefinition.test.tsx: add 8 new tests each covering all values, inner wrapper,<bdi>isolation, andmin-w-0behaviourDescriptionList.stories.tsx: newTextContainstory showing all 6 modes on bothDTandDDFollow-up fixes based on review feedback from Copilot:
break-wordnow correctly wraps long unbroken text in bothDTandDDtruncate-startno longer overridesalignTermson right-aligned termsTesting Instructions
pnpm icd packages/ui-components && pnpm run test DescriptionTerm & pnpm run test DescriptionDefinitionChecklist
PR Manifesto
Review the PR Manifesto for best practises.