-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: disable menu ripple #828
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
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughDisables ripple effects on all Tab components in MainMenu and removes onClick handlers from non-robots tabs. The robots tab retains its specific click handler. Labels/icons are reformatted across multiple lines without altering exports or public APIs. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant T as Tabs (MUI)
participant R as Robots Tab (onClick)
participant D as Other Tabs (no onClick)
U->>T: Click on a tab
alt Robots tab clicked
T->>R: onClick handleRobotsClick
R-->>T: Navigation triggered via handler
else Other tab clicked
T->>D: Default tab selection (no ripple)
D-->>T: Internal state change (selection)
end
note over T: Ripple disabled for all tabs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/dashboard/MainMenu.tsx (1)
100-117
: LGTM! Consider extracting the repeated styles.The ripple disable and removal of onClick handlers simplify the code correctly. The repeated
sx
prop could be extracted into a constant for maintainability.+ const tabStyles = { justifyContent: 'flex-start', textAlign: 'left', fontSize: 'medium' }; + return ( <> <PaperThen replace the repeated
sx
prop:<Tab value="runs" label={t('mainmenu.runs')} icon={<FormatListBulleted />} iconPosition="start" disableRipple={true} - sx={{ justifyContent: 'flex-start', textAlign: 'left', fontSize: 'medium' }} /> + sx={tabStyles} /> <Tab value="proxy" label={t('mainmenu.proxy')} icon={<Usb />} iconPosition="start" disableRipple={true} - sx={{ justifyContent: 'flex-start', textAlign: 'left', fontSize: 'medium' }} /> + sx={tabStyles} /> <Tab value="apikey" label={t('mainmenu.apikey')} icon={<VpnKey />} iconPosition="start" disableRipple={true} - sx={{ justifyContent: 'flex-start', textAlign: 'left', fontSize: 'medium' }} /> + sx={tabStyles} />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/dashboard/MainMenu.tsx
(1 hunks)
🔇 Additional comments (1)
src/components/dashboard/MainMenu.tsx (1)
92-99
: LGTM—pattern confirmed elsewhere
Other<Tab>
usages (e.g. in src/components/recorder/LeftSidePanel.tsx) paironClick
on the tab with a parent<Tabs onChange>
. No changes needed here.
Summary by CodeRabbit