Skip to content

🐛(frontend) allow opening the home button in a new tab - #2841

Merged
AntoLC merged 1 commit into
suitenumerique:mainfrom
Jul11us:fix/home-button-new-tab
Oct 16, 2026
Merged

AntoLC merged 1 commit into
suitenumerique:mainfrom
Jul11us:fix/home-button-new-tab

Conversation

@Jul11us

@Jul11us Jul11us commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Purpose

Fixes #2839.

The "Back to homepage" button in the left panel was rendered as a <button> that called router.push('/') on click. Because it had no href, it could not be opened in a new tab via Ctrl/Cmd+click, middle-click or the browser context menu.

Proposal

  • Render the home button with the existing ButtonLink component (same pattern as NewDocButton), 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.
  • Update e2e selectors from getByRole('button', { name: 'Back to homepage' }) to getByRole('link', ...), since the element's role changed.
  • Add an e2e assertion that the home button is a link to /.
  • Add a changelog entry.

The header logo (HeaderLogoLink) was already a next/link and did not need changes.

External contributions

General requirements

CI requirements

  • I made sure that all existing tests are passing
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)

AI requirements

  • I used AI assistance to produce part or all of this contribution
  • I have read, reviewed, understood and can explain the code I am submitting
  • I can jump in a call or a chat to explain my work to a maintainer

@Jul11us
Jul11us force-pushed the fix/home-button-new-tab branch from e29a920 to d5e9980 Compare October 14, 2026 14:40
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 8ead560f-5799-4d17-bcd4-8ecec667f127
📥 Commits

Reviewing files that changed from the base of the PR and between 5df9fe7 and 0579a0f.

📒 Files selected for processing: 1
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The left-panel home control changes from a button to a link to /. Its click handler still toggles the panel on mobile and no longer calls router.push('/'). E2e tests now locate the control as a link and check its homepage destination.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Low

Suggested reviewers: lunika

Merge Risk: ⚪ Minimal · up to 0579a

The left-panel home control retains in-app navigation while allowing standard browser actions to open it in a new tab. No concrete merge-blocking risk is evident.

Pre-merge checks: Passed 7
Check name Status Explanation
Description check Passed The description clearly explains the accessibility fix, implementation, test updates, and changelog entry.
Linked Issues check Passed The description references issue #2839 and explains how the changes address its requested new-tab behavior.
Out of Scope Changes check Passed The changes are limited to converting the homepage control to a link, updating related end-to-end selectors, and adding the changelog entry.
Title check Passed The title clearly and concisely describes the main frontend change: allowing the home control to open in a new tab.
Linked Issues check Passed Issue #2839 requires a home control that supports browser new-tab actions. LeftPanelHeaderActions now uses ButtonLink with href="/". Modified clicks and context-menu actions can use the browser …
Out of Scope Changes check Passed The changes stay within issue #2839. The source change converts the left-panel home control to a link. The e2e changes update selectors and verify the link target. The changelog documents the fix. No …
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 8…
Full details: Linked Issues check

Explanation

Issue #2839 requires a home control that supports browser new-tab actions. LeftPanelHeaderActions now uses ButtonLink with href="/". Modified clicks and context-menu actions can use the browser link behavior. The mobile handler still toggles the panel. The e2e test checks the link role and / target. The header logo already used a link.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #2839. The source change converts the left-panel home control to a link. The e2e changes update selectors and verify the link target. The changelog documents the fix. No unrelated product change is shown.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 8 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AntoLC
AntoLC self-requested a review October 15, 2026 11:38
@AntoLC AntoLC added enhancement improve an existing feature frontend labels Oct 15, 2026
@AntoLC
AntoLC force-pushed the fix/home-button-new-tab branch from d5e9980 to 19a6794 Compare October 15, 2026 13:17

@AntoLC AntoLC left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution 🎉

@AntoLC AntoLC self-assigned this Oct 15, 2026
@AntoLC
AntoLC force-pushed the fix/home-button-new-tab branch from 19a6794 to 5df9fe7 Compare October 16, 2026 14:26
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]>
@AntoLC
AntoLC force-pushed the fix/home-button-new-tab branch from 5df9fe7 to 0579a0f Compare October 16, 2026 15:14
@AntoLC
AntoLC merged commit 0579a0f into suitenumerique:main Oct 16, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement improve an existing feature frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot open home in new tab

2 participants