-
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
line breaks in tooltips & text #8783
Conversation
2 - line breaks for tooltips and text wrapped
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 enhances text display functionality by implementing proper line breaks in tooltips and text wrapping, while cleaning up unused variables across components.
- Added
white-space: pre-wrap
styling inpackages/twenty-ui/src/display/tooltip/OverflowingTextWithTooltip.tsx
to preserve line breaks - Added
<Styledpre>
component inOverflowingTextWithTooltip
for proper multiline tooltip formatting - Removed unused
isLabel
andallowDisplayWrap
props fromOverflowingTextWithTooltip
component - Added
isTooltipMultiline={true}
inpackages/twenty-front/src/modules/ui/field/display/components/TextDisplay.tsx
- Modified text wrapping behavior with
-webkit-line-clamp
and-webkit-box-orient
for better overflow handling
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
}: { | ||
size?: 'large' | 'small'; | ||
text: string | null | undefined; | ||
isTooltipMultiline?: boolean; | ||
displayedMaxRows?: number; | ||
isLabel?: boolean; | ||
allowDisplayWrap?: boolean; | ||
}) => { | ||
const textElementId = `title-id-${+new Date()}`; |
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: Using timestamp for ID generation can cause duplicate IDs if multiple tooltips are created in the same millisecond. Consider using a more reliable unique ID generation method.
fixes #8770 |
Also added the request from @Bonapara to align the top the copy/paste button (before was middle aligned |
Thanks @guillim for your contribution! |
This feature goal is to :
1 - clean variables not used any longer
2 - add line breaks for tooltips and text wrapped
Request From @Bonapara