Repository navigation
Conversation
|
Visual regression reportCypress suite: ✅ Passing Visual diff:
Accessibility (axe): ✅ No violations. 📊 View full report — click a screenshot's ⚠ badge to see each violation boxed on the image, with the offending element named and contrast failures shown as color swatches. Diff images (7)alert-canvas.png — 753 pixels differglobal-nav-canvas.png — 1415 pixels differglobal-nav-dark.png — 179 pixels differglobal-nav-light.png — 1449 pixels differprogressbar-canvas.png — 1661 pixels differsmall-components-canvas.png — 85 pixels differview-canvas.png — 1088 pixels differBaselines come from the |
0a77ba6 to
37ce0d7
Compare
37ce0d7 to
c7f9aaa
Compare
00fa1dd to
c52015f
Compare
c52015f to
31ff8d1
Compare
31ff8d1 to
f9c950c
Compare
f9c950c to
ae032ef
Compare
ae032ef to
88f8e47
Compare
| /** | ||
| * The institution logo at the top of the rail. | ||
| */ | ||
| logo?: GlobalNavLogo |
There was a problem hiding this comment.
This should not be optional IMO
There was a problem hiding this comment.
I was wondering about this, I will ask design if there can ever be exceptions
There was a problem hiding this comment.
made it required. if design says there can be a nav without a logo we can make it optional later without a breaking change
88f8e47 to
8ab3332
Compare
8ab3332 to
a4d5b9f
Compare
a4d5b9f to
ec94dc0
Compare
ec94dc0 to
ce82ec8
Compare
ce82ec8 to
9ba330e
Compare
| const Components = getComponentsForVersion() | ||
|
|
||
| // an SVG shown with <img> can't inherit the text color, so the examples get one URL per color | ||
| const svgUrl = (svg: string, color: string) => |
There was a problem hiding this comment.
Question about the canvas-wordmark icon here: may non-instui devs use it later or is it added just for the docs app example? if yes, it would be worth to add it as an official icon to our ui-icons package and use it here with setting color through its API
There was a problem hiding this comment.
i've asked design about this, they didn't have a clear answer yet but most likely we won't be providing this to end users and this is just here for docs example purposes
| /** | ||
| * The heading of the panel. | ||
| */ | ||
| title: Renderable |
There was a problem hiding this comment.
Isn't a string enough here?
There was a problem hiding this comment.
probably yes or if not, we can expand it later, i'll update this
There was a problem hiding this comment.
changed it to string
| * @return The final style object, which will be used in the component | ||
| */ | ||
| const generateStyle = ( | ||
| componentTheme: ReturnType<NewComponentTypes['MainNavItem']> |
There was a problem hiding this comment.
I would create a dedicated theme for this component instead of using MainNavItem's theme. Moreover, since this is a tiny unit of the larger component, I would remove it and just add the code to MainNavItem's render.
There was a problem hiding this comment.
this is something that i'll consider but I would suggest to leave it like this for now and once we decide what to do, we can update this in a future pr
| }, | ||
| mark: { | ||
| label: 'institutionLogo__mark', | ||
| // MainNavInstitutionLogo has no size tokens |
There was a problem hiding this comment.
Maybe design team should add tokens here?
tagging @adamlobler
There was a problem hiding this comment.
i'll let him know this needs to be added but until that is done i think this can be left like this and replaced in a future pr
|
@balzss one more thing: when I collapse an opened GlobalNav, it is flickering; it closes, reopens and closes quite quickly before it settles |
GlobalNav needs the new MainNav.minimizedGap token, the spacing of the collapsed main column. Token changes: - MainNav: new minimizedGap. MainNavItem: selectedBackgroundColor is renamed to activeBackgroundColor. New CollapseButton set and new SubNav and SubNavItem colors. Nothing uses these yet. - Legacy themes: the GlobalNav box shadow and the MainNavAccountItem hover color changed. - Legacy themes: stroke.warning is orange instead of honey. It is the warning border color of Alert, Pill, ProgressCircle and View. - New Banner typography and SegmentedControl opacity tokens, and the Stepper spacing tokens moved to StepItem. No component uses these sets yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The app describes the nav as data (items, logo, account) instead of nested sub-components, so InstUI renders all the markup and keeps roles, focus and keyboard handling in one place. GlobalNav hasn't been released yet, so dropping children isn't a breaking change. Co-Authored-By: Claude <noreply@anthropic.com>
9ba330e to
e462ade
Compare
The collapse button is an InstUI IconButton with colors from the MainNavItem tokens. Its focus ring keeps the default info color for now, which has too little contrast on the legacy rail. Co-Authored-By: Claude <noreply@anthropic.com>
Items with a sub navigation are buttons with aria-expanded. In the collapsed rail the tooltip wraps a span around the item, because Tooltip overwrites the aria-expanded of its trigger. Co-Authored-By: Claude <noreply@anthropic.com>
GlobalNav applies its own props after the app's, so elementProps can't override the aria attributes, the href check or the click handling. Co-Authored-By: Claude <noreply@anthropic.com>
The divider under the logo row uses the GlobalNav border color, and the main column has a hardcoded width, until the design tokens add a MainNav divider color and width. Co-Authored-By: Claude <noreply@anthropic.com>
e462ade to
aae4cba
Compare







Summary
@instructure/instructure-design-tokensfrom v2.3.0 to v2.4.0. GlobalNav needs the newMainNav.minimizedGaptoken, the spacing of the collapsed rail. Other token changes:mainNavItem.selectedBackgroundColoris renamed toactiveBackgroundColor.stroke.warningis orange instead of honey. It is the warning border color of Alert, Pill, ProgressCircle and View.@instructure/ui-global-navand@instructure/ui. The app passes the nav content as data (items,logo,account). Where needed, it can also pass its own JSX, HTML attributes or a custom element.GlobalNav,MainNavandMainNavItemtokens. The button is an InstUIIconButtonwith aTooltip, and it callsonCollapsewith the new value.elementProps(HTML attributes, for exampledata-*) andrender(a custom element, for example a router link). GlobalNav applies its own props last, so the app can't override the aria attributes, the href check or the click handling.wordmark, the image already shows the name, andnameis its alternative text. The docs example uses a Canvas wordmark and mark. These images are only in the docs app, not in a package.account, the SubNav panel,backLabelandcloseSubNavLabel. They come in the next PRs. Known gap: the collapse button's focus ring has too little contrast on the legacy rail.Test Plan
#in the link: without it, the production docs open, and they don't have GlobalNav.global-navscreenshots. These changes are expected: the regression page now shows the rail with the collapse button. Diffs in the legacy rail shadow, or in the warning borders of Alert, Pill, ProgressCircle or View in a legacy theme, come from the token bump.Refs INSTUI-5215
🤖 Generated with Claude Code