Class: Plutonium::UI::Wizard::Review

Inherits:
Component::Base show all
Defined in:
lib/plutonium/ui/wizard/review.rb

Overview

The terminal review step's body (§2.5), a small state machine (see #render_mode):

- INCOMPLETE (a visible step is unvisited/invalid) → a "fix this" jump
link per outstanding step + an auto-summary of what's entered so far.
- COMPLETE + custom block → the author's block, rendered bare.
- COMPLETE + no block, `summary: true` (default) → the auto-summary of
every visible step's collected `data` (via SummaryDisplay).
- COMPLETE + no block, `summary: false` → the built-in "ready to
complete" panel (for a fully author-owned / chromeless review).

The Finish button is rendered by the page (gated: disabled while any visible step is incomplete); this component only renders the body.

Instance Method Summary collapse

Methods included from Component::Behaviour

#around_template

Methods included from Component::Tokens

#classes, #tokens

Methods included from Component::Kit

#BuildActionButton, #BuildActionsDropdown, #BuildAvatar, #BuildBlock, #BuildBreadcrumbs, #BuildBulkActionsToolbar, #BuildColorModeSelector, #BuildDynaFrameContent, #BuildDynaFrameHost, #BuildEmptyCard, #BuildFrameNavigatorPanel, #BuildModalCentered, #BuildModalSlideover, #BuildPageHeader, #BuildPanel, #BuildRowActionsDropdown, #BuildSkeletonTable, #BuildTabList, #BuildTableFilterPills, #BuildTableInfo, #BuildTablePagination, #BuildTableScopesBar, #BuildTableScopesPills, #BuildTableSearchBar, #BuildTableToolbar, #BuildTableViewSwitcher, #method_missing, #respond_to_missing?

Constructor Details

#initialize(runner:, step_url:) ⇒ Review

Returns a new instance of Review.

Parameters:



22
23
24
25
# File 'lib/plutonium/ui/wizard/review.rb', line 22

def initialize(runner:, step_url:)
  @runner = runner
  @step_url = step_url
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Plutonium::UI::Component::Kit

Instance Method Details

#view_templateObject



27
28
29
30
31
32
# File 'lib/plutonium/ui/wizard/review.rb', line 27

def view_template
  render_outstanding if show_outstanding?
  render_summary if show_summary?
  render_custom_block if show_custom?
  render_ready if show_ready?
end