fix(quickstart): make Quick start help menu item clickable - #4021
Conversation
Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3489 Signed-off-by: Yi Cai <yicai@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Changed Packages
|
PR Summary by QodoFix Quick start help menu item clickability in global-header dropdown
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4021 +/- ##
=======================================
Coverage 57.80% 57.81%
=======================================
Files 2393 2393
Lines 95919 95921 +2
Branches 26776 26776
=======================================
+ Hits 55448 55455 +7
+ Misses 38935 38930 -5
Partials 1536 1536
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
/fs-review |
Code Review by Qodo
Context used✅ Compliance rules (platform):
11 rules✅ Cross-repo context Explored:
repo: redhat-developer/rhdh (sha: 6bcb0141) Not relevant to this PR:
redhat-developer/rhdh-chart Not relevant to this PR:
redhat-developer/rhdh-operator Not relevant to this PR:
redhat-developer/rhdh-local 1. Global-header version skew
|
|
🤖 Finished Review · ✅ Success · Started 3:25 AM UTC · Completed 3:42 AM UTC |
ReviewFindingsLow
|
| sx={{ py: 0.5, color: 'inherit', textDecoration: 'none' }} | ||
| > | ||
| <MenuItemLink to="" title="Quick start" icon="waving_hand" /> | ||
| </MenuItem> |
There was a problem hiding this comment.
[low] click-event-swallowing
MenuItemLink from the main entry point is a createComponentExtension lazy-loaded component. In practice, the global-header plugin chunk is already loaded before any dropdown can be opened (the header renders on every page), so the lazy-load race is not a real concern. The outer MenuItems onClick is independent of the inner components load state.
| openDrawer: jest.fn(), | ||
| closeDrawer: jest.fn(), | ||
| }), | ||
| })); |
There was a problem hiding this comment.
[low] mock-reset-idiom
Uses mockToggleDrawer.mockClear() instead of jest.clearAllMocks(), which is the predominant idiom in sibling test files (7 of 8 use clearAllMocks).
Suggested fix: Replace mockToggleDrawer.mockClear() with jest.clearAllMocks() in the beforeEach block.



Description
The Quick start item in the global-header help dropdown was visible but not clickable, so the drawer never opened. This change renders a real MUI
MenuItemviaforwardRef(instead ofGlobalHeaderMenuItemwithout atoprop, which usedcomponent={Fragment}in global-header 1.21.0 and dropped click handlers), bumps the global-header dependency, and adds unit coverage.Root cause
GlobalHeaderMenuItemwithout atoprop renderedMenuItem component={Fragment}in@red-hat-developer-hub/backstage-plugin-global-header@1.21.0, which discardedonClickandrole="menuitem".Fixed
UI before changes
UI after changes
Test Plan
yarn startinworkspaces/quickstart)refonReact.FragmentChecklist
Note
Made with Cursor