-
Notifications
You must be signed in to change notification settings - Fork 3
Convert navigation buttons to anchor tags for right-click context menu support #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
|
@thehabes This may have hit more buttons than you wanted. Do you want to flag a few as not needed for copilot to back out of? I can decide if you want, but since this was your use case, I don't want to allow something just because it feels fine to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR converts navigation buttons to anchor tags to enable right-click context menu support (e.g., "Open in new tab"). Previously, buttons used onclick handlers with window.location.href assignments, which prevented browser context menu functionality. The conversion maintains the visual appearance while improving user experience through native browser navigation features.
Key Changes:
- Replaced button elements with semantically equivalent anchor tags across multiple interfaces
- Updated event listeners to set
hrefattributes instead of calling navigation functions - Maintained existing CSS classes to preserve visual styling
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| manage/index.js | Updated modify team button to set href instead of using click event listener |
| manage/collaboration.html | Converted "Modify Project Team" button to anchor tag |
| interfaces/project/quick-guide.html | Converted "Get Started" button to anchor tag |
| interfaces/project/index.html | Converted "Leave Project" button to anchor tag with href assignment |
| interfaces/manage-project/index.js | Refactored all navigation buttons to set href on project load instead of click listeners |
| interfaces/manage-project/index.html | Converted all card footer buttons (Leave, Edit Metadata, Manage Collaborators, etc.) to anchor tags |
| interfaces/import-tpen28/index.js | Updated "Open the Project" button to set href instead of click listener |
| interfaces/import-tpen28/index.html | Converted "Open the Project" button to anchor tag |
| components/user-profile/userStats.js | Wrapped collaborator images in anchor tags instead of using onclick |
| components/import-project/index.js | Converted "Manage" button to anchor tag with inline styling override |
| components/import-image/index.js | Converted "Manage" button to anchor tag |
| components/copy-project-without-annotations/index.js | Converted "Manage" button to anchor tag |
| components/copy-project-with-group-member/index.js | Converted "Manage" button to anchor tag |
| components/copy-project-with-customization/index.js | Converted "Manage" button to anchor tag |
| components/copy-existing-project/index.js | Converted "Manage" button to anchor tag |
| components/annotorious-annotator/line-parser.js | Converted "Manage Columns" button to anchor tag with inline styling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Buttons that navigate to other pages were implemented with
onclickhandlers callingwindow.location.href, preventing users from right-clicking to "Open in new tab".Changes
Converted to
<a>tags:Before:
After:
Not Changed
Programmatic navigation patterns remain unchanged:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.