Repository navigation
🐛(frontend) allow opening the home button in a new tab - #2841
Conversation
e29a920 to
d5e9980
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe left-panel home control changes from a button to a link to Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
d5e9980 to
19a6794
Compare
AntoLC
left a comment
There was a problem hiding this comment.
Thank you for your contribution 🎉
19a6794 to
5df9fe7
Compare
The left panel home button was a plain button calling router.push, so it could not be opened in a new tab with Ctrl/Cmd+click or the context menu. Render it with ButtonLink so it is a real link to /, keeping client-side navigation on a normal click. Signed-off-by: Jul11us <[email protected]>
5df9fe7 to
0579a0f
Compare
Purpose
Fixes #2839.
The "Back to homepage" button in the left panel was rendered as a
<button>that calledrouter.push('/')on click. Because it had nohref, it could not be opened in a new tab via Ctrl/Cmd+click, middle-click or the browser context menu.Proposal
ButtonLinkcomponent (same pattern asNewDocButton), so it becomes an<a href="/">. A normal click still uses client-side navigation (and still closes the panel on mobile); Ctrl/Cmd/Shift+click falls through to the browser.getByRole('button', { name: 'Back to homepage' })togetByRole('link', ...), since the element's role changed./.The header logo (
HeaderLogoLink) was already anext/linkand did not need changes.External contributions
General requirements
CI requirements
git commit --signoff(DCO compliance)git commit -S)<gitmoji>(type) title description## [Unreleased]section (if noticeable change)AI requirements