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

fixed ellipsis for calendar events #9823

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

Lucifer4255
Copy link
Contributor

Fixed Missing ellipsis for long calendar event names #5267 introducing width for the title

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 implements ellipsis handling for calendar event titles to prevent text overflow and improve UI consistency.

  • Added text truncation in packages/twenty-front/src/modules/activities/calendar/components/CalendarEventRow.tsx with text-overflow: ellipsis and white-space: nowrap
  • Set fixed width of 10 spacing units for event titles which may need adjustment to prevent overly aggressive truncation
  • Maintained clickable behavior for event titles while showing truncation indicator for long text

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

overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: ${({ theme }) => theme.spacing(10)};
Copy link
Contributor

Choose a reason for hiding this comment

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

style: width: theme.spacing(10) seems very restrictive for a title. Consider using a larger value or making it responsive based on container width.

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.

@Lucifer4255 thanks for raising a PR. This does not seem to be the right fix, why are we forcing width: 40px? (which is what theme.spacing(10) will do)

Could you check with different title length and on different window size and provide screenshots?

I would recommend a flex approach here but it might be a bit tricky

@Lucifer4255
Copy link
Contributor Author

@charlesBochet I tried with a flex approach at first but the main thing with text overflow is to ensure the containers are taking certain width but the title is not taking its parent width even if i used inherit but when i introduced a certain value whether its been 10 or 40 spacing the text got its ellipsis even if i vary window size
Screencast from 2025-01-23 23-15-51.webm

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.

It actually works, my mistake!

Thanks a lot @Lucifer4255

@charlesBochet charlesBochet merged commit 3c85516 into twentyhq:main Jan 24, 2025
45 checks passed
Copy link

Fails
🚫

node failed.

Log

�[31mError: �[39m SyntaxError: Unexpected token C in JSON at position 0
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:5555:27)�[39m
�[90m    at fullyReadBody (node:internal/deps/undici/undici:1665:9)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)�[39m
�[90m    at async specConsumeBody (node:internal/deps/undici/undici:5564:7)�[39m
danger-results://tmp/danger-results-5f70730c.json

Generated by 🚫 dangerJS against 0fd3f44

DeepaPrasanna pushed a commit to DeepaPrasanna/twenty that referenced this pull request Jan 27, 2025
Fixed Missing ellipsis for long calendar event names twentyhq#5267 introducing
width for the title

Co-authored-by: Charles Bochet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants