Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 10, 2025

Overview

Implemented right-click functionality on the weshipit.today logo that navigates users directly to the logo/assets section on the about page. When users right-click the logo, the default browser context menu is prevented and they are automatically taken to /about#logo where they can download the logo.

Changes

Header Component

Added onContextMenu event handlers to both desktop and mobile logo instances that:

  • Prevent the default browser context menu using event.preventDefault()
  • Navigate to the assets section using window.location.href = '/about#logo'
<Link
  href="/"
  className="-m-1.5 p-1.5 text-lg font-bold leading-6 dark:text-white"
  onContextMenu={(event) => {
    event.preventDefault();
    window.location.href = '/about#logo';
  }}
>
  weshipit<span className="text-slate-400">.today</span>
</Link>

About Page

Added an anchor ID to the Logo section heading to enable direct navigation:

<h2 id="logo">Logo</h2>

Testing

Added comprehensive test coverage to verify the right-click behavior works correctly:

  • Confirms preventDefault() is called to block the default context menu
  • Verifies navigation to /about#logo occurs on right-click

Demo

Right-click test demonstration

The screenshot shows the test interface demonstrating that right-click is detected, default behavior is prevented, and navigation would occur to /about#logo.

Benefits

  • Improved UX: Visitors can quickly access logo assets with a simple right-click
  • Discoverability: Makes the logo download feature more accessible
  • Consistency: Works identically on both desktop and mobile menu logos

Closes #247


Acknowledgment: Thank you to @kadikraman for the inspiration!

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: node index.js --exec install (dns block)
  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/weshipit.today/weshipit.today/node_modules/next/dist/bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

fix #247


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@vercel
Copy link

vercel bot commented Oct 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
design-weshipit-today Error Error Oct 10, 2025 11:13am
weshipit-today Error Error Oct 10, 2025 11:13am

Co-authored-by: flexbox <360936+flexbox@users.noreply.github.com>
Co-authored-by: flexbox <360936+flexbox@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue related to #247 Add right-click logo navigation to about page assets section Oct 10, 2025
Copilot AI requested a review from flexbox October 10, 2025 11:15
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.

right click on logo should go to the assets page

2 participants