James/en/43/3781#3823
Conversation
WalkthroughAdds showBackButton/showDoneButton props to wizard models and UI, initializes them to true in new models, migrates existing models to include them, and gates Back/Done button rendering in Tabs based on these flags. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant W as Wizard (Tabs)
participant M as Model/Settings
Note over M: New fields<br/>showBackButton=true<br/>showDoneButton=true
U->>W: Open Wizard
W->>M: Read showBackButton/showDoneButton
alt Back button conditions
Note over W: current > 0 AND showBackButton
W-->>U: Render Back
else
W-->>U: Hide Back
end
alt Done button conditions
Note over W: last step AND showDoneButton
W-->>U: Render Done
else
W-->>U: Hide Done
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
dfe8842 to
d0ae92b
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
shesha-reactjs/src/designer-components/wizard/tabs.tsx (1)
31-33: Back/Done visibility gating — LGTM; consider symmetry for “Next”
- Defaults (
= true) preserve explicitfalsevalues and match migrator behavior.- Rendering conditions for Back/Done are correct and short-circuit as expected.
Optional: If product needs full control, consider a
showNextButtonflag for symmetry with Back/Done.Also applies to: 97-105, 137-146
shesha-reactjs/src/designer-components/wizard/settings.tsx (1)
122-128: Fix truncated tooltip copyMinor UX nit: “This will be the default step tha” reads truncated.
- label="Default Active Step" - tooltip="This will be the default step tha" + label="Default Active Step" + tooltip="The step that will be active when the wizard loads"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
shesha-reactjs/src/designer-components/wizard/index.tsx(2 hunks)shesha-reactjs/src/designer-components/wizard/models.ts(1 hunks)shesha-reactjs/src/designer-components/wizard/settings.tsx(1 hunks)shesha-reactjs/src/designer-components/wizard/tabs.tsx(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-12T16:55:57.638Z
Learnt from: teboho
PR: shesha-io/shesha-framework#3397
File: shesha-reactjs/src/designer-components/charts/bar.tsx:49-52
Timestamp: 2025-06-12T16:55:57.638Z
Learning: For the chart components’ migrators (e.g., BarChartComponent in shesha-reactjs/src/designer-components/charts/bar.tsx), the version 5 step intentionally spreads `{ ...prev, ...defaultConfigFiller }` so that values from `defaultConfigFiller` override any existing properties in `prev`. This reset to new defaults is by design and should not be flagged as an issue.
Applied to files:
shesha-reactjs/src/designer-components/wizard/index.tsx
🔇 Additional comments (3)
shesha-reactjs/src/designer-components/wizard/models.ts (1)
79-81: New visibility flags on the public model — LGTM
showBackButton?andshowDoneButton?align with usage in Tabs and are safely defaulted via init/migrator. No breaking changes.shesha-reactjs/src/designer-components/wizard/index.tsx (1)
47-50: Defaults and migrator step — LGTM
initModelsets sensible defaults.- Step 7 uses nullish coalescing to preserve existing values while defaulting missing ones — good.
No further action from my side.
Also applies to: 106-110
shesha-reactjs/src/designer-components/wizard/settings.tsx (1)
150-156: Settings toggles wired correctly — LGTMCheckboxes map to
showBackButton/showDoneButtonwithvaluePropName="checked"and respectreadOnly. Good placement under Display.
#3781
Summary by CodeRabbit