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] Text overflow on timeline #8325

Merged

Conversation

Hitarthsheth07
Copy link
Contributor

FIX: #6977

Implementation:

  1. Parent (Summary componenet) width is set to 100%. (dosen't grow even if the child exceeds width)
  2. span element is set to text-overflow: ellipses when overflown.

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 overflow issues in the timeline summary component by implementing proper width constraints and text truncation with ellipsis for long content.

  • Added width: 100% to StyledSummary in /packages/twenty-front/src/modules/activities/timeline-activities/components/EventRow.tsx to prevent container expansion
  • Implemented text truncation in /packages/twenty-front/src/modules/activities/timeline-activities/rows/activity/components/EventRowActivity.tsx with text-overflow: ellipsis and white-space: nowrap
  • Added overflow: hidden to prevent horizontal scrolling on long task titles and bodies

2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +19 to +22
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
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 adding max-width property to ensure the text doesn't push other elements out of position

@Bonapara
Copy link
Member

Bonapara commented Nov 5, 2024

Looking good! Can you check why some values are not taking the full width?

CleanShot 2024-11-05 at 14 55 59

@Hitarthsheth07
Copy link
Contributor Author

Hitarthsheth07 commented Nov 5, 2024

Is there a bug with the timeline? @Bonapara

https://www.loom.com/share/de72e092dc024af89e27f0ff2d334ae3?sid=2b14e0f7-4731-4e33-a584-b180942388f0

The timeline doesn't show changes in local setup too...

@Bonapara
Copy link
Member

Bonapara commented Nov 5, 2024

I had the same problem @Hitarthsheth07 but running the worker solved my issue: npx nx run twenty-server:worker

@Hitarthsheth07
Copy link
Contributor Author

I had the same problem @Hitarthsheth07 but running the worker solved my issue: npx nx run twenty-server:worker

Gotcha!

@Bonapara
Copy link
Member

Bonapara commented Nov 5, 2024

I had the same problem @Hitarthsheth07 but running the worker solved my issue: npx nx run twenty-server:worker

Gotcha!

Did it work?

@Hitarthsheth07
Copy link
Contributor Author

Hitarthsheth07 commented Nov 5, 2024

I had the same problem @Hitarthsheth07 but running the worker solved my issue: npx nx run twenty-server:worker

Gotcha!

Did it work?

Havent tried it yet! I'm travelling right now. Will get back to you in about an hour

But why is it not working on the demo site then?

@Hitarthsheth07
Copy link
Contributor Author

@Bonapara

The latest commit fix the problem you mentioned.

However, some components still overflows when the size shrinks...
Should I open a new issue for this?

https://www.loom.com/share/159d5c3a376641c2b162fecfbd116be0?sid=3184e459-38bd-43f0-84c8-699be4cdd7ae

@Bonapara
Copy link
Member

Bonapara commented Nov 7, 2024

Yes, please @Hitarthsheth07! Good observation

@Hitarthsheth07
Copy link
Contributor Author

Yes, please @Hitarthsheth07! Good observation

Sure, you can merge this if you want.

Copy link
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

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

Great thanks!

@FelixMalfait FelixMalfait enabled auto-merge (squash) November 8, 2024 13:45
@FelixMalfait FelixMalfait merged commit e3e6385 into twentyhq:main Nov 8, 2024
16 checks passed
Copy link

github-actions bot commented Nov 8, 2024

Thanks @Hitarthsheth07 for your contribution!
This marks your 5th PR on the repo. You're top 6% 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug 🐛 ]: Tasks with longer body overflows in Timeline summary
4 participants