From e2dabb0a26416213873f4eaade8d6a294483a4c3 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 21 May 2026 08:30:23 +0000 Subject: [PATCH] =?UTF-8?q?[#MUI-34]=20Revoir=20le=20syst=C3=A8me=20de=20p?= =?UTF-8?q?layground=20(#48)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [ ] Pas de régression - [ ] TU/TI/TF rédigée - [ ] TU/TI/TF OK - [ ] CHANGELOG modifié Reviewed-on: https://gitea.malio.fr/MALIO-DEV/malio-layer-ui/pulls/48 Co-authored-by: tristan Co-committed-by: tristan --- .playground/layouts/default.vue | 24 ++ .playground/pages/index.vue | 193 +---------- .playground/playground.nav.ts | 63 ++++ CHANGELOG.md | 1 + .../plans/2026-05-21-refonte-playground.md | 302 ++++++++++++++++++ .../2026-05-21-refonte-playground-design.md | 124 +++++++ 6 files changed, 521 insertions(+), 186 deletions(-) create mode 100644 .playground/layouts/default.vue create mode 100644 .playground/playground.nav.ts create mode 100644 docs/superpowers/plans/2026-05-21-refonte-playground.md create mode 100644 docs/superpowers/specs/2026-05-21-refonte-playground-design.md diff --git a/.playground/layouts/default.vue b/.playground/layouts/default.vue new file mode 100644 index 0000000..20c753e --- /dev/null +++ b/.playground/layouts/default.vue @@ -0,0 +1,24 @@ + + + diff --git a/.playground/pages/index.vue b/.playground/pages/index.vue index 32a6e33..4e215cf 100644 --- a/.playground/pages/index.vue +++ b/.playground/pages/index.vue @@ -1,189 +1,10 @@ - - diff --git a/.playground/playground.nav.ts b/.playground/playground.nav.ts new file mode 100644 index 0000000..8790d20 --- /dev/null +++ b/.playground/playground.nav.ts @@ -0,0 +1,63 @@ +import type {SidebarSection} from '../app/components/malio/sidebar/Sidebar.vue' + +export const navSections: SidebarSection[] = [ + { + label: 'BOUTONS', + icon: 'mdi:gesture-tap-button', + items: [ + {label: 'Button', to: '/composant/button/button'}, + {label: 'Button Icon', to: '/composant/button/buttonIcon'}, + ], + }, + { + label: 'CHAMPS', + icon: 'mdi:form-textbox', + items: [ + {label: 'Texte', to: '/composant/input/inputText'}, + {label: 'Nombre', to: '/composant/input/inputNumber'}, + {label: 'Montant', to: '/composant/input/inputAmount'}, + {label: 'Email', to: '/composant/input/inputEmail'}, + {label: 'Mot de passe', to: '/composant/input/inputPassword'}, + {label: 'Téléphone', to: '/composant/input/inputPhone'}, + {label: 'Zone de texte', to: '/composant/input/inputTextArea'}, + {label: 'Saisie assistée', to: '/composant/input/inputAutocomplete'}, + {label: 'Upload', to: '/composant/input/inputUpload'}, + {label: 'Éditeur riche', to: '/composant/input/inputRichText'}, + ], + }, + { + label: 'SÉLECTIONS', + icon: 'mdi:form-dropdown', + items: [ + {label: 'Select', to: '/composant/select/select'}, + {label: 'Select Checkbox', to: '/composant/select/selectCheckbox'}, + {label: 'Checkbox', to: '/composant/checkbox/checkbox'}, + {label: 'Radio', to: '/composant/radio/radioButton'}, + ], + }, + { + label: 'NAVIGATION', + icon: 'mdi:navigation-variant', + items: [ + {label: 'Sidebar', to: '/composant/sidebar/sidebar'}, + {label: 'Drawer', to: '/composant/drawer/drawer'}, + {label: 'Onglets', to: '/composant/tab/tabList'}, + ], + }, + { + label: 'DONNÉES', + icon: 'mdi:table', + items: [ + {label: 'DataTable', to: '/composant/datatable/datatable'}, + ], + }, + { + label: 'DIVERS', + icon: 'mdi:dots-horizontal', + items: [ + {label: 'Heure', to: '/composant/time/time'}, + {label: 'Sélecteur de site', to: '/composant/site/siteSelector'}, + {label: 'Formulaire client', to: '/composant/form/client'}, + ], + }, +] diff --git a/CHANGELOG.md b/CHANGELOG.md index a07c7e0..d006f62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ Liste des évolutions de la librairie Malio layer UI * [#MUI-30] Création d'un composant email * [#MUI-31] Création d'un composant téléphone * [#MUI-32] Création d'un composant saisie assistée (autocomplete) +* [#MUI-34] Revoir le système de playground ### Changed diff --git a/docs/superpowers/plans/2026-05-21-refonte-playground.md b/docs/superpowers/plans/2026-05-21-refonte-playground.md new file mode 100644 index 0000000..9ab86f7 --- /dev/null +++ b/docs/superpowers/plans/2026-05-21-refonte-playground.md @@ -0,0 +1,302 @@ +# Refonte du playground — Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Remplacer la fausse-SPA du playground (sidebar maison + chargement dynamique dans `index.vue`) par du vrai routage Nuxt fichier + un layout par défaut qui embarque le composant `MalioSidebar` de production. + +**Architecture:** Une config de navigation centralisée (`.playground/playground.nav.ts`) alimente un layout par défaut (`.playground/layouts/default.vue`) contenant `` + ``. Les pages de démo existantes sous `.playground/pages/composant/**` deviennent automatiquement des routes et héritent du layout. `index.vue` devient une simple page d'accueil. Le `app/app.vue` du layer (``), hérité via `extends`, applique le layout automatiquement. + +**Tech Stack:** Nuxt 4 (layer + playground via `extends`), Vue 3 ` +``` + +- [ ] **Step 2 : Vérifier le lint du layout** + +Run: `npx eslint .playground/layouts/default.vue` +Expected: aucune erreur bloquante (0 errors). + +--- + +## Task 3 : Réécrire `index.vue` en page d'accueil + +**Files:** +- Modify (réécriture complète): `.playground/pages/index.vue` + +- [ ] **Step 1 : Remplacer tout le contenu de `index.vue`** + +Remplacer **l'intégralité** du fichier `.playground/pages/index.vue` (supprime la sidebar maison + le chargement dynamique par glob) par : + +```vue + +``` + +*(Page sans `