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(pie-toast): DSW-000 truncate text with css #2093

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

raoufswe
Copy link
Member

@raoufswe raoufswe commented Nov 22, 2024

Describe your changes (can list changeset entries if preferable)

  • To truncate text in CSS, we typically need a specified width for the container to determine when truncation should happen. Currently, we use JavaScript in pie-toast to calculate the container's width and various action widths to ensure proper text truncation.
  • This PR simplifies the solution using a CSS flexbox trick that allows text truncation without knowing the exact container width, as shown in this CodePen (Demo 3b).
  • Updates the readme file for toast and notification to point to the docs site (cleanup)

Author Checklist (complete before requesting a review)

  • I have performed a self-review of my code
  • I have added thorough tests where applicable (unit / component / visual)
  • I have reviewed the PIE Storybook/PIE Docs PR preview
  • I have reviewed visual test updates properly before approving
  • If changes will affect consumers of the package, I have created a changeset entry.

Reviewer checklists (complete before approving)

Reviewer 1 - @fernandofranca

  • I have reviewed the PIE Storybook/PIE Docs PR preview
  • If there are visual test updates, I have reviewed them

Reviewer 2

  • I have reviewed the PIE Storybook/PIE Docs PR preview
  • If there are visual test updates, I have reviewed them

Copy link

changeset-bot bot commented Nov 22, 2024

🦋 Changeset detected

Latest commit: 43dd6c5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@justeattakeaway/pie-toast Patch
pie-storybook Patch
@justeattakeaway/pie-webc Patch
wc-angular12 Patch
wc-nuxt2 Patch
wc-react17 Patch
wc-react18 Patch
wc-vue3 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@raoufswe raoufswe marked this pull request as ready for review November 22, 2024 14:51
@raoufswe raoufswe requested review from a team as code owners November 22, 2024 14:51
@raoufswe raoufswe merged commit fed802c into main Nov 22, 2024
61 of 65 checks passed
@raoufswe raoufswe deleted the dsw-000-truncate-text-toast-css branch November 22, 2024 15:59
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.

3 participants