Skip to content

Fix StepperCommandDialog blank rendering and add per-step validation indicators#45

Merged
einari merged 11 commits into
mainfrom
copilot/add-stepper-command-dialog
Mar 18, 2026
Merged

Fix StepperCommandDialog blank rendering and add per-step validation indicators#45
einari merged 11 commits into
mainfrom
copilot/add-stepper-command-dialog

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 17, 2026

Added

  • Introducing a StepperCommandDialog that works in a similar way to the CommandDialog but leverages the PrimeReact Stepper component.

@einari
Copy link
Copy Markdown
Contributor

einari commented Mar 17, 2026

@copilot When on the last page and everything becomes valid, the Ok button should appear. We don't need a cancel button. But an X in the upper right corner for cancelling. So reuse from CommandDialog might not be possible. See what makes sense.

@einari
Copy link
Copy Markdown
Contributor

einari commented Mar 17, 2026

@copilot The props from the PrimeReact Stepper should be available directly on our new component - making it possible to customize it in the same way as the original stepper.

…tion

Co-authored-by: einari <134365+einari@users.noreply.github.com>
Copilot AI changed the title [WIP] Add StepperCommandDialog for multi-step command forms Add StepperCommandDialog Mar 17, 2026
Copilot AI requested a review from einari March 17, 2026 10:10
@einari
Copy link
Copy Markdown
Contributor

einari commented Mar 17, 2026

@copilot Almost there. We do not want the Cancel button and just have X button in the top right corner as Cancel. Then, the next and the ok buttons should always be to the right. Btw: Give me screenshots in this PR when you're done.

…e Stepper props

Co-authored-by: einari <134365+einari@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot When on the last page and everything becomes valid, the Ok button should appear. We don't need a cancel button. But an X in the upper right corner for cancelling. So reuse from CommandDialog ...

Done in b90a10c. The Cancel button has been removed from the footer entirely — cancellation is handled by the X button in the dialog header (closable on PrimeDialog). The Submit button now only appears (not just becomes enabled) when the user is on the last step and all fields across every step are valid. On the last step with an invalid form, the footer shows only Previous (if applicable) with no Submit in sight.

@copilot The props from the PrimeReact Stepper should be available directly on our new component - making it possible to customize it in the same way as the original stepper.

Done in b90a10c. StepperCommandDialogProps now extends a StepperCustomizationProps type that picks the stepper-specific props directly from PrimeReact's StepperProps: orientation, headerPosition, linear, onChangeStep, start, end, pt, ptOptions, and unstyled. All of these are forwarded directly to the underlying PrimeStepper, so users can customise the stepper the same way as with the native component. The activeStep and children props remain managed internally.

@einari
Copy link
Copy Markdown
Contributor

einari commented Mar 17, 2026

@copilot Great. It would also be great if we could indicate steps that are invalid automatically - in the step header, either with color or a small exclamation icon (warning / error sign) hanging off the number - to the left bottom or something. This would require to understand what properties are invalid and link them to a step.

Again; Storybook stories and snapshot, or it didn't happen

Co-authored-by: einari <134365+einari@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 17, 2026

@copilot Almost there. We do not want the Cancel button and just have X button in the top right corner as Cancel. Then, the next and the ok buttons should always be to the right. Btw...

Done in 371b56d. Next and Ok are now right-aligned (Previous stays left with a flex spacer between). No Cancel button anywhere in the footer — only the X in the header.

StepperCommandDialog footer layout

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • storybook.js.org
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/Components/Components/node_modules/storybook/dist/bin/dispatcher.js dev -p 6006 --no-open (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/Components/Components/node_modules/storybook/dist/bin/dispatcher.js dev -p 6006 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@einari
Copy link
Copy Markdown
Contributor

einari commented Mar 17, 2026

@copilot lets make the next button be disabled when a step is invalid.

@einari
Copy link
Copy Markdown
Contributor

einari commented Mar 17, 2026

@copilot Btw: The dialog is absolutely broken now, does not render the stepper or any of the pages

Co-authored-by: einari <134365+einari@users.noreply.github.com>
…on indicators

Co-authored-by: einari <134365+einari@users.noreply.github.com>
Copilot AI changed the title Add StepperCommandDialog Fix StepperCommandDialog blank rendering and add per-step validation indicators Mar 17, 2026
einari added 5 commits March 18, 2026 06:16
- Track visited steps with visitedSteps state (Set<number>)
- Inject inline style on PrimeReact number span via passthrough: red for error steps, green for visited+valid steps
- Dim inactive steps to 0.5 opacity via [data-p-active='false'] CSS selector
- Use passthrough on number span rather than header li to preserve PrimeReact layout, separator lines, and circle shape entirely
Documents the full workflow for building multi-step wizard dialogs using
StepperCommandDialog: step definition, validation binding, navigation
behavior, label customization, and passthrough API usage.
Add Validation Indicators section describing how step number circles
change color (red for errors, green for visited+valid) and how inactive
steps are dimmed. Update Key Features list accordingly.
Add explicit pre-save self-check to skill-creator listing common UK->US
spelling variants to scan for before finalizing any SKILL.md. Add
matching American English bullet to write-documentation writing style
rules. Prevents UK English from slipping into skills and documentation.
@einari einari marked this pull request as ready for review March 18, 2026 05:45
@einari einari added the minor label Mar 18, 2026
@einari einari merged commit ab59b18 into main Mar 18, 2026
3 checks passed
@einari einari deleted the copilot/add-stepper-command-dialog branch March 18, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants