Skip to content

feat(console): add support for prompt action button grouping - #1977

Open
ghzserg wants to merge 6 commits into
fluidd-core:developfrom
ghzserg:button_group
Open

ghzserg wants to merge 6 commits into
fluidd-core:developfrom
ghzserg:button_group

Conversation

@ghzserg

@ghzserg ghzserg commented Oct 7, 2026

Copy link
Copy Markdown

Description

This PR introduces support for action command button grouping within the console prompt dialogs. It implements button_group_start and button_group_end actions to display multiple buttons inline, wrapping them into a unified row layout.

To ensure stability, the intermediate active group state (isGroupActive and currentGroupButtons) is managed cleanly inside the central Vuex store.

Changes

  • types.ts: Added PromptDialogItemButtonGroup interface and updated PromptDialogItem union type.
  • state.ts: Added isGroupActive and currentGroupButtons to the baseline ConsoleState.
  • mutations.ts: Introduced mutations to safely toggle active states and commit entire groups into the dialog items array.
  • actions.ts: Implemented conditional switches for button_group_start / button_group_end signals to build and push button arrays using Vuex state context.
  • ActionCommandPromptDialog.vue: Updated the layout template using Vuetify's negative margins (mx-n2) and uniform padding (px-2) for seamless button alignments.

Signed-off-by: Sergei Rozhkov zmod@zmod.link

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Bundle size report (gzip)

Chunk Base Head Δ
assets/index-*.js 161.6 kB 161.8 kB +231 B
sw.js 11.2 kB 11.2 kB +4 B
assets/Configure-*.js 775 B 778 B +3 B
assets/Dashboard-*.js 63.2 kB 63.2 kB -3 B
assets/BeaconCard-*.js 4.3 kB 4.3 kB +2 B
assets/Console-*.js 369 B 367 B -2 B
assets/FileSystem-*.js 31.9 kB 31.9 kB +2 B
assets/GcodePreviewCard-*.js 13.2 kB 13.2 kB -2 B
assets/System-*.js 2.4 kB 2.4 kB +2 B
assets/AfcPrintStartDialogTool-*.js 2.3 kB 2.3 kB +1 B
assets/ConsoleCard-*.js 2.0 kB 2.0 kB +1 B
assets/Diagnostics-*.js 15.9 kB 15.9 kB -1 B
assets/GcodePreview-*.js 366 B 367 B +1 B
assets/History-*.js 3.8 kB 3.8 kB +1 B
assets/Icons-*.js 528 B 529 B +1 B
assets/JobHistoryItemStatus-*.js 1.2 kB 1.2 kB +1 B
assets/JobQueueCard-*.js 4.5 kB 4.5 kB +1 B
assets/MacroCategorySettings-*.js 2.0 kB 2.0 kB +1 B
assets/NotFound-*.js 437 B 438 B +1 B
assets/Settings-*.js 23.3 kB 23.3 kB -1 B
assets/Tune-*.js 3.4 kB 3.4 kB +1 B
Total 2.9 MB 2.9 MB +245 B

119 chunks compared, 21 changed. Sizes are gzip, matching what nginx serves.

@pedrolamas

Copy link
Copy Markdown
Member

Hi @ghzserg, thank you for submitting this Pull Request.

To be honest, I've never seen a real advantage of having action:prompt_button_group_start/end hence why I just ignored it and never implemented it myself...

Layout is simpler if the buttons just stack (especially in the narrow view like in the phone).

I'm not saying no to this, but I would like to know in what scenario do you see this being used? Do you use it in your printers?

@ghzserg

ghzserg commented Oct 9, 2026

Copy link
Copy Markdown
Author
{11080F88-35B1-463F-BDB3-5694751BA9FC} {79C36FED-74EB-42EC-B3E1-934848914D2C} {0175E07E-8D62-45E0-B3A1-8D117B952650}

Hi @pedrolamas,

Thank you for the review! I completely understand your point regarding the simplicity of stacked buttons on narrow screens like phones.

However, this feature is highly beneficial and actively used in the Z-Mod firmware ecosystem for Flashforge Creator 5 / Creator 5 Pro / Adventurer 5M / Adventurer 5M Pro / AD5X series printers.

Here are the main use cases where stacked buttons feel too cluttered, and inline grouping makes a huge workflow difference:

  1. Multi-material color mapping: When matching the colors embedded in the G-code file with the physical spools loaded on the printer, having direct row selections saves massive vertical space.
  2. Filament management dialogs: Quick selection panels for choosing filament types (e.g., PLA, PETG, ABS) and colors during load/unload macros.

Regarding mobile layout, because this PR implements Vuetify’s built-in grid columns (v-col), it gracefully wraps elements if the screen space becomes too constrained, so it shouldn't completely break the narrow viewport experience.

It would be awesome to have native support for this in Fluidd

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants