Skip to content

fix(ui): keep the admin sidebar mounted across sections (#542) - #544

Merged
stefan-ernst merged 6 commits into
Windshiftapp:mainfrom
valentimarco:fix/542-admin-nav-scroll
Nov 24, 2026
Merged

stefan-ernst merged 6 commits into
Windshiftapp:mainfrom
valentimarco:fix/542-admin-nav-scroll

Conversation

@valentimarco

Copy link
Copy Markdown
Contributor

Changes

Keep the admin sidebar mounted across sections

  • mainAppWorkspaceContext.js: mainAppNavigationIdentity ignores 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 whenever teamId changes 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 search Input through inputRef instead of bind:this. The component instance has no focus()/blur(), which threw $.get(...)?.focus is not a function when 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.

valentimarco and others added 3 commits November 20, 2026 02:11
…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.
@github-actions

Copy link
Copy Markdown

This PR has merge conflicts that need to be resolved before it can be merged. Please rebase on the latest main branch.

@github-actions github-actions Bot removed the conflict label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

Merge conflicts have been resolved.

@stefan-ernst stefan-ernst changed the title fix(admin): keep the admin sidebar mounted across sections (#542) fix(ui): keep the admin sidebar mounted across sections (#542) Nov 24, 2026
@stefan-ernst

Copy link
Copy Markdown
Contributor

Thanks @valentimarco! Merging it in.

@stefan-ernst
stefan-ernst merged commit 6fa2280 into Windshiftapp:main Nov 24, 2026
22 checks passed
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.

2 participants