Skip to content

Commit add5121

Browse files
committed
docs: add version alerts and fix for child components theme section
1 parent d615fad commit add5121

5 files changed

Lines changed: 115 additions & 85 deletions

File tree

docs/guides/forms.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ const PasswordExample = () => {
7171
render(<PasswordExample/>)
7272
```
7373

74+
```js
75+
---
76+
type: embed
77+
---
78+
<Alert variant="warning" margin="0 0 medium">
79+
The following section describes behavior introduced in <strong>v11.7</strong>: the updated <code>error</code> type and the required asterisk feature. If you are viewing the v11.6 version, <Link href={window.location.pathname.match(/v\d+_\d+/) ? window.location.pathname.replace(/v\d+_\d+/, 'v11_7') : `/v11_7${window.location.pathname}`}>switch to v11.7</Link> to see these features working correctly.
80+
</Alert>
81+
```
82+
7483
The `error` type has been updated to meet accessibility requirements with proper icons and visual styling. Previously, there was a `newError` type that provided this enhanced behavior, but it has been consolidated into the standard `error` type for consistency. `newError` has been deprecated.
7584

7685
We also introduced the "required asterisk" which displays an `*` character next to field labels that are required. This update applies to **all** InstUI form components, so if you were relying on a custom solution for this feature before, you need to remove that to avoid having double asterisks.

docs/theming/legacy-theme-overrides.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ relevantForAI: true
77

88
## Using theme overrides
99

10+
```js
11+
---
12+
type: embed
13+
---
14+
<Alert variant="warning" margin="0 0 medium">
15+
The examples on this page use the <strong>legacy theming system</strong> and are designed for <strong>v11.6</strong> components. If you are viewing the v11.7 version, <Link href={window.location.pathname.match(/v\d+_\d+/) ? window.location.pathname.replace(/v\d+_\d+/, 'v11_6') : `/v11_6${window.location.pathname}`}>switch to v11.6</Link> to see the examples working correctly.
16+
</Alert>
17+
```
18+
1019
This document gives an overview on how you can customize Instructure UI components by tweaking their theme variables.
1120
While this gives you a level of flexibility on the look and feel of the components you should be aware of 2 things:
1221

docs/theming/new-theme-overrides.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
---
2-
title: New Theme Overrides
2+
title: New theme overrides
33
category: Theming
44
order: 6
55
relevantForAI: true
66
---
77

88
## New Theme Override Patterns
99

10+
```js
11+
---
12+
type: embed
13+
---
14+
<Alert variant="warning" margin="0 0 medium">
15+
The examples on this page use the <strong>new theming system</strong> and require <strong>v11.7+</strong> components. If you are viewing the v11.6 version, <Link href={window.location.pathname.match(/v\d+_\d+/) ? window.location.pathname.replace(/v\d+_\d+/, 'v11_7') : `/v11_7${window.location.pathname}`}>switch to v11.7</Link> to see the examples working correctly.
16+
</Alert>
17+
```
18+
1019
This guide covers all the override patterns available in the new theming system (v11.7+). The new system uses a layered token architecture: **primitives** (raw values) -> **semantics** (meaning) -> **components** (per-component tokens).
1120

1221
Overrides are applied via the `themeOverride` prop on `InstUISettingsProvider`, which is separate from the `theme` prop. The `theme` prop replaces the active theme entirely; `themeOverride` layers modifications on top.

docs/upgrading/upgrade-guide.md

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Upgrade Guide for multi version (beta)
2+
title: Upgrade Guide for multi version
33
category: Upgrading
44
order: 9999999
55
---
@@ -72,23 +72,6 @@ type: embed
7272

7373
```
7474

75-
### Billboard
76-
77-
```js
78-
---
79-
type: embed
80-
---
81-
<V12ChangelogTable
82-
removed={[
83-
{name:"iconHoverColorInverse",note:""},
84-
{name:"iconHoverColor",note:""},
85-
{name:"iconColor",note:""},
86-
{name:"messageColorInverse",note:""}
87-
]}
88-
/>
89-
90-
```
91-
9275
### BaseButton
9376

9477
All button components (Button, IconButton, CondensedButton) share BaseButton's theme tokens.
@@ -229,20 +212,18 @@ type: embed
229212

230213
```
231214

232-
### CloseButton
233-
234-
CloseButton no longer has its own dedicated theme tokens in v2. Offset spacing now uses `sharedTokens.spacing`, and visual styling comes from BaseButton tokens.
215+
### Billboard
235216

236217
```js
237218
---
238219
type: embed
239220
---
240221
<V12ChangelogTable
241222
removed={[
242-
{name:"offsetMedium",note:"now uses sharedTokens.spacing"},
243-
{name:"offsetSmall",note:"now uses sharedTokens.spacing"},
244-
{name:"offsetXSmall",note:"now uses sharedTokens.spacing"},
245-
{name:"zIndex",note:"hardcoded to 1"}
223+
{name:"iconHoverColorInverse",note:""},
224+
{name:"iconHoverColor",note:""},
225+
{name:"iconColor",note:""},
226+
{name:"messageColorInverse",note:""}
246227
]}
247228
/>
248229

@@ -392,6 +373,62 @@ type: embed
392373

393374
```
394375

376+
### CloseButton
377+
378+
CloseButton no longer has its own dedicated theme tokens in v2. Offset spacing now uses `sharedTokens.spacing`, and visual styling comes from BaseButton tokens.
379+
380+
```js
381+
---
382+
type: embed
383+
---
384+
<V12ChangelogTable
385+
removed={[
386+
{name:"offsetMedium",note:"now uses sharedTokens.spacing"},
387+
{name:"offsetSmall",note:"now uses sharedTokens.spacing"},
388+
{name:"offsetXSmall",note:"now uses sharedTokens.spacing"},
389+
{name:"zIndex",note:"hardcoded to 1"}
390+
]}
391+
/>
392+
393+
```
394+
395+
### ColorPicker
396+
397+
```js
398+
---
399+
type: embed
400+
---
401+
<V12ChangelogTable
402+
removed={[
403+
{name:"warningIconColor",note:""},
404+
{name:"errorIconColor",note:""},
405+
{name:"successIconColor",note:""},
406+
{name:"spacing",note:"now uses sharedTokens.spacing"}
407+
]}
408+
/>
409+
410+
```
411+
412+
### DataPermissionLevels
413+
414+
```js
415+
---
416+
type: embed
417+
---
418+
<V12ChangelogTable
419+
added={[
420+
{name:"contentContainerBorderRadius",note:""},
421+
{name:"contentContainerColor",note:""}
422+
]}
423+
removed={[
424+
{name:"cardPadding",note:""},
425+
{name:"cardExplainerContainerBottomMargin",note:""},
426+
{name:"cardGap",note:""}
427+
]}
428+
/>
429+
430+
```
431+
395432
### DateInput / DateInput2
396433

397434
**Short version:** Use [`DateInput`](/v11_7/DateInput). Forget `DateInput2` exists.
@@ -452,26 +489,6 @@ type: code
452489
/>
453490
```
454491

455-
### DataPermissionLevels
456-
457-
```js
458-
---
459-
type: embed
460-
---
461-
<V12ChangelogTable
462-
added={[
463-
{name:"contentContainerBorderRadius",note:""},
464-
{name:"contentContainerColor",note:""}
465-
]}
466-
removed={[
467-
{name:"cardPadding",note:""},
468-
{name:"cardExplainerContainerBottomMargin",note:""},
469-
{name:"cardGap",note:""}
470-
]}
471-
/>
472-
473-
```
474-
475492
#### DateTimeInput v1 → v2 API changes
476493

477494
**Removed props:**
@@ -504,23 +521,6 @@ type: embed
504521
/>
505522
```
506523

507-
### ColorPicker
508-
509-
```js
510-
---
511-
type: embed
512-
---
513-
<V12ChangelogTable
514-
removed={[
515-
{name:"warningIconColor",note:""},
516-
{name:"errorIconColor",note:""},
517-
{name:"successIconColor",note:""},
518-
{name:"spacing",note:"now uses sharedTokens.spacing"}
519-
]}
520-
/>
521-
522-
```
523-
524524
### Drilldown
525525

526526
Drilldown itself has no token changes. However, its sub-components share tokens with Options components, so the token changes listed under Options apply here as well:
@@ -1164,40 +1164,40 @@ type: embed
11641164

11651165
```
11661166

1167-
### Rating
1167+
### RangeInput
1168+
1169+
- `thumbVariant` prop has been removed. The component now always renders the previously-`accessible` thumb (better color contrast, border, and inset focus ring).
11681170

11691171
```js
11701172
---
11711173
type: embed
11721174
---
11731175
<V12ChangelogTable
11741176
removed={[
1175-
{name:"smallIconFontSize",note:""},
1176-
{name:"mediumIconFontSize",note:""},
1177-
{name:"largeIconFontSize",note:""}
1177+
{name:"handleFocusRingSize",note:"style uses sharedTokens.focusOutline.width token"},
1178+
{name:"handleFocusRingColor",note:"style uses sharedTokens.focusOutline.onColor token"}
1179+
]}
1180+
changed={[
1181+
{oldName:"handleShadow",newName:"boxShadow",note:""},
1182+
{oldName:"valueSmallPadding",newName:"valueSmallPadding",note:"now only sets horizontal padding of the value"},
1183+
{oldName:"valueMediumPadding",newName:"valueMediumPadding",note:"now only sets horizontal padding of the value"},
1184+
{oldName:"valueLargePadding",newName:"valueLargePadding",note:"now only sets horizontal padding of the value"}
11781185
]}
11791186
/>
11801187

11811188
```
11821189

1183-
### RangeInput
1184-
1185-
- `thumbVariant` prop has been removed. The component now always renders the previously-`accessible` thumb (better color contrast, border, and inset focus ring).
1190+
### Rating
11861191

11871192
```js
11881193
---
11891194
type: embed
11901195
---
11911196
<V12ChangelogTable
11921197
removed={[
1193-
{name:"handleFocusRingSize",note:"style uses sharedTokens.focusOutline.width token"},
1194-
{name:"handleFocusRingColor",note:"style uses sharedTokens.focusOutline.onColor token"}
1195-
]}
1196-
changed={[
1197-
{oldName:"handleShadow",newName:"boxShadow",note:""},
1198-
{oldName:"valueSmallPadding",newName:"valueSmallPadding",note:"now only sets horizontal padding of the value"},
1199-
{oldName:"valueMediumPadding",newName:"valueMediumPadding",note:"now only sets horizontal padding of the value"},
1200-
{oldName:"valueLargePadding",newName:"valueLargePadding",note:"now only sets horizontal padding of the value"}
1198+
{name:"smallIconFontSize",note:""},
1199+
{name:"mediumIconFontSize",note:""},
1200+
{name:"largeIconFontSize",note:""}
12011201
]}
12021202
/>
12031203

@@ -1504,6 +1504,12 @@ type: embed
15041504

15051505
```
15061506

1507+
### TopNavBar
1508+
1509+
#### TopNavBar.Brand
1510+
1511+
The deprecated `renderName` and `nameBackground` props have been removed. Please remove them from your code.
1512+
15071513
### Tray
15081514

15091515
```js
@@ -1527,12 +1533,6 @@ type: embed
15271533

15281534
```
15291535

1530-
### TopNavBar
1531-
1532-
#### TopNavBar.Brand
1533-
1534-
The deprecated `renderName` and `nameBackground` props have been removed. Please remove them from your code.
1535-
15361536
### TreeBrowser
15371537

15381538
#### Icon system migration

packages/__docs__/src/Document/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,10 @@ import { ${importName} } from '${esPath}'
378378
{this.renderProps(doc)}
379379
{this.renderTheme(doc)}
380380
</div>
381-
) : null
381+
) : (
382+
// Props-free components (e.g. Menu.Separator) still need their theme section rendered
383+
this.renderTheme(doc)
384+
)
382385
}
383386

384387
hasDetails(doc: DocDataType) {

0 commit comments

Comments
 (0)