Repository navigation
Fix for issue #307 - Announcement modal height restriction - #328
Conversation
…ents to ensure responsiveness
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughReworks the Announcement modal layout: introduces an outer flex column with max-height, an inner scrollable content region (overflowY: auto) with a negative top offset to align PrettyIcon, and moves the action buttons outside the inner scroll area but inside the outer container. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/Announcement.tsx`:
- Around line 118-121: The container div in Announcement.tsx currently uses a
global negative margin ("margin: '-1rem'") to offset PrettyIcon's top negative
margin, which affects all sides; update the inline style on that div to apply
the negative offset only to the top (e.g., replace the blanket margin with a
top-only margin property such as marginTop: '-1rem' while preserving padding and
other style properties) so horizontal overflow/edge clipping is avoided and the
intent in the comment (offset PrettyIcon's top margin) is honored.
| <div style={{ maxHeight: '85vh', display: 'flex', flexDirection: 'column', gap: '1.5rem' }}> | ||
| {/* Note: the negative margin on the container is to offset the negative margin top of PrettyIcon class.*/} | ||
| <div | ||
| style={{ overflowY: 'auto', flex: '1 1 auto', minHeight: 0, margin: '-1rem', padding: '1rem 1rem 0 1rem' }} |
There was a problem hiding this comment.
| style={{ overflowY: 'auto', flex: '1 1 auto', minHeight: 0, margin: '-1rem', padding: '1rem 1rem 0 1rem' }} | |
| style={{ overflowY: 'auto', flex: '1 1 auto', minHeight: 0, marginTop: '-1rem', padding: '1rem 1rem 0 1rem' }} |
| </FlexCol> | ||
| </FlexCol> | ||
| </div> | ||
| <FlexCol gap='0.25rem' style={{ flex: '0 0 auto' }}> |
There was a problem hiding this comment.
| <FlexCol gap='0.25rem' style={{ flex: '0 0 auto' }}> | |
| <FlexCol gap='0.25rem'> |
FlexCol has no style attribute
|
also please solve conflicts @andcachia |
Issue:
On laptop sized screens, the height of the announcement modal is exceeding the height of the viewport. This renders the user unable to click the button to proceed.
Resolution:
The modal height is restricted to 85vh, with the body content scrollable whilst both buttons remain fixed to the bottom of the modal, viewable at all time.
NOTES:
-1rem marginis to offset the-1rem Margin Topparameter in thePrettyIcon class, as was leaving a gap between the icon image and topmost div border.Summary by CodeRabbit