-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Title overflow #9009
Title overflow #9009
Conversation
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.
PR Summary
This PR modifies the Chip and AvatarChip components to fix task name overflow issues, ensuring proper text truncation and accessibility of UI elements like select boxes in the Kanban board view.
- Changed
justify-content
from 'center' to 'flex-start' inpackages/twenty-ui/src/display/chip/components/Chip.tsx
for better text alignment - Added
width: inherit
toStyledContainer
in Chip component to support proper text truncation - Introduced new
linkWidth
prop inpackages/twenty-ui/src/display/chip/components/AvatarChip.tsx
with conditional width-constrained rendering - Set fixed
linkWidth={150}
inRecordIndexRecordChip
component for consistent truncation behavior - Added
StyledLinkWidthForced
component in AvatarChip for width-constrained scenarios
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
@@ -37,6 +37,7 @@ export const RecordIdentifierChip = ({ | |||
LeftIcon={LeftIcon} | |||
LeftIconColor={LeftIconColor} | |||
size={size} | |||
linkWidth={150} |
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.
style: Consider making linkWidth configurable via props rather than hardcoding to 150px. Different contexts may need different widths.
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.
PR Summary
(updates since last review)
This PR continues the work on fixing task name overflow issues in the Kanban board by implementing maxWidth constraints across the component hierarchy.
- Added
maxWidth={150}
prop toRecordIdentifierChip
inRecordBoardCard.tsx
to enforce consistent truncation - Modified
StyledContainer
inChip.tsx
to properly handle maxWidth with padding calculations - Added maxWidth prop support to
AvatarChip
component for proper overflow handling - Ensured maxWidth propagates through component hierarchy from
RecordIndexRecordChip
to child components
4 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
...ront/src/modules/object-record/record-board/record-board-card/components/RecordBoardCard.tsx
Show resolved
Hide resolved
@@ -106,14 +108,15 @@ export const AvatarChip = ({ | |||
clickable={isDefined(onClick) || isDefined(to)} | |||
onClick={to ? undefined : onClick} |
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.
logic: onClick handler is passed twice - both to StyledLink and Chip when 'to' is defined. This could cause the handler to fire twice.
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.
LGTM!
Thanks @guillim for your contribution! |
fix #8803