-
Notifications
You must be signed in to change notification settings - Fork 487
feat(ui): improve text overflow handling in breadcrumbs #2601
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
base: main
Are you sure you want to change the base?
feat(ui): improve text overflow handling in breadcrumbs #2601
Conversation
WalkthroughUpdated Breadcrumbs.svelte to use text-ellipsis for overflow styling and added title attributes with translated labels to crumb elements (last item, link, and non-link variants). Rendering logic and event handling remain unchanged; no public API changes. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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. 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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte
(3 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). (6)
- GitHub Check: build_enterprise_frontend
- GitHub Check: build_community_frontend
- GitHub Check: startup-docker-compose-test
- GitHub Check: enterprise-startup-docker-compose-test
- GitHub Check: startup-functional-test (3.12)
- GitHub Check: enterprise-startup-functional-test (3.12)
class="max-w-[64ch] overflow-hidden text-ellipsis text-sm text-gray-500 font-semibold antialiased" | ||
data-testid="crumb-item" | ||
title={safeTranslate(c.label)} | ||
> |
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.
Restore whitespace-nowrap
so ellipsis actually shows.
Replacing Tailwind’s truncate
helper removed the implicit whitespace-nowrap
. On these two <span>
branches we now set overflow-hidden
+ text-ellipsis
without preventing wrapping, so long labels will wrap onto a second line instead of being trimmed, defeating the PR’s goal. Please add whitespace-nowrap
back to both span class lists.
- class="max-w-[64ch] overflow-hidden text-ellipsis text-sm text-gray-500 font-semibold antialiased"
+ class="max-w-[64ch] overflow-hidden whitespace-nowrap text-ellipsis text-sm text-gray-500 font-semibold antialiased"
@@
- <span
- class="max-w-[64ch] overflow-hidden text-ellipsis text-sm text-gray-500 font-semibold antialiased"
+ <span
+ class="max-w-[64ch] overflow-hidden whitespace-nowrap text-ellipsis text-sm text-gray-500 font-semibold antialiased"
Also applies to: 81-84
🤖 Prompt for AI Agents
In frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte around lines 55-58
(and also apply the same change to lines 81-84), the span class lists include
overflow-hidden and text-ellipsis but no whitespace-nowrap, so long labels wrap
instead of being truncated; add the Tailwind class whitespace-nowrap to both
span class attributes so the ellipsis behavior works as intended and long labels
stay on a single truncated line.
…e remaining text
Summary by CodeRabbit
New Features
Style