Move Sidenav keyboard shortcut into Leptos - #47
Open
JamesbbBriz wants to merge 2 commits into
Open
Conversation
JamesbbBriz
marked this pull request as ready for review
July 26, 2026 01:54
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.
Problem
The Sidenav keyboard shortcut was owned by a globally loaded JavaScript sidecar. That bypassed the Leptos component lifecycle, queried the DOM globally, and required the application shell to load component-specific JavaScript.
What changed
Ctrl+B/Cmd+Bhandling intoSidenavWrapperRwSignal<bool>throughSidenavContextcontenteditablefocus targetssidenav.jsfile and shell script tagSecurity impact
No network listeners, telemetry, remote state, permissions, or background data transfer were added. The change removes a globally loaded script and scopes the keyboard handler to the mounted component lifecycle.
Verification
A clean standalone consumer fixture containing the distributed Sidenav source also passes
cargo checkwith the dependencies resolved byui initplus the registry-declaredleptos_routerandstrum/derivedependencies.The unrestricted
cargo test --workspacereaches two pre-existingleptos_uidoctest failures (voidreferences an undefinedurl, and onevariantsexample omits the macro import). Both failures are outside this change; all workspace library, binary, integration, and unit tests pass.Fixture and migration notes
Closes #28