Solution for the clipboard restriction in safari (can only use clipboard in a direct response to a user gesture, no fetching in-between).
Instead of fetching/generating the invite link and then trying to write to clipboard, we render a textinput showing the link with a copy button. Tested in Safari.
Other changes
Implemented a global snackbar component
Needed because rendering inside the Drawer component made so that the snackbar was rendering under the ShellAppBar, despite its z-index being higher. So instead of rendering just one level above the Drawer I decided to implement it at Layout level, in ShellRootLayout, and provide a hook so any component can trigger a snackbar 'notification'.
Also, whenever a component triggers a notification with the same message, a counter is added so the user has a feedback that this notification was shown again (example in the video).
Updated 'copy email addresses' button in Volunteers screen to use the new global snackbar
Solution for the clipboard restriction in safari (can only use clipboard in a direct response to a user gesture, no fetching in-between).
Instead of fetching/generating the invite link and then trying to write to clipboard, we render a textinput showing the link with a copy button. Tested in Safari.
Other changes
Implemented a global snackbar component
Needed because rendering inside the Drawer component made so that the snackbar was rendering under the ShellAppBar, despite its z-index being higher. So instead of rendering just one level above the Drawer I decided to implement it at Layout level, in ShellRootLayout, and provide a hook so any component can trigger a snackbar 'notification'.
Also, whenever a component triggers a notification with the same message, a counter is added so the user has a feedback that this notification was shown again (example in the video).
Updated 'copy email addresses' button in Volunteers screen to use the new global snackbar
To start using the new global snackbar.
Preview
preview.webm