-
Notifications
You must be signed in to change notification settings - Fork 969
fix: limit text overflows right side panel #577
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
WalkthroughThe update modifies the styling of the limit options section in the right side panel component. Specifically, it replaces an HTML Changes
Assessment against linked issues
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 (2)
src/components/recorder/RightSidePanel.tsx (2)
623-631
: Enhance semantics & simplify styling
You’ve replaced the old<h4>
with a<Typography>
inside<FormLabel>
, which fixes overflow. For stronger semantics and accessibility, consider:
- Wrapping the radios in a real fieldset/legend by setting
<FormControl component="fieldset"> <FormLabel component="legend" …> … </FormLabel> … </FormControl>- Styling the
<FormLabel>
directly withsx
instead of nesting<Typography>
.- Swapping the non-standard
wordBreak: 'break-word'
for the more widely supportedoverflowWrap: 'break-word'
.Example diff:
- <FormControl> - <FormLabel> - <Typography variant="h6" sx={{ - fontSize: '16px', - fontWeight: 'bold', - mb: 1, - whiteSpace: 'normal', - wordBreak: 'break-word' - }}> - {t('right_panel.limit.title')} - </Typography> - </FormLabel> + <FormControl component="fieldset" sx={{ width: '100%' }}> + <FormLabel component="legend" sx={{ + typography: 'h6', + fontWeight: 'bold', + mb: 1, + whiteSpace: 'normal', + overflowWrap: 'break-word' + }}> + {t('right_panel.limit.title')} + </FormLabel>
638-642
: Ensure width actually constrains the group
You’ve setwidth: '100%'
on theRadioGroup
, but if its parent<FormControl>
or wrapping<Box>
are still auto-sized, it won’t have any effect. It’s more robust to move the width rule up to the<FormControl>
(or its container), for example:- <FormControl> + <FormControl component="fieldset" sx={{ width: '100%' }}> <FormLabel …>…</FormLabel> <RadioGroup value={limitType} onChange={…} - sx={{ - display: 'flex', - flexDirection: 'column', - width: '100%', - }} + sx={{ display: 'flex', flexDirection: 'column' }} >This ensures the entire group fills its parent and avoids any overflow.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/recorder/RightSidePanel.tsx
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/components/recorder/RightSidePanel.tsx (1)
src/context/browserActions.tsx (1)
LimitType
(7-7)
What this PR does?
Fixes the text overflow for the right side panel limit window.
Closes: #576
Summary by CodeRabbit