Rework documentation#2550
Conversation
5d2192b to
add5121
Compare
Visual regression report✅ No changes.
Baselines come from the |
|
408073b to
a8a412c
Compare
a8a412c to
d128181
Compare
hajnaldo
left a comment
There was a problem hiding this comment.
Shared Tokens:
Documentation: It would be nice to mention explicitly that devs should use these tokens when they are tasked to build custom solutions (bc if they do so, the theming will work on their custom-built stuff too).
Token list:
- Elevation-related tokens:
Would it be possible to reflect what values belong to certain elevation styles, such as ordering them into groups according to how it is shown in the json:
"elevation1": { "value": [ { "x": "{semantic.dropShadow.x.elevation1.dropshadow1}", "y": "{semantic.dropShadow.y.elevation1.dropshadow1}", "blur": "{semantic.dropShadow.blur.elevation1.dropshadow1}", "spread": "{semantic.dropShadow.spread.elevation1.dropshadow1}", "color": "{semantic.color.dropShadow.shadowColor1}", "type": "dropShadow" }, { "x": "{semantic.dropShadow.x.elevation1.dropshadow2}", "y": "{semantic.dropShadow.y.elevation1.dropshadow2}", "blur": "{semantic.dropShadow.blur.elevation1.dropshadow2}", "spread": "{semantic.dropShadow.spread.elevation1.dropshadow2}", "color": "{semantic.color.dropShadow.shadowColor2}", "type": "dropShadow" } ]
Theme Overrides:
Although it is technically possible to override primitives and it may even be useful, we don't want to encourage it upfront. Would it be possible not to proactively show this option in the docu?
d128181 to
a65c973
Compare
1959e8e to
59b7ab8
Compare
59b7ab8 to
ba6ede5
Compare
Thanks for the suggestions, I’ve updated the Shared Tokens page. |
There was a problem hiding this comment.
Please wrap this into an info Alert, it would look better.
| type MainDocsData = { | ||
| themes: Record<string, { resource: Theme }> | ||
| // resource is `any` to support both old BaseTheme and new token objects | ||
| themes: Record<string, { resource: any }> |
There was a problem hiding this comment.
maybe better typing here, combo of BaseTheme and type of new token objects?
matyasf
left a comment
There was a problem hiding this comment.
Looks good, just some smaller comments. Also:
- Please add an info box to the legacy themes, that they are used by InstUI v 11.6 components.
- Add an info box to all new themes, that states "This theme meets WCAG 2.1 AA rules for color contrast."
- something is off with the themes, they are not showing for new themes after I switch them
| category: Contributor Guides | ||
| category: Contributing/Versioning | ||
| order: 7 | ||
| isWIP: true |
There was a problem hiding this comment.
Why is this now non-visible?
There was a problem hiding this comment.
I looked it up again, and I should have deleted it instead of set isWIP. Deleted.
| @@ -0,0 +1,177 @@ | |||
| --- | |||
| title: Agentic coding | |||
There was a problem hiding this comment.
This should be called "Building and running InstUI"
|
|
||
| - To use a different theme or customize one read about [Using theme overrides](using-theme-overrides) | ||
| - To use a different theme or customize one read about [New Theme Overrides](new-theme-overrides) | ||
| - Make sure you read about [Accessibility](accessibility) with InstUI. |
There was a problem hiding this comment.
In this doc please rewrite the part: "There are 2 built-in themes:..." to something that explains that there are 6 themes, legacy ones for 11.6, others for >11.7.
| category: Guides | ||
| title: Upgrade Guide for multi version | ||
| category: Upgrading | ||
| order: 9999999 |
There was a problem hiding this comment.
The order can now be here 2
| > | ||
| <TextInput | ||
| renderLabel="Name" | ||
| placeholder="Note: Change example when the old theme is renamed!" |
There was a problem hiding this comment.
change this text to "Focus me!"
| </Alert> | ||
| ``` | ||
|
|
||
| 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). |
There was a problem hiding this comment.
in this file the "13. Targeted override for a parent component" might be broken, its all purple
Also in this file "15. Overrides on functional (useStyleNew) components" and "16. Function form themeOverride on functional components
" are unnecessary, you can delete it
There was a problem hiding this comment.
I investigated it, and Button v2 uses BaseButton as its componentId, so components.Button overrides are ignored. I updated the docs to reflect the actual behavior.
| Use these tokens when building custom solutions to ensure your | ||
| components respond correctly to theme changes, including dark mode and | ||
| high contrast. |
There was a problem hiding this comment.
Mention here, that one can access the theme and these tokens with the useComputedTheme hook from @instructure/emotion
| ) | ||
| } | ||
|
|
||
| renderSharedTokens() { |
There was a problem hiding this comment.
Can you extract this to its own component? This page is already huge




INSTUI-4997
Summary
Co-Authored-By: 🤖 Claude