Repository navigation
fix(ui): keep the admin sidebar mounted across sections (#542) - #544
Merged
stefan-ernst merged 6 commits intoNov 24, 2026
Merged
Conversation
…app#542) Section params (admin tab and channel filters, delegated-admin tab, team section) no longer change the main app navigation identity, so switching sections no longer remounts the shell and resets its sidebar scroll. The content pane now scrolls to the top on a section change, and TeamDetail reloads when the team id changes instead of only on mount.
Bind the search Input's inputRef instead of the component instance, which has no focus() or blur(), and wait until the drawer's visibility transition has revealed the field before focusing it.
The frame loop only exits early once checkVisibility reports the field visible. Browsers without it made every drawer open and '/' shortcut burn all 30 frames before focusing, so focus immediately there instead.
|
This PR has merge conflicts that need to be resolved before it can be merged. Please rebase on the latest |
|
Merge conflicts have been resolved. |
Contributor
|
Thanks @valentimarco! Merging it in. |
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.
Changes
Keep the admin sidebar mounted across sections
mainAppWorkspaceContext.js:mainAppNavigationIdentityignores section params for shells that swap their own content:admin(tab,categoryId,type),delegated-admin(tab),team-detail(section). Switching sections no longer remounts the shell, so the sidebar keeps its scroll position. Entity params (itemId,setId, …) still remount the route.Admin.svelte,DelegatedAdmin.svelte: scroll the content pane back to the top when the active section changes.TeamDetail.svelte: load the team and role wheneverteamIdchanges instead of only on mount, and drop responses for a team that is no longer shown.Fix the admin search focus
Admin.svelte: bind the searchInputthroughinputRefinstead ofbind:this. The component instance has nofocus()/blur(), which threw$.get(...)?.focus is not a functionwhen opening the narrow-screen drawer and broke the/shortcut, clear search, Escape and ArrowUp.Admin.svelte: when opening the drawer, wait until the search field is visible (at most 30 frames) before focusing it, since it is still hidden by the drawer's visibility transition on the first frames.