|
| 1 | +Voici la SPEC UX BCASL — interface graphique pour la gestion du pipeline. |
| 2 | + |
| 3 | +--- |
| 4 | + |
| 5 | +SPEC UX BCASL — Interface utilisateur (Qt/PySide6) |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +1. Philosophie |
| 10 | + |
| 11 | +L'UI BCASL est un éditeur visuel du pipeline qui respecte les contraintes du système. |
| 12 | + |
| 13 | +· Lecture seule : la catégorie d'un plugin ne peut pas être changée |
| 14 | +· Ordre modifiable : à l'intérieur d'une section (même catégorie) |
| 15 | +· Guidage : plages de priorité recommandées |
| 16 | +· Sauvegarde : tout est écrit dans bcasl.yml |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +2. Vue principale |
| 21 | + |
| 22 | +``` |
| 23 | +┌─────────────────────────────────────────────────────────────────────┐ |
| 24 | +│ BCASL Pipeline [Save] │ |
| 25 | +├─────────────────────────────────────────────────────────────────────┤ |
| 26 | +│ │ |
| 27 | +│ ▼ Validation (10-19) │ |
| 28 | +│ ┌─────────────────────────────────────────────────────────────┐ │ |
| 29 | +│ │ ☑ syntax_checker priority [12] [↑] [↓] (drag)│ │ |
| 30 | +│ │ ☑ type_checker priority [15] [↑] [↓] │ │ |
| 31 | +│ └─────────────────────────────────────────────────────────────┘ │ |
| 32 | +│ │ |
| 33 | +│ ▼ Transformation (20-39) │ |
| 34 | +│ ┌─────────────────────────────────────────────────────────────┐ │ |
| 35 | +│ │ ☑ minifier priority [25] [↑] [↓] │ │ |
| 36 | +│ └─────────────────────────────────────────────────────────────┘ │ |
| 37 | +│ │ |
| 38 | +│ ▼ Obfuscation (40-59) │ |
| 39 | +│ ┌─────────────────────────────────────────────────────────────┐ │ |
| 40 | +│ │ ☐ pyobfus priority [45] [↑] [↓] │ │ |
| 41 | +│ │ ⚠️ ☑ byteshift priority [22] [↑] [↓] │ │ |
| 42 | +│ │ ↑ hors plage (40-59) │ │ |
| 43 | +│ └─────────────────────────────────────────────────────────────┘ │ |
| 44 | +│ │ |
| 45 | +│ ▼ Preparation (60-79) │ |
| 46 | +│ ┌─────────────────────────────────────────────────────────────┐ │ |
| 47 | +│ │ ☐ signer priority [70] [↑] [↓] │ │ |
| 48 | +│ └─────────────────────────────────────────────────────────────┘ │ |
| 49 | +│ │ |
| 50 | +├─────────────────────────────────────────────────────────────────────┤ |
| 51 | +│ [Cancel] [Save to bcasl.yml]│ |
| 52 | +└─────────────────────────────────────────────────────────────────────┘ |
| 53 | +``` |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +3. Composants UI |
| 58 | + |
| 59 | +3.1 Section (catégorie) |
| 60 | + |
| 61 | +Élément Rôle |
| 62 | +▼ Validation (10-19) Titre de section (collapsible) |
| 63 | +Plage de priorité Indique les bornes recommandées |
| 64 | +Background Léger (gris très clair) |
| 65 | + |
| 66 | +3.2 Ligne plugin |
| 67 | + |
| 68 | +Élément Rôle |
| 69 | +☑ Checkbox enabled |
| 70 | +Nom plugin.name |
| 71 | +priority [22] Label + champ de saisie (spinbox) |
| 72 | +[↑] [↓] Boutons pour réorganiser |
| 73 | +(drag) Poignée pour drag & drop |
| 74 | +⚠️ Warning si priorité hors plage |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +4. Interactions |
| 79 | + |
| 80 | +4.1 Réorganisation (même section) |
| 81 | + |
| 82 | +Action Résultat |
| 83 | +Cliquer [↑] Échange avec plugin au-dessus (même section) |
| 84 | +Cliquer [↓] Échange avec plugin en-dessous |
| 85 | +Drag & drop Déplace dans la même section |
| 86 | + |
| 87 | +→ Si drop dans une autre section, opération annulée + message d'erreur. |
| 88 | + |
| 89 | +4.2 Modification priorité |
| 90 | + |
| 91 | +Action Résultat |
| 92 | +Changer spinbox Met à jour la priorité |
| 93 | +Si hors plage Affiche ⚠️ + tooltip explicatif |
| 94 | +Sauvegarde Écrit la priorité (même hors plage) |
| 95 | + |
| 96 | +4.3 Activation/désactivation |
| 97 | + |
| 98 | +Action Résultat |
| 99 | +Clic checkbox Met à jour enabled |
| 100 | +Sauvegarde Écrit enabled: true/false |
| 101 | + |
| 102 | +--- |
| 103 | + |
| 104 | +5. Messages utilisateur |
| 105 | + |
| 106 | +5.1 Drag & drop interdit |
| 107 | + |
| 108 | +```python |
| 109 | +show_warning( |
| 110 | + title="Cannot move plugin", |
| 111 | + text=f"'{plugin_name}' belongs to category '{category}'.\n" |
| 112 | + "Category is defined by the plugin vendor and cannot be changed." |
| 113 | +) |
| 114 | +``` |
| 115 | + |
| 116 | +5.2 Priorité hors plage (tooltip) |
| 117 | + |
| 118 | +``` |
| 119 | +⚠️ Priority 22 is outside recommended range for 'obfuscation' (40-59). |
| 120 | +Execution order may be unexpected. |
| 121 | +Use 'Expert mode' to disable warnings. |
| 122 | +``` |
| 123 | + |
| 124 | +5.3 Priorité hors plage (warning visuel) |
| 125 | + |
| 126 | +· Fond de ligne : #FFF3CD (jaune pâle) |
| 127 | +· Icône ⚠️ devant le nom |
| 128 | +· Bordure orange sur le spinbox |
| 129 | + |
| 130 | +--- |
| 131 | + |
| 132 | +6. Mode expert |
| 133 | + |
| 134 | +6.1 Activation |
| 135 | + |
| 136 | +```yaml |
| 137 | +# .ark/pref.json |
| 138 | +{ |
| 139 | + "bcasl_ux": { |
| 140 | + "expert_mode": true |
| 141 | + } |
| 142 | +} |
| 143 | +``` |
| 144 | + |
| 145 | +Ou checkbox en bas de l'UI : |
| 146 | + |
| 147 | +``` |
| 148 | +[✓] Expert mode (allow any priority) |
| 149 | +``` |
| 150 | + |
| 151 | +6.2 Effet |
| 152 | + |
| 153 | +Sans expert Avec expert |
| 154 | +Slider priorité borné (40-59) Slider libre (0-99) |
| 155 | +Spinbox priorité borné Spinbox libre |
| 156 | +Warning visuel présent Warning désactivé |
| 157 | +Message bloquant sur drag & drop Toujours bloquant (catégorie) |
| 158 | + |
| 159 | +--- |
| 160 | + |
| 161 | +7. Sauvegarde |
| 162 | + |
| 163 | +7.1 Bouton Save to bcasl.yml |
| 164 | + |
| 165 | +· Sauvegarde l'état actuel dans bcasl.yml (dans le workspace) |
| 166 | +· Format YAML exact (priorités, enabled, config) |
| 167 | + |
| 168 | +7.2 Format généré |
| 169 | + |
| 170 | +```yaml |
| 171 | +plugins: |
| 172 | + - name: syntax_checker |
| 173 | + enabled: true |
| 174 | + priority: 12 |
| 175 | + config: {} |
| 176 | + |
| 177 | + - name: type_checker |
| 178 | + enabled: true |
| 179 | + priority: 15 |
| 180 | + config: {} |
| 181 | + |
| 182 | + - name: minifier |
| 183 | + enabled: true |
| 184 | + priority: 25 |
| 185 | + config: {} |
| 186 | +``` |
| 187 | +
|
| 188 | +--- |
| 189 | +
|
| 190 | +8. Raccourcis clavier |
| 191 | +
|
| 192 | +Raccourci Action |
| 193 | +Ctrl+S Sauvegarder |
| 194 | +Ctrl+Z Annuler (undo local) |
| 195 | +Ctrl+Y Rétablir (redo) |
| 196 | +↑ ↓ Navigation entre plugins |
| 197 | +Space Toggle enabled |
| 198 | +
|
| 199 | +--- |
| 200 | +
|
| 201 | +9. Contraintes techniques |
| 202 | +
|
| 203 | +Contrainte Implémentation |
| 204 | +Ordre interne = priority Le tri UI est basé sur priority (pas un ordre séparé) |
| 205 | +Drag & drop interdit entre sections Vérification source_category == target_category |
| 206 | +Sauvegarde YAML Utiliser ruamel.yaml pour préserver les commentaires ? (optionnel) |
| 207 | +
|
| 208 | +--- |
| 209 | +
|
| 210 | +10. Règles UX |
| 211 | +
|
| 212 | +ID Règle |
| 213 | +UX1 Les sections sont définies par category (lu depuis plugin). |
| 214 | +UX2 Réorganisation possible uniquement à l'intérieur d'une section. |
| 215 | +UX3 Drag & drop inter-sections → erreur. |
| 216 | +UX4 Priorité hors plage → warning (sauf mode expert). |
| 217 | +UX5 bcasl.yml est le seul fichier source de vérité. |
| 218 | +
|
| 219 | +--- |
| 220 | +
|
| 221 | +Fin de la SPEC UX BCASL |
0 commit comments