Skip to content

feat(ui-global-nav): add search to the SubNav - #2845

Draft
balzss wants to merge 1 commit into
feat/global-nav-subnav-statesfrom
feat/global-nav-subnav-search
Draft

balzss wants to merge 1 commit into
feat/global-nav-subnav-statesfrom
feat/global-nav-subnav-search

Conversation

@balzss

@balzss balzss commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • A SubNav (any level) takes search: a small search field above the items, from Figma .subNavWithSearch. The app owns value, filters the items in the browser or on its server, and passes them back.
  • Escape clears the field. In an empty field it closes the SubNav and returns focus to the rail item.
  • The field stays above the loading and error screens, so the user can keep typing. Opening the panel focuses it.
  • resultsLabel is read 500 ms after typing stops, so screen readers don't read a count on every keystroke. 500 ms is the delay the hidden GlobalNav search draft in Figma suggests.
  • "No results" uses renderContent, and the count and "Show more" button use renderFooter, both from feat(ui-global-nav): add loading and error states to the SubNav #2841.

Builds on #2841: this PR targets its branch and gets rebased onto master after it merges. Item groups (current, favorites, other) come in a separate PR. No new unit tests yet; they come with INSTUI-5235.

Test Plan

GlobalNav page, "Search" example:

  • Open Courses: focus is in the search field, with 10 courses and "Show 10 more courses".
  • Type "bio": 5 courses. With a screen reader, "5 courses found" is read once after typing stops.
  • Press "Show 10 more courses": 20 courses and "Showing 20 of 30 courses".
  • Type "zzz": "No courses match “zzz”."
  • Press Escape: the field clears. Press it again: the SubNav closes and focus returns to Courses.

Questions for design

  • The space under the field uses the SubNav gap token (8 px). Figma shows 16 px.
  • The 500 ms results delay comes from the hidden draft, not the published component.
  • Figma has no clear button. Chrome shows its own.

Fixes INSTUI-5257

🤖 Generated with Claude Code

Canvas has users with hundreds of courses, so long SubNav lists need
a search field. The app owns the text and filters the items, in the
browser or on its server, because Canvas owns the data. Escape clears
the field, then closes the SubNav.

Refs INSTUI-5257

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Dec 4, 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-2845/

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

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

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Visual regression report

Cypress suite: ✅ Passing

Visual diff: ⚠️ Changes detected.

Status Count
Unchanged 110
Changed 1
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.

Diff images (1)

tooltip-light.png — 15266 pixels differ

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 self-assigned this Dec 4, 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