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

NEXT: Toast Component #2884

Closed
5 tasks
endigo9740 opened this issue Oct 21, 2024 · 3 comments
Closed
5 tasks

NEXT: Toast Component #2884

endigo9740 opened this issue Oct 21, 2024 · 3 comments
Assignees
Labels
React - Incomplete The React portion of this feature is incomplete Svelte - Incomplete The Svelte portion of this feature is incomplete
Milestone

Comments

@endigo9740
Copy link
Contributor

endigo9740 commented Oct 21, 2024

Zag Integration

Maintainer Requests

The following requests are coming straight from the Skeleton team. These are highly likely be implemented:

  • Should implement all relevant Zag features
  • Should aim for feature parity with v2 component
  • Consider support for dynamic components for rich media display
  • Consider support for progress bars showing display time remaining
  • Consider a fixed option to use as a GDPR cookies banner

Community Requests

The following requests have come from the community and are under consideration:

Feedback

If you have additional updates or requests for this feature, please do so in the comments section below.

@endigo9740 endigo9740 added this to the v3.0 (Next) milestone Oct 21, 2024
@endigo9740 endigo9740 self-assigned this Oct 21, 2024
@endigo9740 endigo9740 pinned this issue Oct 21, 2024
@endigo9740 endigo9740 added Svelte - Incomplete The Svelte portion of this feature is incomplete React - Incomplete The React portion of this feature is incomplete labels Oct 21, 2024
@endigo9740 endigo9740 mentioned this issue Oct 24, 2024
12 tasks
@endigo9740
Copy link
Contributor Author

endigo9740 commented Oct 28, 2024

Note that I've followed up with the Zag team regarding a few issues with this component:

  1. Currently there's no obvious and/or available type for <Toast> and <ToastProvider> components.
  2. There's a visual glitch if you create toasts in multiple positions quickly
  3. It's possible to set an action.label (button label), but not currently possible to retrieve it from the template API
  4. Finally, the overlap: true option is not working. The Zag docs do not provide the required CSS styles.

Depending on how quickly they respond and what they say, we may have to pause and return to this feature a later time. If they can at least provide the proper types, we can likely build an initial version using a subset of features.

Keep an eye on this post and the PR for further updates.

@endigo9740
Copy link
Contributor Author

endigo9740 commented Oct 31, 2024

I've talked with the Zag team and they have noted the issues at hand with the Toast component, but my assumption is it won't be a quick turnaround. After reviewing with the Skeleton team, we need a solution for now, so I'm going to pivot to a third party integration using the following:

These seems like fully featured solutions, with tons of options, and support for Tailwind styling.

I'll begin by creating proofs of concept. If that goes well I'll proceed with the full integration guides. The goal being to have these completed before the Beta release next Tuesday.

In the future, we're happy to revisit the Zag component once improvements are in place. If we feel it meets our expectations we may replace our integration guide with that component.

@endigo9740
Copy link
Contributor Author

endigo9740 commented Oct 31, 2024

On more quick update - the react-hot-toast library is working great. It's super mature and well documented. Feature-wise it seems to do everything we need it to do.

Unfortunately svelte-french-toast isn't quite there. The docs and features are lacking, it's currently using Svelte 4, and the project itself seems all but abandoned. It's not received updates in nearly a year, even though there appears to be a community-led effort to update and maintain it.

For now, we're going to roll our own custom Toast component specifically for Svelte users. This will mirror the Zag APIs in the hopes we can swap it out with the Zag version in a future release. When that happens, it should remain backwards compatible, but receive a plethora of new features. As such, we'll label the current version with a [beta] tag to indicate this one is still in flux and subject to breaking changes.

@endigo9740 endigo9740 unpinned this issue Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
React - Incomplete The React portion of this feature is incomplete Svelte - Incomplete The Svelte portion of this feature is incomplete
Projects
None yet
Development

No branches or pull requests

1 participant