Fix inconsistent sidebar toolbar button order when navigating to Browse page#283
Merged
rvanmaanen merged 3 commits intomainfrom Mar 21, 2026
Merged
Fix inconsistent sidebar toolbar button order when navigating to Browse page#283rvanmaanen merged 3 commits intomainfrom
rvanmaanen merged 3 commits intomainfrom
Conversation
…Collection Co-authored-by: rvanmaanen <4835258+rvanmaanen@users.noreply.github.com> Agent-Logs-Url: https://github.com/techhubms/techhub/sessions/16b3d056-1d89-4921-b658-266784ca00d1
Copilot
AI
changed the title
[WIP] Fix inconsistent order of sidebar buttons on mobile
Fix inconsistent sidebar toolbar button order when navigating to Browse page
Mar 20, 2026
Contributor
✅ PR Preview Environment RemovedThe preview environment for this pull request has been removed. |
rvanmaanen
approved these changes
Mar 21, 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.
The "Content" filter toolbar button appeared in different positions depending on navigation history: first when loading
/allfresh, but last when navigating from a collection page (e.g./all/videos) to/all/allwithin the same SPA session.Root cause
MobileSidebarPanelregisters itself withMobileSidebarToolbarinOnInitialized, which appends to_panels. The "Content" panel is conditional (@if (ShowContentTypeFilter)), so when navigating from a non-Browse page (panel absent) to Browse (panel should be first), it registers after Search/Date/Tags — ending up rightmost instead of leftmost.Fix
Added
@key="@ShowContentTypeFilter"toMobileSidebarToolbarinSectionCollection.razor. WhenShowContentTypeFilterchanges, Blazor destroys and recreates the toolbar, causing all panels to re-register in template declaration order.Changes
SectionCollection.razor— add@key="@ShowContentTypeFilter"toMobileSidebarToolbarSectionCollectionTests.cs— regression tests: fresh Browse render has Content first; navigating collection → Browse keeps Content firstdocs/page-structure.md— document the conditional "Content /filter" panel in the SectionCollection panel tableOriginal prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.