Skip to content
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

Merged
merged 5 commits into from
Dec 11, 2024
Merged

Title overflow #9009

merged 5 commits into from
Dec 11, 2024

Conversation

guillim
Copy link
Contributor

@guillim guillim commented Dec 10, 2024

fix #8803

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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' in packages/twenty-ui/src/display/chip/components/Chip.tsx for better text alignment
  • Added width: inherit to StyledContainer in Chip component to support proper text truncation
  • Introduced new linkWidth prop in packages/twenty-ui/src/display/chip/components/AvatarChip.tsx with conditional width-constrained rendering
  • Set fixed linkWidth={150} in RecordIndexRecordChip 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}
Copy link
Contributor

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.

@guillim guillim marked this pull request as draft December 10, 2024 16:15
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 to RecordIdentifierChip in RecordBoardCard.tsx to enforce consistent truncation
  • Modified StyledContainer in Chip.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

@@ -106,14 +108,15 @@ export const AvatarChip = ({
clickable={isDefined(onClick) || isDefined(to)}
onClick={to ? undefined : onClick}
Copy link
Contributor

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.

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

LGTM!

@guillim guillim merged commit 89f6f32 into main Dec 11, 2024
19 checks passed
@guillim guillim deleted the title-overflow branch December 11, 2024 10:37
Copy link

Thanks @guillim for your contribution!
This marks your 23rd PR on the repo. You're top 2% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

Long task names overflow the task container UI and are not selectable in multi-select mode
3 participants