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(lemon-ui): fix lemon toast overflow #19391

Merged
merged 23 commits into from
Dec 20, 2023
Merged

Conversation

thmsobrmlr
Copy link
Contributor

@thmsobrmlr thmsobrmlr commented Dec 18, 2023

Problem

One of our most common error toasts has an overflow issue:
image

Changes

This PR fixes the issue and adds the toast to Storybook. I couldn't convince Storybook to capture them correctly though...

Screenshot 2023-12-19 at 14 37 41

How did you test this code?

👀

Copy link
Contributor

github-actions bot commented Dec 18, 2023

Size Change: +9.3 kB (0%)

Total Size: 2 MB

Filename Size Change
frontend/dist/toolbar.js 2 MB +9.3 kB (0%)

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@thmsobrmlr thmsobrmlr mentioned this pull request Dec 18, 2023
98 tasks
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@thmsobrmlr thmsobrmlr marked this pull request as ready for review December 19, 2023 13:41
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

3 snapshot changes in total. 0 added, 3 modified, 0 deleted:

  • chromium: 0 added, 3 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@thmsobrmlr thmsobrmlr requested a review from a team December 19, 2023 18:43
Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

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

Small nit but otherwise great

@@ -44,7 +44,7 @@ export interface ToastContentProps {
export function ToastContent({ type, message, button, id }: ToastContentProps): JSX.Element {
return (
<div className="flex items-center" data-attr={`${type}-toast`}>
<span className="grow">{message}</span>
<span className="grow overflow-hidden text-ellipsis">{message}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

text-ellipsis won't do anything without whitespace-nowrap right? (the truncate util contains all this but not sure if we actually want this as then it would only be one line...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm it adds the "..." at the end of the text.

With:
Screenshot 2023-12-20 at 16 22 25

Without:
Screenshot 2023-12-20 at 16 22 40

We do want more than one line :)

@thmsobrmlr thmsobrmlr merged commit a8fc6ec into master Dec 20, 2023
80 checks passed
@thmsobrmlr thmsobrmlr deleted the lemon-toast-overflow branch December 20, 2023 15:23
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.

3 participants