Fix modal overflow and improve responsiveness on on small screens of contribute page#3392
Conversation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughRefactors Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 3
🤖 Fix all issues with AI agents
In `@frontend/src/components/Modal.tsx`:
- Around line 73-84: The h2 with id "modal-title" (and the modal body elements
around the other two occurrences) uses a nonstandard Tailwind class
`overflow-wrap-anywhere`; remove that invalid class or replace it with a valid
Tailwind arbitrary utility `overflow-wrap-[anywhere]` (or keep the existing
`break-words` if sufficient), or alternatively define a custom utility in
tailwind.config.js named e.g. `overflow-wrap-anywhere` and use that; update the
className strings in the Modal component (the h2 and the two body sections)
accordingly.
- Around line 133-151: There is a duplicate separator between the modal body and
footer: a manual divider div (the element with className "mx-5 h-px bg-gray-300
dark:bg-gray-700") and a top border applied via the ModalFooter className
(contains "border-t border-gray-200 dark:border-gray-700"); fix by removing one
of them—either delete the manual divider div to keep the footer border, or
remove "border-t border-gray-200 dark:border-gray-700" from the ModalFooter
className so the single manual divider remains.
- Around line 37-58: The Modal contains invalid/duplicate Tailwind classes:
replace the nonstandard backdrop-blur-xs in the Modal's classNames.base with a
valid utility such as backdrop-blur-sm/backdrop-blur/backdrop-blur-md (or remove
it) and replace every usage of overflow-wrap-anywhere (found in ModalContent and
other places) with the correct Tailwind utilities break-words or break-all as
appropriate; also remove the duplicated max-h constraints (max-h-[100vh] and
sm:max-h-[90vh]) from either classNames.base or the ModalContent className so
the max-height appears in only one location.
🧹 Nitpick comments (1)
frontend/src/components/Modal.tsx (1)
158-181: Buttonvariant="ghost"contradicts the solid background styling.The
variant="ghost"typically renders a transparent/text-only button, but the className applies solid background colors (bg-gray-600,dark:bg-gray-700). While the styles will apply, this is semantically inconsistent. Consider usingvariant="solid"to match the visual intent:<Button - variant="ghost" + variant="solid" onPress={onClose}
|
kasya
left a comment
There was a problem hiding this comment.
@Isha-upadhyay this looks great, thank you! 👍🏼
frontend/src/components/Modal.tsx
Outdated
There was a problem hiding this comment.
Please run make check-test next time - we don't wrap classes like this and our linters would have picked this up and updated the formatting.
I'll push a change to update this 👌🏼
There was a problem hiding this comment.
I did run make check-test locally and the relevant frontend checks passed.
The failures I saw were limited to YAML / line-ending related hooks (CRLF vs LF) which are environment-specific and unrelated to the modal UI change, so I didn’t include them in this PR.



Proposed change
Resolves #3369
This PR fixes an issue on the OWASP Nest Contributor page where the “Read more” dialog overflowed the viewport on mobile and small screen devices, making content difficult to read and interact with.
What was changed
Why this change
On smaller screens, the dialog content exceeded the viewport height, causing text and actions to be cut off.
This update ensures the modal remains readable and accessible on mobile devices while preserving the existing desktop experience.
Screenshots
Testing
Checklist