[Remove Vuetify from Studio] Snackbar
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Sub-issue of https://github.com/learningequality/studio/issues/5060.
Complexity: High
Summary
While tracked in Studio repository as part of KDS migration, this issue includes work in all Kolibri, Studio, and KDS.
In KDS, we have a private UiSnackbar component that we use for Kolibri's CoreSnackbar and GlobalSnackbar. In Studio, we have another GlobalSnackbar, but built around Vuetify's VSnackbar that we need to migrate away from.
The goal of this issue is to unify all our snackbar logic in KDS KSnackbar component + useKSnackbar composable and then use them in both Kolibri and Studio instead of the aforementioned components.
KDS
- [ ] Copy
UiSnackbarand rename it toKSnackbar(it's important to preserve the originalUiSnackbarto prevent from breaking change in Kolibri) - [ ] Remove unused Keen logic and naming (
ui-) fromKSnackbar, if any - [ ] Add features to support everything that both Kolibri's
CoreSnackbar+GlobalSnackbarand Studio'sGlobalSnackbarsupport - [ ] Make
KSnackbarto utilizeuseKLiveRegionso that in Kolibri, we can cleanup usages like
<div aria-live="polite">
<GlobalSnackbar />
</div>
(improves a11y by resolving some parts of https://github.com/learningequality/kolibri/issues/12326)
- [ ] Ensure a11y features (e.g. focus / blur in Kolibri) to not get lost
- [ ] Also move Kolibri's
useSnackbarto KDS asuseKSnackbar. If Studio has any additional features related to showing/hiding snackbar and its format, add them too. - [ ] Add unit tests for
useKSnackbarand core logic ofKSnackbar. Do not use obsolete@vue/test-utilsapproach. Instead, use@testing-library/vue(Vue Testing Library). - [ ] Add visual tests for
KSnackbar - [ ] Add documentation pages for
KSnackbaranduseKSnackbar
Studio
- [ ] Replace
GlobalSnackbarandvuex/snackbarby KDSKSnackbaranduseKSnackbar - [ ] Ensure no regressions in user experience
Kolibri
- [ ] Replace
CoreSnackbar+GlobalSnackbaranduseSnackbarby KDSKSnackbaranduseKSnackbar - [ ] Cleanup unnecessary live regions related to global snackbars
- [ ] Ensure no regressions in user experience
Guidance
Some useful context from @AlexVelezLl for focus / blur (implemented in Kolibri):
I tried to implement the "return focus" action as focusing the last active element before the snackbar was shown just as we do in other places, but this didn't work well with snackbars because these snackbars many times are shown when the operation is complete, but if this operation comes from a modal (kmodal or side panel modal), then the focus is lost, because the last focused element is already unmounted when the snackbar is closed. That's why I treated it as an "onBlur" handler that was called either after the user press the tab key, or when the snackbar disappeared because of the timeout.
User experience should be preserved, but the implementation can be likely simplified during this refactor, as per Alex's:
I had to do it with directives just to avoid updating many parts of the UISnackbar that I suspected was going to be migrated at some point. But in theory I think this could be achieved using regular Vue props/event handlers.
Reserved for @GarvitSinghal47
@MisRob You can go ahead and assign this one to me 📦
Good news, thanks a lot @GarvitSinghal47. We'll be in touch.
@GarvitSinghal47 I only put 'help wanted' here so I can track it a bit better - the assignment still applies! Thank you.
Automatically unassigning @GarvitSinghal47 due to no comments here, or updates on the associated pull request for 1 month. @GarvitSinghal47, if you're still interested in this issue or already have work in progress, please message us here, and we'll assign you again. Thank you!
Hi @GarvitSinghal47, if you already started, or still plan to work on this, let me know and I can assign again.
Hi @MisRob , I would like to work on this and have set up the project . Please assign this to me.
Hi! 👋
Thanks so much for your interest! This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. If there are no unassigned 'help wanted' issues available, please wait until new ones are added.
We really appreciate your willingness to help. 😊
Are you preparing for Google Summer of Code? See our GSoC guidelines.
Season’s greetings! 👋
We’d like to thank everyone for another year of fruitful collaborations, engaging discussions, and for the continued support of our work. Learning Equality will be on holidays from December 22 to January 5. We look forward to much more in the new year and wish you a very happy holiday season!
Are you preparing for Google Summer of Code? See our GSoC guidelines.