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

Rework Toast architecture #576

Closed
4 tasks done
hrach opened this issue Nov 8, 2023 · 0 comments
Closed
4 tasks done

Rework Toast architecture #576

hrach opened this issue Nov 8, 2023 · 0 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@hrach
Copy link
Contributor

hrach commented Nov 8, 2023

Current Toast architecture is not sufficient and we need to evolve it more to support our use case.
To do so, this issue describes many gradual steps to make this happen. The goal is:

The implementation should be the following (each own PR):

  • introduce a new "OrbitIcons" enum that has generated all the "fields" for every icon; introduce an extension function that maps the enum to Painter. (modify :generator module and generate those classes)
  • change the Toast implementation to take the Enum and introduce saver; introduce rememberToastState() function
  • add functionality for "toast action"; rework the architecture, remove the suspending function for showing toast and expose an action listener on the ToastState; make ToastData open to allow creating custom implementations. (you can be inspired by the material's Snackbar, but they solve the action differently than we want to solve it)
  • discover and consider how the rendering of Photo would work inside a Toast, we may want to have a Toast implementation that has a slot for photos, yet we don't want to introduce a dependency on the Image loading library. The toast with the photo has different metrics; consider having more slotting API for allowing a custom test tag.

obrazek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants