GetJobber / atlantis

🔱 Atlantis
https://atlantis.getjobber.com
MIT License
25 stars 30 forks source link

feat(components): De-dupe `Toast` by implementing an `id` prop #1991

Open timoteialbu opened 1 month ago

timoteialbu commented 1 month ago

Motivations

Wanted to prevent a Toast from appearing multiple times if the page re-renders. Change the id type that already existed to a string so that we can have more freedom in terms of what it can be. Was worried that allowing it to be a number might lead to collisions with the incremental toastKey state we had as its likely someone would use 1 or something as the id, which would be the same as auto generated one.

Changes

Added

In Atlantis we use Github's built in pull request reviews.

Random photo of Atlantis

github-actions[bot] commented 1 month ago

Published Pre-release for 72cf4e5ca081b4e8c145b0ee0b6b43b656fd967d with versions:

  - @jobber/components@5.24.1-JOB-102528-72cf4e5.2+72cf4e5c

To install the new version(s) for Web run:

npm install @jobber/components@5.24.1-JOB-102528-72cf4e5.2+72cf4e5c
cloudflare-workers-and-pages[bot] commented 1 month ago

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 72cf4e5
Status: âœ…  Deploy successful!
Preview URL: https://6ced5bb1.atlantis.pages.dev
Branch Preview URL: https://job-102528-dedupe-toast.atlantis.pages.dev

View logs