Skip to content

Migrer le toaster 🍞 #927

@abulte

Description

@abulte

@datagouv/components-next v1.0.0 migrated its internal toast system from vue3-toastify to vue-sonner, re-exporting Toaster and toast from that package (opendatateam/udata-front-kit#1074).

Our app still uses vue3-toastify (src/utils/error.ts, DatasetAddToTopicModal.vue). Until we migrate, components-next toasts (e.g. the "Copied!" feedback in CopyButton) are silently dropped because is never mounted.

Migration steps:

  1. Replace vue3-toastify imports in error.ts and DatasetAddToTopicModal.vue with toast from @datagouv/components-next
  2. Remove import 'vue3-toastify/dist/index.css' from main.ts
  3. Mount (from @datagouv/components-next) in the app layout
  4. Update --toastify-* CSS variables in main.css to sonner equivalents
  5. Remove vue3-toastify dependency

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions