Skip to content

fix: notification items are now real links - #2039

Merged
Philipinho merged 1 commit into
docmost:mainfrom
julien-f:fix/notification-links
Mar 28, 2026
Merged

Philipinho merged 1 commit into
docmost:mainfrom
julien-f:fix/notification-links

Conversation

@julien-f

Copy link
Copy Markdown
Contributor

Summary

  • Notification items in the notification panel were rendered as <button> elements with a useNavigate() click handler, making it impossible to open them in a new tab or window.
  • Replaced UnstyledButton (button) with UnstyledButton component={Link} so each item renders as a real <a> element — the browser handles all navigation natively.
  • Regular left-click still uses SPA navigation and closes the popover.
  • Ctrl/Cmd/Shift+click and middle-click open the page in a new tab; all of these mark the notification as read.
  • Right-click (context menu) does not mark as read.
  • Added display: block to the CSS class to fix layout regression caused by <a> defaulting to display: inline (unlike <button>).

Notes

⚠️ This code was written by an AI assistant (Claude) and has been manually tested by a human. Please review carefully before merging.

Test plan

  • Left-click a notification — navigates in-place, marks as read, closes popover
  • Ctrl/Cmd+click — opens in new tab, marks as read
  • Middle-click — opens in new tab, marks as read
  • Right-click — opens context menu, does not mark as read
  • Notification items display correctly (no extra spacing, hover highlight is a single block)

🤖 Generated with Claude Code

Replace UnstyledButton with UnstyledButton component={Link} so each
notification renders as a real anchor element. Regular left-clicks use
SPA navigation and close the popover; Ctrl/Cmd/middle-click open the
page in a new tab. All click types mark the notification as read.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@Philipinho
Philipinho merged commit aa27d57 into docmost:main Mar 28, 2026
1 check passed
@Philipinho

Copy link
Copy Markdown
Member

Thank you for your contribution.

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