Skip to content

refactor(ui-view,ui-flex): add examples on how to override sharedTokens, fix docs console errors#2382

Merged
matyasf merged 1 commit intov12from
sharedToken_examples
Feb 3, 2026
Merged

refactor(ui-view,ui-flex): add examples on how to override sharedTokens, fix docs console errors#2382
matyasf merged 1 commit intov12from
sharedToken_examples

Conversation

@matyasf
Copy link
Collaborator

@matyasf matyasf commented Jan 27, 2026

To test:

  • check the new examples
  • check the changed pages for console errors

@matyasf matyasf self-assigned this Jan 27, 2026
</InstUISettingsProvider>
```

### Overriding theme for a specific component in a subtree
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are handled as array keys, so if there is a duplicate like here React will emit an error

Comment on lines +386 to +391
legacy: {
radiusSmall: '2rem', // View border radius
},
strokeWidth: {
sm: '1rem' // View border width
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will likely change, I just wanted to make sure that the current state works

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-02-03 11:21 UTC

Copy link
Contributor

@joyenjoyer joyenjoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work

<View focusWithin>
if the <code>focusWithin</code> prop is <code>true</code>, the View will display the focus ring if any of its descendants receives focus
<div tabindex="0" role="button" style={{outline: 'none'}}>Tab here to see the focus outline</div>
<div tabIndex="0" role="button" style={{outline: 'none'}}>Tab here to see the focus outline</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shouldn't be capitalized in tabindex

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should because its JSX. autoComplete tells me its tabIndex, when I use lowercase i it results in an error: installHook.js:1 Warning: Invalid DOM property tabindex. Did you mean tabIndex?

Also others say this too, e.g. look here at the code https://www.dhiwise.com/post/the-ultimate-guide-to-using-tabindex-in-react-components


### Theme overrides for focus rings, border radii, shadows, spacing

Certain visuals as now styled via a central object called `SharedTokens`. You can override this too, for example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small grammatical thing: as OF now. At least I think so

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@matyasf matyasf force-pushed the sharedToken_examples branch from 6004e6d to a94f17a Compare February 3, 2026 11:06
@matyasf matyasf requested a review from HerrTopi February 3, 2026 11:07
@matyasf matyasf merged commit 3d6dc95 into v12 Feb 3, 2026
8 of 9 checks passed
@matyasf matyasf deleted the sharedToken_examples branch February 3, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants