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

Fix Table text wrapping #8683

Merged
merged 6 commits into from
Nov 26, 2024
Merged

Fix Table text wrapping #8683

merged 6 commits into from
Nov 26, 2024

Conversation

guillim
Copy link
Contributor

@guillim guillim commented Nov 22, 2024

As discovered during the last release, text fields in the table were wrapped. This PR fixes this unwanted behaviour

Current :
Screenshot 2024-11-22 at 14 17 42

Wanted :
One line ellipsed
Screenshot 2024-11-22 at 14 20 46

@guillim guillim self-assigned this Nov 22, 2024
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 fixes text wrapping behavior in tables by adding a wrap property across multiple components to ensure text displays in a single line with ellipsis instead of wrapping.

  • Added wrap property to GenericFieldContextType in /packages/twenty-front/src/modules/object-record/record-field/contexts/FieldContext.ts
  • Fixed inconsistent wrap settings: wrap: true in RecordInlineCell.tsx contradicts the PR's goal of preventing wrapping
  • Modified OverflowingTextWithTooltip in /packages/twenty-ui/src/display/tooltip/OverflowingTextWithTooltip.tsx to only wrap text when wrap, displayedMaxRows, and !isLabel are all true
  • Added wrap control to TextDisplay component with proper ellipsis handling
  • Potential conflict in SettingsDataModelFieldPreview.tsx between wrap: true and white-space: nowrap styles

9 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

@guillim guillim requested a review from Weiko November 22, 2024 14:00
@guillim guillim removed the -PR: wip label Nov 22, 2024
@twentyhq twentyhq deleted a comment from greptile-apps bot Nov 22, 2024
@twentyhq twentyhq deleted a comment from greptile-apps bot Nov 22, 2024
@guillim
Copy link
Contributor Author

guillim commented Nov 22, 2024

should be good now. Much more concise and clearer
Screenshot 2024-11-22 at 16 42 48 Screenshot 2024-11-22 at 16 43 05

Screenshot 2024-11-22 at 16 42 15

@charlesBochet charlesBochet merged commit 3159382 into main Nov 26, 2024
19 checks passed
@charlesBochet charlesBochet deleted the fix-wrap-text branch November 26, 2024 16:58
Copy link

Thanks @guillim for your contribution!
This marks your 10th PR on the repo. You're top 3% 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: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants