mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 12:23:46 +08:00
ae2153b330
* UX: Wizard Step Enhancements - Remove illustrations - Add Emoji graphic to top of steps - Add description below step title - Move point of contact to last step * Move step count to header, plus some button navigation tweaks * add remaining emoji to step headers * fix button logic on steps * Update Point of Contact * remove automated messages field * adjust styling for counter, title, and emoji * Update wording for logos * Fix tests * fix prettier * fix specs * set same with for steps except for styling screen * use sentence case; remove duplicate copy under your organization fields * fix missing buttons on small screens * add spacing to buttons; adjust font weight to labels * adjust styling for community logo step; use sentence case for button * update copy for point of contact text helper * use sentence case for field labels * fix ui tests * use btn-back class to fix ui tests * reduce bottom margin for toggle fields * clean up Co-authored-by: Ella <ella.estigoy@gmail.com>
29 lines
496 B
Ruby
29 lines
496 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Wizard
|
|
class Step
|
|
attr_reader :id, :updater
|
|
attr_accessor :index, :fields, :next, :previous, :banner, :disabled, :description_vars, :emoji
|
|
|
|
def initialize(id)
|
|
@id = id
|
|
@fields = []
|
|
end
|
|
|
|
def add_field(attrs)
|
|
field = Field.new(attrs)
|
|
field.step = self
|
|
@fields << field
|
|
field
|
|
end
|
|
|
|
def has_fields?
|
|
@fields.present?
|
|
end
|
|
|
|
def on_update(&block)
|
|
@updater = block
|
|
end
|
|
end
|
|
end
|