
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
- Confirm that you’ve read the guidelines in your comment.

Sub-issue of #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
<div aria-live="polite">
<GlobalSnackbar />
</div>
(improves a11y by resolving some parts of learningequality/kolibri#12326)
Studio
Kolibri
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.
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
Sub-issue of #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
UiSnackbarcomponent that we use for Kolibri'sCoreSnackbarandGlobalSnackbar. In Studio, we have anotherGlobalSnackbar, but built around Vuetify'sVSnackbarthat we need to migrate away from.The goal of this issue is to unify all our snackbar logic in KDS
KSnackbarcomponent +useKSnackbarcomposable and then use them in both Kolibri and Studio instead of the aforementioned components.KDS
UiSnackbarand rename it toKSnackbar(it's important to preserve the originalUiSnackbarto prevent from breaking change in Kolibri)ui-) fromKSnackbar, if anyCoreSnackbar+GlobalSnackbarand Studio'sGlobalSnackbarsupportKSnackbarto utilizeuseKLiveRegionso that in Kolibri, we can cleanup usages like(improves a11y by resolving some parts of learningequality/kolibri#12326)
useSnackbarto KDS asuseKSnackbar. If Studio has any additional features related to showing/hiding snackbar and its format, add them too.useKSnackbarand core logic ofKSnackbar. Do not use obsolete@vue/test-utilsapproach. Instead, use@testing-library/vue(Vue Testing Library).KSnackbarKSnackbaranduseKSnackbarStudio
GlobalSnackbarandvuex/snackbarby KDSKSnackbaranduseKSnackbarKolibri
CoreSnackbar+GlobalSnackbaranduseSnackbarby KDSKSnackbaranduseKSnackbarGuidance
Some useful context from @AlexVelezLl for focus / blur (implemented in Kolibri):
User experience should be preserved, but the implementation can be likely simplified during this refactor, as per Alex's: