Commit 166940b
committed
feat(ui5-li): add text wrapping support with expandable text
The standard list item now supports content wrapping through a new "wrapping"
property. When enabled, long text content (title and description) will wrap to
multiple lines instead of truncating with an ellipsis.
Key features:
- Responsive behavior based on screen size:
- On mobile (size S): Text truncates after 100 characters
- On tablets/desktop (size M/L): Text truncates after 300 characters
- "Show More/Less" functionality for very long content using ui5-expandable-text
- Works for both title and description fields
- CSS styling to ensure proper layout in different states
Implementation details:
- Added "wrapping" boolean property to ListItemStandard component
- Conditionally render content using ExpandableText component when wrapping is enabled
- Added _maxCharacters getter to determine truncation point based on media range
- Updated ListItemStandardTemplate to handle wrapped content rendering
- Added CSS styles to support proper wrapping behavior
- Updated HTML test page with examples
Documentation:
- Added new section in List.mdx explaining the wrapping behavior
- Created detailed sample in WrappingBehavior folder
- Added JSDoc descriptions for the new property
- Added note about deprecated usage of default slot in favor of text property
Tests:
- Added desktop test for 300 character limit
- Added mobile-specific test for 100 character limit
- Added test for toggling wrapping property
NOTE: This change also promotes the use of the "text" property (added in v2.9.0)
instead of the default slot content for setting list item text. The default slot
usage is now deprecated and will be removed in a future version.1 parent 967ef56 commit 166940b
File tree
13 files changed
+556
-52
lines changed- packages
- main
- cypress/specs
- src
- themes
- base
- test/pages
- website/docs
- _components_pages/main/List
- _samples/main/List/WrappingBehavior
13 files changed
+556
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
467 | 475 | | |
468 | 476 | | |
469 | 477 | | |
| |||
494 | 502 | | |
495 | 503 | | |
496 | 504 | | |
| 505 | + | |
497 | 506 | | |
498 | 507 | | |
499 | 508 | | |
| |||
530 | 539 | | |
531 | 540 | | |
532 | 541 | | |
533 | | - | |
| 542 | + | |
534 | 543 | | |
535 | 544 | | |
536 | 545 | | |
| |||
562 | 571 | | |
563 | 572 | | |
564 | 573 | | |
| 574 | + | |
565 | 575 | | |
566 | 576 | | |
567 | 577 | | |
568 | 578 | | |
569 | 579 | | |
570 | 580 | | |
571 | 581 | | |
| 582 | + | |
572 | 583 | | |
573 | 584 | | |
574 | 585 | | |
| |||
776 | 787 | | |
777 | 788 | | |
778 | 789 | | |
| 790 | + | |
| 791 | + | |
779 | 792 | | |
780 | 793 | | |
781 | 794 | | |
| |||
1065 | 1078 | | |
1066 | 1079 | | |
1067 | 1080 | | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
1068 | 1086 | | |
1069 | 1087 | | |
1070 | 1088 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
194 | 201 | | |
195 | 202 | | |
196 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | | - | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | | - | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 61 | + | |
71 | 62 | | |
72 | 63 | | |
73 | | - | |
| 64 | + | |
74 | 65 | | |
75 | 66 | | |
76 | 67 | | |
| |||
89 | 80 | | |
90 | 81 | | |
91 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
| |||
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
105 | 123 | | |
106 | | - | |
| 124 | + | |
107 | 125 | | |
108 | | - | |
109 | | - | |
| 126 | + | |
| 127 | + | |
110 | 128 | | |
111 | 129 | | |
112 | 130 | | |
| |||
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
122 | 150 | | |
123 | 151 | | |
124 | 152 | | |
| |||
143 | 171 | | |
144 | 172 | | |
145 | 173 | | |
146 | | - | |
| 174 | + | |
147 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
148 | 195 | | |
149 | 196 | | |
150 | 197 | | |
| |||
0 commit comments