Skip to content

Remove blank target from internal links.#91

Merged
CodeMeAPixel merged 2 commits intodevelopmentfrom
production
Apr 11, 2026
Merged

Remove blank target from internal links.#91
CodeMeAPixel merged 2 commits intodevelopmentfrom
production

Conversation

@CodeMeAPixel
Copy link
Copy Markdown
Contributor

No description provided.

@CodeMeAPixel CodeMeAPixel merged commit ed158d1 into development Apr 11, 2026
7 checks passed
Comment on lines 418 to 423
<DropdownMenuItem key={resource.title} asChild className="p-0 focus:bg-transparent">
<a
href={resource.href}
target="_blank"
rel="noopener noreferrer"
className="flex items-start gap-3 rounded-lg p-3 hover:bg-accent/50 transition-colors group cursor-pointer w-full"
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The code removes target="_blank" from all resource links, including those marked as external: true, causing them to open in the same tab instead of a new one.
Severity: MEDIUM

Suggested Fix

Modify the link rendering logic to conditionally add target="_blank" and rel="noopener noreferrer" when resource.external is true. For example: target={resource.external ? "_blank" : undefined}. This should be applied to both the desktop and mobile navigation components.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/ui/components/Static/navigation.tsx#L418-L423

Potential issue: The change removes the `target="_blank"` attribute from all resource
links in the navigation menu, for both desktop and mobile views. However, the
`resources` data array contains items explicitly marked with `external: true` (e.g.,
"Client Area", "Game Panel"). The rendering logic ignores this `external` flag, causing
these external links to navigate away from the site in the same tab instead of opening a
new one. This contradicts the user expectation set by the accompanying `ExternalLink`
icon, which is still rendered next to these links.

Also affects:

  • packages/ui/components/Static/navigation.tsx:637~642

Did we get this right? 👍 / 👎 to inform future reviews.

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.

1 participant