Repository: jupytercad/JupyterCAD (language: python)

Issue:
Reorder toolbar buttons
The last toolbar buttons are ordered in a way that is not very intuitive to me:

![Image](https://github.com/user-attachments/assets/5ef1aefa-71ec-426c-a3f3-6c1ba3ae511a)

I believe we should reorder them in:
- Exploded view
- Clip plane
- Wireframe
- SEPARATOR
- Axes
- Camera
- SEPARATOR
- Console

That way we separate the buttons that have an impact on the shapes themselves from the "view" buttons, and the console is alone.


Discussion / hints:

Fix patch:
diff --git a/packages/base/src/toolbar/widget.tsx b/packages/base/src/toolbar/widget.tsx
index 67ac6c70..1ae03d48 100644
--- a/packages/base/src/toolbar/widget.tsx
+++ b/packages/base/src/toolbar/widget.tsx
@@ -169,59 +169,60 @@ export class ToolbarWidget extends ReactiveToolbar {
 
         // View helpers
         this.addItem(
-          'Axes Helper',
+          'Exploded View',
           new CommandToolbarButton({
-            id: CommandIDs.updateAxes,
+            id: CommandIDs.updateExplodedView,
             label: '',
             commands: options.commands
           })
         );
         this.addItem(
-          'Exploded View',
+          'Clip View',
           new CommandToolbarButton({
-            id: CommandIDs.updateExplodedView,
+            id: CommandIDs.updateClipView,
             label: '',
             commands: options.commands
           })
         );
         this.addItem(
-          'Camera Settings',
+          'Toggle Wireframe',
           new CommandToolbarButton({
-            id: CommandIDs.updateCameraSettings,
+            id: CommandIDs.wireframe,
             label: '',
             commands: options.commands
           })
         );
+        this.addItem('separator6', new Separator());
+
         this.addItem(
-          'Clip View',
+          'Axes Helper',
           new CommandToolbarButton({
-            id: CommandIDs.updateClipView,
+            id: CommandIDs.updateAxes,
             label: '',
             commands: options.commands
           })
         );
-
-        this.addItem('separator6', new Separator());
         this.addItem(
-          'Toggle console',
+          'Camera Settings',
           new CommandToolbarButton({
-            id: CommandIDs.toggleConsole,
-            commands: options.commands,
+            id: CommandIDs.updateCameraSettings,
             label: '',
-            icon: terminalIcon
+            commands: options.commands
           })
         );
+        this.addItem('separator7', new Separator());
 
         this.addItem(
-          'Toggle Wireframe',
+          'Toggle console',
           new CommandToolbarButton({
-            id: CommandIDs.wireframe,
+            id: CommandIDs.toggleConsole,
+            commands: options.commands,
             label: '',
-            commands: options.commands
+            icon: terminalIcon
           })
         );
 
-        this.addItem('separator7', new Separator());
+        this.addItem('separator8', new Separator());
         (options.externalCommands ?? []).forEach(cmd => {
           this.addItem(
             cmd.name,


Test patch:
diff --git a/ui-tests/tests/ui.spec.ts-snapshots/JCAD-Console-linux.png b/ui-tests/tests/ui.spec.ts-snapshots/JCAD-Console-linux.png
index 044e5dec..b13703fb 100644
Binary files a/ui-tests/tests/ui.spec.ts-snapshots/JCAD-Console-linux.png and b/ui-tests/tests/ui.spec.ts-snapshots/JCAD-Console-linux.png differ