Skip to content

Conversation

@achalcipher
Copy link

@achalcipher achalcipher commented Dec 13, 2025

Fix mobile responsiveness: prevent GitHub link horizontal overflow

TEAM NULL

Problem:
The long GitHub link (github.com/StabilityNexus/StableViewpoints) in the
"Go to our repository" section was causing horizontal overflow on mobile devices,
breaking the mobile layout.

Solution:

  • Added .repo-link-box CSS class with overflow-wrap: break-word to the
    paragraph containing the GitHub link
  • Applied media query targeting screens ≤768px (mobile/tablets)
  • Added word-break and word-wrap fallbacks for cross-browser compatibility

Changes:

  • app/submit/page.tsx: Added repo-link-box class to the link container
  • app/globals.css: Added responsive CSS rule to wrap long text on small screens

Result:
The GitHub link now wraps across multiple lines on mobile instead of
causing horizontal scroll, improving mobile UX.

Summary by CodeRabbit

Style

  • Enhanced text wrapping for repository links on small screens to improve readability on mobile devices.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 13, 2025

Walkthrough

The changes add responsive CSS styling to fix text overflow on mobile devices by applying word-wrapping rules to the .repo-link-box class on small screens, and apply this class to the repository link paragraph in the Submit page. Both changes are purely presentational with no impact on functionality.

Changes

Cohort / File(s) Summary
Mobile Text Wrapping Fix
app/globals.css, app/submit/page.tsx
Added responsive media query (max-width: 768px) with word-wrap and word-break properties to .repo-link-box class; applied the class to the repository link paragraph element for mobile compatibility

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

These are straightforward styling-only changes with no logic modifications or control flow impact. The additions are minimal and follow a simple pattern for responsive design.

Possibly related issues

  • Repo Link Not Responsive on Mobile Devices #37: The PR directly implements the responsive .repo-link-box class with text wrapping rules to fix mobile overflow issues on the Submit page, addressing the exact problem described in the issue.

Poem

🐰 A hop through styles, so neat and tidy,
Words wrap kindly on screens that are widey—
No more text breaks, no more dismay,
Small screens rejoice in every way! 📱✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically identifies the main change: fixing mobile layout overflow caused by a long GitHub repository link, and references the related issue number.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/submit/page.tsx (1)

186-186: Consider using Tailwind utility classes instead of custom CSS.

The repo-link-box class addition works correctly and solves the mobile overflow issue. However, since the project uses Tailwind CSS, you could achieve the same result with built-in utility classes and eliminate the need for custom CSS in globals.css.

Apply this diff to use Tailwind utilities:

-                  <p className="text-gray-700 repo-link-box">
+                  <p className="text-gray-700 max-md:break-words">

This applies break-words only on screens smaller than md (768px), matching your media query breakpoint. If you prefer this approach, you can remove the corresponding CSS block from globals.css (lines 96-102).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 113d28d and 428bd6c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • app/globals.css (1 hunks)
  • app/submit/page.tsx (1 hunks)

Comment on lines +96 to +102
@media (max-width: 768px) {
.repo-link-box {
overflow-wrap: break-word;
word-break: break-word;
word-wrap: break-word;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Replace deprecated word-break: break-word with standard properties.

The media query correctly targets mobile devices and solves the overflow issue. However, Line 99 uses word-break: break-word, which is a deprecated/non-standard value that was removed from the CSS specification.

Apply this diff to use only standard properties:

 @media (max-width: 768px) {
   .repo-link-box {
     overflow-wrap: break-word;
-    word-break: break-word;
     word-wrap: break-word;
   }
 }

The combination of overflow-wrap: break-word (modern) and word-wrap: break-word (legacy fallback) provides the same functionality with better cross-browser compatibility using standard properties only.

🤖 Prompt for AI Agents
In app/globals.css around lines 96 to 102, the rule uses the non‑standard value
"word-break: break-word"; remove that property and rely on the standard
combination of "overflow-wrap: break-word" plus the legacy fallback "word-wrap:
break-word" inside the media query to achieve the same behavior with proper
cross‑browser compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant