-
Notifications
You must be signed in to change notification settings - Fork 176
fix: truncate long URLs with ellipsis #273
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
WalkthroughAdds single-line truncation and inline-block layout to two selectors in index.css. For main and #ring a, sets display: inline-block, max-width: calc(100% - 35px), white-space: nowrap, overflow: hidden, text-overflow: ellipsis, and vertical-align: bottom. No other selectors are changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type 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)
index.css (2)
97-102: Consider display:block + width:100% to avoid magic numbers and expand the clickable area.Using inline-block with max-width: calc(100% - 35px) relies on a hard-coded 35px that may drift as surrounding spacing changes. A block-level link with width: 100% avoids the magic number, typically makes the entire row clickable, and simplifies layout across column-count breakpoints.
Suggested tweak within this hunk:
- display: inline-block; - max-width: calc(100% - 35px); + display: block; + width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - vertical-align: bottom; + box-sizing: border-box;And, because width: 100% plus the current negative margins can overflow, consider adjusting the margin outside this hunk (Line 92):
- margin: -3px; + margin: 0;Net effect:
- Removes the 35px “magic number.”
- Ensures the highlight/background and hit target span the full list width.
- Keeps truncation behavior intact across all breakpoints.
97-102: Sanity-check across breakpoints and focus states.
- Verify truncation at viewport widths that change column-count (≥960, ≥1200, ≥1400, ≥1600, ≥1800px) to ensure no unexpected wrapping/overflow.
- Confirm that “current/target” styles (#ring li[data-current] a, #ring li:target a) still render backgrounds as intended with truncation.
- If you later introduce custom focus styles (e.g., box-shadow), note that overflow: hidden can clip shadows; prefer outline for focus rings to avoid clipping.
If helpful, I can open a follow-up to add a :focus-visible style and/or a tooltip pattern so the full URL remains discoverable when truncated.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
index.css(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (1)
index.css (1)
97-102: Ellipsis fix is on point for long URLs.The combination of white-space: nowrap, overflow: hidden, and text-overflow: ellipsis will correctly truncate overly long anchors. Good targeted change.
dtinth
left a 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.
Thanks krub, @lalkai!
Hi, I came across this small UI bug on your website by chance and wanted to help fix it.
This pull request applies a CSS fix to truncate overly long URLs with an ellipsis (...) so they don’t overflow outside the container.
If this change is not needed, feel free to close this PR.
Before

After

Summary by CodeRabbit