DEV: Refactor Wizard components (#24770)

This commit refactors the Wizard component code in preparation for moving it to the 'static' directory for Embroider route-splitting. It also includes a number of general improvements and simplifications.

Extracted from https://github.com/discourse/discourse/pull/23678

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
This commit is contained in:
David Taylor
2023-12-07 16:33:38 +00:00
committed by GitHub
parent 0139481188
commit e4c373194d
34 changed files with 741 additions and 538 deletions

View File

@ -194,7 +194,7 @@ class Wizard
style.add_choice("latest")
CategoryPageStyle.values.each { |page| style.add_choice(page[:value]) }
step.add_field(id: "styling_preview", type: "component")
step.add_field(id: "styling_preview", type: "styling-preview")
step.on_update do |updater|
updater.update_setting(:base_font, updater.fields[:body_font])