Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Reapplies the accessible Downshift-based ComboBox and refactors the publisher-side store switcher to use it, addressing a refresh/navigate regression for nested brand store routes and improving nav highlighting for remodel-related model pages.
Changes:
- Introduces a new
ComboBoxcomponent (Downshift) with accompanying SCSS and unit tests. - Refactors
StoreSelectorto useComboBoxand avoids navigating on mount when the selected store matches the URL store id. - Adjusts PrimaryNav “Models” highlighting to remain active on nested model/remodel routes.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| static/sass/styles.scss | Imports and includes the new combobox SCSS mixin in the main stylesheet pipeline. |
| static/sass/_snapcraft_p-combobox.scss | Adds new .p-combobox styling used by the Downshift-based component. |
| static/sass/_snapcraft_l-application.scss | Removes the old .store-selector styling that is no longer used after the refactor. |
| static/js/publisher/components/StoreSelector/StoreSelector.tsx | Replaces custom store selector UI with the new ComboBox and guards navigation on mount. |
| static/js/publisher/components/StoreSelector/tests/StoreSelector.test.tsx | Adds tests to ensure StoreSelector renders correctly and only navigates on actual changes. |
| static/js/publisher/components/PrimaryNav/PrimaryNav.tsx | Updates “Models” nav selection logic to cover nested remodel/model routes. |
| static/js/publisher/components/ComboBox/ComboBox.tsx | Adds the new ComboBox component and state/behavior patches around Downshift. |
| static/js/publisher/components/ComboBox/tests/ComboBox.test.tsx | Adds unit tests for ComboBox interactions, filtering, and keyboard behavior. |
ilayda-cp
reviewed
Apr 16, 2026
| "aria-current": | ||
| location.pathname === `/admin/${storeId}/models`, | ||
| "aria-current": location.pathname.includes( | ||
| `/admin/${storeId}/models`, |
Contributor
There was a problem hiding this comment.
changing to "includes" makes it too loose. It might work now but in the future if we add something like "/admin/${storeId}/models-archive" it would cause a bug.
ilayda-cp
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done
Reapplied reverted combo box PR (#5617) along with a few fixes. The reverted code has already been reviewed, so you can skip it and review only the new changes by comparing the tip of this branch to the reapply commit: b25b1b5
The reverted version had a problem where navigating to a nested brand store route and refreshing the page would bring you back to
/admin/< store id >/snapsrather than the page you were viewing before. Fixes:navigate(...)only if they're differentAs a drive-by I added a primary navigation fix for highlighting the "Models" section when visiting remodel pages
How to QA
Testing
Security
Issue / Card
Fixes #
Screenshots
UX Approval