feat(sidebar): support native href links - #1147
Open
sridharkalaibala wants to merge 1 commit into
Open
sridharkalaibala wants to merge 1 commit into
sridharkalaibala wants to merge 1 commit into
Conversation
Contributor
|
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.
Closes #1125.
Sidebar destinations outside the router currently need a custom anchor or a button-based navigation workaround. Add
hreftoSidebarItemandSidebarRailItem, rendering the existing link content as a native<a>. This supports normal browser link actions for other apps, documentation, and mail addresses. Frappe's merged Desk shell explicitly copies the rail tile classes around anchors pending this capability (consumer PR).An explicitly supplied
hreftakes precedence overto, including an empty href. Native sidebar links use explicitactiverather than inferring state from an ignored route. Existing router links, buttons, slots, tooltips, indicators, and click handlers retain their paths. The component guides and generated API tables document the new prop.Validation:
main, while its 32 existing cases pass. Coverage includes absolute/relative/mail/empty hrefs, a simultaneously suppliedto, keyboard focus, unprevented native click delivery, and use without a router.vue-tscapp/node projects and the Vite build pass. The build retains its large-chunk warning.git diff --checkpasses.mainunder Windows. The editor's cold import exceeds its five-second timeout; all 13 editor primitive tests pass separately with a 20-second timeout. No test or timeout configuration is changed in this PR.For the full docs/unit run, tracked sources were temporarily normalized to LF to avoid existing Windows shebang/JSDoc parsing issues, then restored. This contribution was prepared with AI assistance; the validation above was run locally.