studio icon indicating copy to clipboard operation
studio copied to clipboard

[Remove Vuetify from Studio] Snackbar

Open MisRob opened this issue 2 months ago • 6 comments

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 UiSnackbar and rename it to KSnackbar (it's important to preserve the original UiSnackbar to prevent from breaking change in Kolibri)
  • [ ] Remove unused Keen logic and naming (ui-) from KSnackbar, if any
  • [ ] Add features to support everything that both Kolibri's CoreSnackbar + GlobalSnackbar and Studio's GlobalSnackbar support
  • [ ] Make KSnackbar to utilize useKLiveRegion so 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 useSnackbar to KDS as useKSnackbar. If Studio has any additional features related to showing/hiding snackbar and its format, add them too.
  • [ ] Add unit tests for useKSnackbar and core logic of KSnackbar. Do not use obsolete @vue/test-utils approach. Instead, use @testing-library/vue (Vue Testing Library).
  • [ ] Add visual tests for KSnackbar
  • [ ] Add documentation pages for KSnackbar and useKSnackbar

Studio

  • [ ] Replace GlobalSnackbar and vuex/snackbar by KDS KSnackbar and useKSnackbar
  • [ ] Ensure no regressions in user experience

Kolibri

  • [ ] Replace CoreSnackbar + GlobalSnackbar and useSnackbar by KDS KSnackbar and useKSnackbar
  • [ ] 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.

MisRob avatar Oct 09 '25 12:10 MisRob

Reserved for @GarvitSinghal47

MisRob avatar Oct 13 '25 14:10 MisRob

@MisRob You can go ahead and assign this one to me 📦

GarvitSinghal47 avatar Oct 16 '25 11:10 GarvitSinghal47

Good news, thanks a lot @GarvitSinghal47. We'll be in touch.

MisRob avatar Oct 16 '25 15:10 MisRob

@GarvitSinghal47 I only put 'help wanted' here so I can track it a bit better - the assignment still applies! Thank you.

MisRob avatar Oct 24 '25 16:10 MisRob

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.

MisRob avatar Nov 24 '25 13:11 MisRob

Hi @MisRob , I would like to work on this and have set up the project . Please assign this to me.

abhiraj75 avatar Dec 07 '25 16:12 abhiraj75

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.