Skip to content

feat(ui-global-nav): add loading and error states to the SubNav - #2841

Draft
balzss wants to merge 1 commit into
masterfrom
feat/global-nav-subnav-states
Draft

balzss wants to merge 1 commit into
masterfrom
feat/global-nav-subnav-states

Conversation

@balzss

@balzss balzss commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A SubNav (any level) takes a status: a loading screen with a 500 ms delay, or an error with an optional retry button. It replaces items or renderContent, and a live region in GlobalNav reads it, plus loadedLabel when loading ends. Empty lists stay the app's own content in renderContent.
  • When new content removes the focused element (for example the retry button), focus moves to the first item, else the close handle. Content arriving doesn't move focus.
  • renderFooter adds content under the scrolling area, for "All X" links or pagination.
  • onSubNavIntent is called after 200 ms of hover or focus, or on touch, on a rail item or the account whose SubNav is closed, so the app can start loading early.

First version for review of the API. No new unit tests yet; they come with the GlobalNav test step (INSTUI-5235).

Test Plan

GlobalNav page, "Loading and errors" example:

  • Open Courses: a spinner after about half a second, then the items. Focus stays on the close button. "All courses" stays at the bottom.
  • Open Groups: an error with "Try again". Tab to it and press Enter: focus moves to the close button, then the groups show.
  • With a screen reader: the loading text, the error and "Courses loaded" are read once each.
  • Hover Courses for a moment before clicking (on a fresh page): the items show without the spinner.

Open questions

  • Design (Ádám): the error screen and the first-load screen have no design yet. Is the 500 ms spinner delay right? Does the footer need its own spacing or a divider?
  • Canvas (Aaron): does status, renderFooter and onSubNavIntent cover Courses, Groups, History and Help?
  • A11y: wording and timing of the announcements.

Fixes INSTUI-5280

🤖 Generated with Claude Code

@balzss balzss self-assigned this Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.2

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2841/

Built to branch gh-pages at 2026-12-02 15:27 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions Bot pushed a commit that referenced this pull request Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Visual regression report

Cypress suite: ✅ Passing

Visual diff: ✅ No changes.

Status Count
Unchanged 111
Changed 0
New 0
Removed 0

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.

Baselines come from the visual-baselines branch. They refresh on every merge to master. The Cypress suite line covers the a11y and console-error assertions — a ❌ there means the suite found real issues even if the visual diff is clean.

@balzss
balzss force-pushed the feat/global-nav-subnav-states branch from 1e078db to 31036e9 Compare December 2, 2026 11:45
@balzss balzss changed the title feat(ui-global-nav): add loading, error and empty states to the SubNav feat(ui-global-nav): add loading and error states to the SubNav Dec 2, 2026
github-actions Bot pushed a commit that referenced this pull request Dec 2, 2026
Canvas loads Courses, Groups, History and Help in the background, so
it needs to show progress and a failed load without building these
screens in renderContent. An empty list stays the app's own content.
onSubNavIntent lets it start loading before the click, and
renderFooter holds pagination for long lists.

Refs INSTUI-5280

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@balzss
balzss force-pushed the feat/global-nav-subnav-states branch from 31036e9 to 0b3f6af Compare December 2, 2026 15:24
github-actions Bot pushed a commit that referenced this pull request Dec 2, 2026

This branch has not been deployed

No deployments
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.

1 participant