ACM-30606 Wizard review enhancements#5950
Conversation
Signed-off-by: John Swanke <jswanke@redhat.com>
Signed-off-by: John Swanke <jswanke@redhat.com>
…ating Signed-off-by: John Swanke <jswanke@redhat.com>
Signed-off-by: John Swanke <jswanke@redhat.com>
Signed-off-by: John Swanke <jswanke@redhat.com>
Signed-off-by: John Swanke <jswanke@redhat.com>
Signed-off-by: John Swanke <jswanke@redhat.com>
Signed-off-by: John Swanke <jswanke@redhat.com>
…-30606-Make-wizard-review-step-expandable Signed-off-by: John Swanke <jswanke@redhat.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces a wizard review step feature with DOM-based tree building, input registration, and YAML editor path highlighting. It removes legacy DisplayMode.Details rendering across input components, replaces it with a review section that displays collapsed summaries and expandable field details, adds infrastructure for synchronizing review state with the DOM, and integrates editor highlighting tied to wizard field selection. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ReviewStep
participant StepInputsRegistry
participant ReviewDomTree as DOM Tree Builder
participant Highlight as Highlight/Edit Handler
User->>ReviewStep: Click edit (pen) affordance
activate ReviewStep
ReviewStep->>Highlight: Call onReviewEdit(node, intent)
alt intent === 'navigate'
Highlight->>ReviewDomTree: Resolve DOM element ID from node
ReviewDomTree-->>Highlight: Element found
Highlight->>User: Focus/scroll to input, trigger highlight animation
Note over Highlight: CSS outline animates in via ease-in,<br/>animates out via ease-out class
else intent === 'highlight'
Highlight->>ReviewStep: setHighlightEditorPath(path)
ReviewStep->>ReviewStep: Update HighlightEditorPathContext
ReviewStep->>ReviewStep: Notify consumers (e.g., SyncEditor)
end
deactivate ReviewStep
sequenceDiagram
participant WizardComponent as Wizard (Main)
participant Step
participant Input as Input Component
participant StepRegistry as StepInputsRegistry
participant ReviewDOMSync as ReviewDomTreeSync
WizardComponent->>StepRegistry: Wrap with StepInputsRegistryProvider
WizardComponent->>ReviewDOMSync: Wrap with ReviewDomTreeSyncProvider
Step->>StepRegistry: useLayoutEffect → register(stepId, metadata)
activate StepRegistry
StepRegistry-->>Step: Registration stored in Map
deactivate StepRegistry
Input->>Input: useInput() builds registration path<br/>from prefix segments + path + id
Input->>StepRegistry: Register input in useLayoutEffect<br/>(if not hidden, currentStepId defined)
activate StepRegistry
StepRegistry-->>Input: Input registered
deactivate StepRegistry
Input->>ReviewDOMSync: Call useBumpReviewDomTree()
activate ReviewDOMSync
ReviewDOMSync->>ReviewDOMSync: Increment version state
deactivate ReviewDOMSync
ReviewDOMSync-->>ReviewDOMSync: Notify subscribers (e.g., ReviewStep)<br/>to rebuild DOM tree from registry
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes The PR spans 30+ files with substantial new logic (ReviewStep DOM tree building, registration infrastructure, highlight animation orchestration), systematic refactoring (DisplayMode removal across 16+ input components), and dense state management in contexts. While input-component changes follow a repetitive pattern, the ReviewStep component itself, decorator logic, and multi-provider wiring require careful verification of DOM synchronization, registration lifecycle, and editor integration correctness. Cross-file dependencies (registry, contexts, path segments) and scroll-to-edit animation teardown logic add complexity beyond simple pattern application. 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jeswanke The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
📝 Summary
Ticket Summary (Title):
Ticket Link:
Type of Change:
✅ Checklist
General
ACM-12340 Fix bug with...)If Feature
If Bugfix
🗒️ Notes for Reviewers
Summary by CodeRabbit
Release Notes
New Features
UI Improvements