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

feat: optionally prioritize new toasts #2673

Conversation

HenryMBaldwin
Copy link
Contributor

@HenryMBaldwin HenryMBaldwin commented May 18, 2024

Description

Added prioritizeNew prop to Toast.svelte to allow enabling/disabling prioritizing newer toasts when the total number of toasts exceed the maximum. Currently older toasts are prioritized, and this is still the stock behavior as the prop defaults to false.

Changsets

Instructions: Changesets automate our changelog. If you modify files in /packages, run pnpm changeset in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should be minor while chores and bugfixes should be patch. Please prefix the changeset message with feat:, bugfix: or chore:.

Checklist

Please read and apply all contribution requirements.

  • This PR targets the dev branch (NEVER master)
  • Documentation reflects all relevant changes
  • Branch is prefixed with: docs/, feat/, chore/, bugfix/
  • Ensure Svelte and Typescript linting is current - run pnpm ci:check
  • Ensure Prettier linting is current - run pnpm format
  • All test cases are passing - run pnpm test
  • Includes a changeset (if relevant; see above)

…itized if total number of toasts is greater than max. Older toasts are not automatically dismissed though, just not visible unless the newer toasts dissapear first.
Copy link

changeset-bot bot commented May 18, 2024

🦋 Changeset detected

Latest commit: 6e97cb6

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

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/skeleton Minor

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

Copy link

vercel bot commented May 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
skeleton-docs ⬜️ Ignored (Inspect) Visit Preview May 18, 2024 4:13am

Copy link

vercel bot commented May 18, 2024

@HenryMBaldwin is attempting to deploy a commit to the Skeleton Labs Team on Vercel.

A member of the Team first needs to authorize it.

@HenryMBaldwin HenryMBaldwin changed the title Feat: optionally prioritize new toasts feat: optionally prioritize new toasts May 18, 2024
@endigo9740
Copy link
Contributor

endigo9740 commented Jun 7, 2024

@HenryMBaldwin first off sorry for the long delay on this one. We've been snowed in with our pre-release prep and launches of Skeleton v3 and Floating UI Svelte.

I actually think this is a very interesting feature, and you've done a great job of following our contribution guidelines, so thanks for that. I can definitely see the appear of this feature, however, I'm cautious of adding new features this late in v2's lifecycle. As such I'm going to recommend we do the following:

  1. I'm going to close out this PR without moving forward for now
  2. I've already noted this concept for consideration in the pending v3 milestone issue for overlay systems
  3. Then we will evaluate and find a means to implement this in a systematic manner for v3

The v3 overlay system will see us combining toasts/drawers/modals under a singular system so they can have a consistent set of features. This has a number of positive implications for users. The result will be we can add your feature once, and it'll be available for all three!

Again, I appreciate the contribution and please do look forward to a version of this feature coming in the future.

Thanks again,
Chris

@endigo9740 endigo9740 closed this Jun 7, 2024
@endigo9740 endigo9740 mentioned this pull request Oct 21, 2024
5 tasks
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.

2 participants