Migrate Studio snackbar to KDS - #6144
Monier-Ayman wants to merge 2 commits into
Conversation
|
👋 Hi @Monier-Ayman, thanks for contributing! For the review process to begin, please verify that the following is satisfied:
Also check that issue requirements are satisfied & you ran Pull requests that don't follow the guidelines will be closed. Reviewer assignment can take up to 2 weeks. |
|
Hi @akolson! The PR is ready for review. I’ve completed the migration and verified the affected tests pass. 🙌 |
6194683 to
892fda1
Compare
|
Hi @Monier-Ayman! Sure, I’ll take a look. Also, please be sure to always include the References section in the PR description so the assigned issue and PR can be auto-linked. Thank you! |
Summary
This PR migrates Studio's snackbar implementation from Vuetify/Vuex to the Kolibri Design System's
KSnackbaranduseKSnackbar, as part of the effort to remove Vuetify from Studio.What changed
Snackbar infrastructure
VSnackbarimplementation inGlobalSnackbar.vuewith KDSKSnackbar.useKSnackbar.shared/vuex/snackbarmodule.useSnackbarcomposable and its mock.VSnackbarregistration fromshared/app.js.Snackbar callers
Migrated all existing Studio snackbar callers to
useKSnackbar, including:Existing snackbar behavior was preserved where applicable, including:
hideCallbackbehaviorThe existing
showSnackbarOnCompleteSyncmethod was kept because its name is part of the surrounding workflow; its snackbar implementation now usesuseKSnackbar.Accessibility
The new
KSnackbarimplementation uses the accessibility features provided by the Kolibri Design System, including the existingannounceandassertiveoptions where appropriate.Tests
Updated affected tests and mocks to use
useKSnackbarinstead of the removed snackbar implementation.The affected test suite was run with Jest in-band:
Also verified with:
with no whitespace errors.
References
Closes #5955
Notes
The old
forceReuseoption had no actual callers in Studio. The KDS snackbar handles reactive text updates directly, so no additionalforceReusemigration was necessary.This PR is focused on replacing the snackbar infrastructure while preserving the existing user-facing behavior.
AI Usage
I used AI (Antigravity) as a coding assistant while working on this migration. I planned and implemented the changes myself, with AI helping me investigate the existing implementation, work through some of the changes, and review parts of the implementation.
I reviewed and refined all changes myself, verified the behavior against the issue requirements, checked the existing code and history, and ran the affected Jest tests and local pre-commit checks.