-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix:Custom Status text wrap #6776 #6778
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: develop
Are you sure you want to change the base?
fix:Custom Status text wrap #6776 #6778
Conversation
WalkthroughAdds optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 |
|
@Rohit3523 @diegolmello can you review my PR and let me any further modifications needed in this |
|
Hey @Rohit3523 , one of the tests failed in the CI run. Could you please help me check what might be causing it? |
Update the storybook snap using |
ok, I will check and update it |
|
@Rohit3523 @diegolmello can anyone review the PR and let me know any changes required |
|
I think it will also truncate other list items, can you please test this case |
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 (1)
app/containers/List/ListItem.tsx (1)
68-68: Refine theellipsizeModetype for better type safety.The
as anycast on line 77 indicates a type mismatch. React Native'sTextcomponent expectsellipsizeModeto be'head' | 'middle' | 'tail' | 'clip', but it's currently typed asstringinIListItemContent(line 110).Apply this diff to improve type safety:
In IListItemContent interface (line 110):
numberOfLines?: number; - ellipsizeMode?: string; + ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';In ListTitle component (line 77):
<Text numberOfLines={numberOfLines} - ellipsizeMode={ellipsizeMode as any} + ellipsizeMode={ellipsizeMode} style={[styles.title, styleTitle, { color: color || colors.fontDefault }]}>Also applies to: 75-78
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
app/containers/List/ListItem.tsx(4 hunks)app/views/SidebarView/components/CustomStatus.tsx(1 hunks)
🔇 Additional comments (3)
app/views/SidebarView/components/CustomStatus.tsx (1)
75-76: LGTM! Fix correctly addresses the issue.The addition of
numberOfLines={1}andellipsizeMode='tail'properly constrains the custom status text to a single line with ellipsis truncation, resolving the layout issue reported in #6776.app/containers/List/ListItem.tsx (2)
65-66: LGTM! Interface correctly extended.The interface properly picks the new
numberOfLinesandellipsizeModeprops fromIListItemContent.
132-134: LGTM! Props correctly threaded through the component.The
numberOfLinesandellipsizeModeprops are properly destructured and forwarded toListTitle. The optional nature of these props ensures backward compatibility with existing usage.Also applies to: 176-185
|
@Rohit3523 made changes such that it only truncates particular status list item |
Proposed changes
This PR fixes a UI issue where the Custom Status text in the sidebar would overflow or wrap into multiple lines, causing layout misalignment.
The fix ensures that the status message is truncated with ellipsis (
...) when it exceeds a single line, maintaining a clean and consistent sidebar layout across all devices and themes.Issue(s)
Closes #6776
How to test or reproduce
...at the end.Screenshots
Types of changes
Checklist
Summary by CodeRabbit
Bug Fixes
New Features
✏️ Tip: You can customize this high-level summary in your review settings.