Skip to content

add navbar toggling shortcut#2273

Open
IRjSI wants to merge 2 commits intoarc53:mainfrom
IRjSI:frontend-fix
Open

add navbar toggling shortcut#2273
IRjSI wants to merge 2 commits intoarc53:mainfrom
IRjSI:frontend-fix

Conversation

@IRjSI
Copy link
Contributor

@IRjSI IRjSI commented Feb 4, 2026

Feature: Added a keyboard shortcut to toggle the navbar for improved usability.

  • Why was this change needed?
    To allow quicker access to the navbar without relying on mouse interaction.

  • Other information:
    Shortcut: Ctrl + Shift + S

@vercel
Copy link

vercel bot commented Feb 4, 2026

@IRjSI is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.21%. Comparing base (9389b4a) to head (af54f75).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2273      +/-   ##
==========================================
- Coverage   45.28%   45.21%   -0.07%     
==========================================
  Files         161      161              
  Lines       12533    12551      +18     
==========================================
  Hits         5675     5675              
- Misses       6858     6876      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aaron-seq
Copy link

Code Review

Disclosure: This review was conducted with AI assistance and has been fully reviewed and validated.

Overview

The implementation adds a keyboard shortcut (Ctrl+Shift+S) to toggle the navbar, which improves usability. The code structure is clean with proper event listener cleanup.

Issues Identified:

  1. Missing dependency in useEffect (Line 300): The dependency array is empty [], but setNavOpen is used inside the effect. While React guarantees setNavOpen stability, it's better practice to include it or use a comment explaining why it's omitted.

  2. Potential keyboard shortcut conflict: Ctrl+Shift+S might conflict with browser's "Save As" on some platforms. Consider using a less common combination or document this known limitation.

  3. Lack of user-facing documentation: The shortcut is not visible in the UI. Users won't know about this feature unless they read the code. Consider adding a tooltip or keyboard shortcuts help panel.

Positive Aspects:

  • Proper cleanup function in useEffect
  • Cross-platform support (ctrlKey || metaKey)
  • preventDefault() correctly prevents browser default behavior
  • Event listener properly removed on unmount

CI/CD Status:

All checks passed. The Bandit Security Scan warning is about CodeQL Action deprecation (not related to this PR).

Recommendation:

The code logic is correct and functional. However, I recommend addressing the dependency array and considering documentation before merging.

@IRjSI
Copy link
Contributor Author

IRjSI commented Feb 15, 2026

Fixed the issues.

Add dependency in useEffect.
No conflict with "save as" as the default behaviour is prevented.
Add a tooltip, so the users will now know about the shortcut feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants