Skip to content

Commit ef76294

Browse files
committed
feat(ui-truncate-text): rework TruncateText and sort the upgrade guide alphabetically
1 parent 15020c2 commit ef76294

2 files changed

Lines changed: 114 additions & 95 deletions

File tree

docs/guides/upgrade-guide.md

Lines changed: 109 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -56,42 +56,6 @@ type: example
5656
</InstUISettingsProvider>
5757
```
5858

59-
### Heading
60-
61-
`color` prop has 2 new values: `primary-on` and `secondary-on`, these are used for colored surfaces.
62-
63-
The default value of the `color` prop has changed from `'inherit'` to `'primary'`. If you need to preserve the previous behavior, explicitly set `color="inherit"`.
64-
65-
```js
66-
---
67-
type: embed
68-
---
69-
<V12ChangelogTable
70-
removed={[
71-
{name:"weightImportant",note:""},
72-
{name:"lineHeight125",note:""},
73-
{name:"lineHeight150",note:""}
74-
]}
75-
changed={[
76-
{oldName:"primaryColor",newName:"baseColor",note:""},
77-
{oldName:"secondaryColor",newName:"mutedColor",note:""},
78-
{oldName:"primaryInverseColor",newName:"inverseColor",note:""},
79-
{oldName:"secondaryInverseColor",newName:"inverseColor",note:""},
80-
{oldName:"titlePageDesktop",newName:"titlePageDesktop",note:"now returns a full typography object instead of just a font size"},
81-
{oldName:"titlePageMobile",newName:"titlePageMobile",note:"now returns a full typography object instead of just a font size"},
82-
{oldName:"titleSection",newName:"titleSection",note:"now returns a full typography object instead of just a font size"},
83-
{oldName:"titleCardSection",newName:"titleCardSection",note:"now returns a full typography object instead of just a font size"},
84-
{oldName:"titleModule",newName:"titleModule",note:"now returns a full typography object instead of just a font size"},
85-
{oldName:"titleCardLarge",newName:"titleCardLarge",note:"now returns a full typography object instead of just a font size"},
86-
{oldName:"titleCardRegular",newName:"titleCardRegular",note:"now returns a full typography object instead of just a font size"},
87-
{oldName:"titleCardMini",newName:"titleCardMini",note:"now returns a full typography object instead of just a font size"},
88-
{oldName:"label",newName:"label",note:"now returns a full typography object instead of just a font size"},
89-
{oldName:"labelInline",newName:"labelInline",note:"now returns a full typography object instead of just a font size"}
90-
]}
91-
/>
92-
93-
```
94-
9559
### Alert
9660

9761
```js
@@ -410,7 +374,7 @@ type: embed
410374

411375
```
412376

413-
### Grid.Row
377+
### Grid.Col
414378

415379
```js
416380
---
@@ -426,7 +390,7 @@ type: embed
426390

427391
```
428392

429-
### Grid.Col
393+
### Grid.Row
430394

431395
```js
432396
---
@@ -442,6 +406,42 @@ type: embed
442406

443407
```
444408

409+
### Heading
410+
411+
`color` prop has 2 new values: `primary-on` and `secondary-on`, these are used for colored surfaces.
412+
413+
The default value of the `color` prop has changed from `'inherit'` to `'primary'`. If you need to preserve the previous behavior, explicitly set `color="inherit"`.
414+
415+
```js
416+
---
417+
type: embed
418+
---
419+
<V12ChangelogTable
420+
removed={[
421+
{name:"weightImportant",note:""},
422+
{name:"lineHeight125",note:""},
423+
{name:"lineHeight150",note:""}
424+
]}
425+
changed={[
426+
{oldName:"primaryColor",newName:"baseColor",note:""},
427+
{oldName:"secondaryColor",newName:"mutedColor",note:""},
428+
{oldName:"primaryInverseColor",newName:"inverseColor",note:""},
429+
{oldName:"secondaryInverseColor",newName:"inverseColor",note:""},
430+
{oldName:"titlePageDesktop",newName:"titlePageDesktop",note:"now returns a full typography object instead of just a font size"},
431+
{oldName:"titlePageMobile",newName:"titlePageMobile",note:"now returns a full typography object instead of just a font size"},
432+
{oldName:"titleSection",newName:"titleSection",note:"now returns a full typography object instead of just a font size"},
433+
{oldName:"titleCardSection",newName:"titleCardSection",note:"now returns a full typography object instead of just a font size"},
434+
{oldName:"titleModule",newName:"titleModule",note:"now returns a full typography object instead of just a font size"},
435+
{oldName:"titleCardLarge",newName:"titleCardLarge",note:"now returns a full typography object instead of just a font size"},
436+
{oldName:"titleCardRegular",newName:"titleCardRegular",note:"now returns a full typography object instead of just a font size"},
437+
{oldName:"titleCardMini",newName:"titleCardMini",note:"now returns a full typography object instead of just a font size"},
438+
{oldName:"label",newName:"label",note:"now returns a full typography object instead of just a font size"},
439+
{oldName:"labelInline",newName:"labelInline",note:"now returns a full typography object instead of just a font size"}
440+
]}
441+
/>
442+
443+
```
444+
445445
### Link
446446

447447
- `isWithinText` prop has been removed.
@@ -804,6 +804,27 @@ type: embed
804804

805805
```
806806

807+
### RangeInput
808+
809+
```js
810+
---
811+
type: embed
812+
---
813+
<V12ChangelogTable
814+
removed={[
815+
{name:"handleFocusRingSize",note:"style uses sharedTokens.focusOutline.width token"},
816+
{name:"handleFocusRingColor",note:"style uses sharedTokens.focusOutline.onColor token"}
817+
]}
818+
changed={[
819+
{oldName:"handleShadow",newName:"boxShadow",note:""},
820+
{oldName:"valueSmallPadding",newName:"valueSmallPadding",note:"now only sets horizontal padding of the value"},
821+
{oldName:"valueMediumPadding",newName:"valueMediumPadding",note:"now only sets horizontal padding of the value"},
822+
{oldName:"valueLargePadding",newName:"valueLargePadding",note:"now only sets horizontal padding of the value"}
823+
]}
824+
/>
825+
826+
```
827+
807828
### SideNavBar
808829

809830
```js
@@ -859,6 +880,20 @@ type: embed
859880

860881
```
861882

883+
### SourceCodeEditor
884+
885+
```js
886+
---
887+
type: embed
888+
---
889+
<V12ChangelogTable
890+
removed={[
891+
{name:"focusBorderColor",note:"now uses sharedTokens.focusOutline.infoColor"}
892+
]}
893+
/>
894+
895+
```
896+
862897
### Spinner
863898

864899
- `as` prop has been removed, `Spinner` will always render as a `<div>` element.
@@ -981,39 +1016,6 @@ type: embed
9811016

9821017
```
9831018

984-
### Text
985-
986-
- `alert` color has been removed. Please use `primary` instead.
987-
- Some prop values have been deprecated, see [Text](/Text) for more details.
988-
- `color` has 2 new values: `primary-on` and `secondary-on`, these are used for colored surfaces.
989-
990-
### TreeBrowser
991-
992-
#### Icon system migration
993-
994-
TreeBrowser now uses Lucide icons instead of the legacy icon system:
995-
996-
- Default `collectionIcon` changed from `IconFolderLine` to `FolderClosedInstUIIcon`
997-
- Default `collectionIconExpanded` changed from `IconFolderLine` to `FolderClosedInstUIIcon`
998-
- Default `itemIcon` changed from `IconDocumentLine` to `FileTextInstUIIcon`
999-
1000-
#### Theme variable changes
1001-
1002-
**TreeBrowser:**
1003-
1004-
- theme variable `focusOutlineWidth` is now removed (handled by `sharedTokens`)
1005-
- theme variable `focusOutlineStyle` is now removed (handled by `sharedTokens`)
1006-
- theme variable `focusOutlineColor` is now removed (handled by `sharedTokens`)
1007-
1008-
**TreeButton:**
1009-
1010-
- theme variable `focusOutlineWidth` is now removed (handled by `sharedTokens`)
1011-
- theme variable `focusOutlineStyle` is now removed (handled by `sharedTokens`)
1012-
- theme variable `focusOutlineColor` is now removed (handled by `sharedTokens`)
1013-
- theme variable `selectedOutlineWidth` is now removed (handled by `sharedTokens`)
1014-
- theme variable `iconColor` is now removed
1015-
- theme variable `iconsMarginRight` is now removed
1016-
10171019
### Tag
10181020

10191021
```js
@@ -1036,6 +1038,12 @@ type: embed
10361038

10371039
```
10381040

1041+
### Text
1042+
1043+
- `alert` color has been removed. Please use `primary` instead.
1044+
- Some prop values have been deprecated, see [Text](/Text) for more details.
1045+
- `color` has 2 new values: `primary-on` and `secondary-on`, these are used for colored surfaces.
1046+
10391047
### TextArea
10401048

10411049
`error` or `success` messages are no longer displayed when the component is `readOnly` or `disabled`.
@@ -1117,59 +1125,68 @@ type: embed
11171125

11181126
```
11191127

1120-
### RangeInput
1128+
### Tray
11211129

11221130
```js
11231131
---
11241132
type: embed
11251133
---
11261134
<V12ChangelogTable
11271135
removed={[
1128-
{name:"handleFocusRingSize",note:"style uses sharedTokens.focusOutline.width token"},
1129-
{name:"handleFocusRingColor",note:"style uses sharedTokens.focusOutline.onColor token"}
1136+
{name:"borderStyle",note:""},
1137+
{name:"position",note:""}
11301138
]}
11311139
changed={[
1132-
{oldName:"handleShadow",newName:"boxShadow",note:""},
1133-
{oldName:"valueSmallPadding",newName:"valueSmallPadding",note:"now only sets horizontal padding of the value"},
1134-
{oldName:"valueMediumPadding",newName:"valueMediumPadding",note:"now only sets horizontal padding of the value"},
1135-
{oldName:"valueLargePadding",newName:"valueLargePadding",note:"now only sets horizontal padding of the value"}
1140+
{oldName:"background",newName:"backgroundColor",note:""},
1141+
{oldName:"xSmallWidth",newName:"widthXs",note:""},
1142+
{oldName:"smallWidth",newName:"widthSm",note:""},
1143+
{oldName:"regularWidth",newName:"widthMg",note:""},
1144+
{oldName:"mediumWidth",newName:"widthLg",note:""},
1145+
{oldName:"largeWidth",newName:"widthXl",note:""}
11361146
]}
11371147
/>
11381148

11391149
```
11401150

1141-
### SourceCodeEditor
1151+
### TreeBrowser
1152+
1153+
#### Icon system migration
1154+
1155+
TreeBrowser now uses Lucide icons instead of the legacy icon system:
1156+
1157+
- Default `collectionIcon` changed from `IconFolderLine` to `FolderClosedInstUIIcon`
1158+
- Default `collectionIconExpanded` changed from `IconFolderLine` to `FolderClosedInstUIIcon`
1159+
- Default `itemIcon` changed from `IconDocumentLine` to `FileTextInstUIIcon`
1160+
1161+
#### Theme variable changes
11421162

11431163
```js
11441164
---
11451165
type: embed
11461166
---
11471167
<V12ChangelogTable
11481168
removed={[
1149-
{name:"focusBorderColor",note:"now uses sharedTokens.focusOutline.infoColor"}
1169+
{name:"focusOutlineWidth",note:"handled by sharedTokens"},
1170+
{name:"focusOutlineStyle",note:"handled by sharedTokens"},
1171+
{name:"focusOutlineColor",note:"handled by sharedTokens"}
11501172
]}
11511173
/>
1152-
11531174
```
11541175

1155-
### Tray
1176+
**TreeButton:**
11561177

11571178
```js
11581179
---
11591180
type: embed
11601181
---
11611182
<V12ChangelogTable
11621183
removed={[
1163-
{name:"borderStyle",note:""},
1164-
{name:"position",note:""}
1165-
]}
1166-
changed={[
1167-
{oldName:"background",newName:"backgroundColor",note:""},
1168-
{oldName:"xSmallWidth",newName:"widthXs",note:""},
1169-
{oldName:"smallWidth",newName:"widthSm",note:""},
1170-
{oldName:"regularWidth",newName:"widthMg",note:""},
1171-
{oldName:"mediumWidth",newName:"widthLg",note:""},
1172-
{oldName:"largeWidth",newName:"widthXl",note:""}
1184+
{name:"focusOutlineWidth",note:"handled by sharedTokens"},
1185+
{name:"focusOutlineStyle",note:"handled by sharedTokens"},
1186+
{name:"focusOutlineColor",note:"handled by sharedTokens"},
1187+
{name:"selectedOutlineWidth",note:"handled by sharedTokens"},
1188+
{name:"iconColor",note:""},
1189+
{name:"iconsMarginRight",note:""}
11731190
]}
11741191
/>
11751192

packages/ui-truncate-text/src/TruncateText/v2/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,11 @@ type: example
141141
maxWidth="480px"
142142
withVisualDebug
143143
>
144-
<TruncateText position="middle">
145-
<span>This line of text should be truncated from the middle of the string <strong>instead of the end.</strong></span>
146-
</TruncateText>
144+
<Text as="p">
145+
<TruncateText position="middle">
146+
<span>This line of text should be truncated from the middle of the string <strong>instead of the end.</strong></span>
147+
</TruncateText>
148+
</Text>
147149
</View>
148150
<br />
149151
<View

0 commit comments

Comments
 (0)