diff --git a/app/assets/stylesheets/wizard.scss b/app/assets/stylesheets/wizard.scss
index c40d1e159493b..0509c91026c48 100644
--- a/app/assets/stylesheets/wizard.scss
+++ b/app/assets/stylesheets/wizard.scss
@@ -59,7 +59,7 @@ body.wizard {
.discourse-logo svg {
position: relative;
- height: 70px;
+ height: 50px;
width: auto;
@include viewport.until(sm) {
@@ -72,12 +72,6 @@ body.wizard {
}
}
}
-
- .wizard-canvas {
- position: fixed;
- top: 0;
- pointer-events: none;
- }
}
// Refactored SCSS
@@ -98,8 +92,7 @@ body.wizard {
&__step {
margin-top: 1em;
- max-width: 50%;
- min-width: 35%;
+ max-width: 700px;
width: 100%;
@include viewport.until(lg) {
@@ -118,30 +111,10 @@ body.wizard {
width: 100%;
}
- &__step-counter {
- text-align: center;
- font-weight: 700;
- color: var(--primary-high);
- text-shadow: 1px 1px 12px var(--secondary);
- }
-
- &__step-description {
- font-size: var(--font-up-2);
- flex: 1 0 40%;
-
- @include viewport.until(md) {
- font-size: var(--font-up-2);
- }
- }
-
&__field {
margin-bottom: 1em;
}
- &__field.checkbox-field {
- margin-bottom: 1.5em;
- }
-
&__field.invalid input {
outline: 0;
border: 3px solid var(--danger);
@@ -165,43 +138,19 @@ body.wizard {
}
}
- &__sidebar {
- width: 230px;
- box-sizing: border-box;
- margin-right: 1em;
-
- @media only screen and (width <= 925px) {
- width: 100%;
- margin-left: auto;
- margin-right: auto;
- }
-
- + .wizard-container__fields {
- padding: 1em;
- background: var(--primary-very-low);
- width: auto;
- border-radius: 0.5em;
- margin-top: -1em;
-
- @media only screen and (width <= 925px) {
- display: none;
- }
- }
- }
-
&__step-header {
text-align: center;
margin-bottom: 3em;
&--emoji img {
- width: 30px;
- height: 30px;
+ width: 40px;
+ height: 40px;
margin-bottom: 1em;
}
}
&__step-title {
- font-size: 2.75em;
+ font-size: 2.5em;
color: var(--primary);
line-height: var(--line-height-medium);
margin: 0 0 0.5em 0;
@@ -227,28 +176,6 @@ body.wizard {
}
}
- &__buttons-left {
- display: flex;
- flex-wrap: wrap;
- gap: 1em;
- align-items: center;
-
- @include viewport.until(sm) {
- order: 2;
- }
- }
-
- &__buttons-right {
- display: flex;
- align-items: center;
- font-weight: bold;
-
- @include viewport.until(sm) {
- margin-right: 0;
- flex-direction: column;
- }
- }
-
&__step-text {
display: inline;
@@ -300,71 +227,9 @@ body.wizard {
background-color: var(--primary-medium);
}
- &__button.finish {
- @include viewport.until(sm) {
- order: 2;
- }
- }
-
- &__button.next {
- min-width: 70px;
- margin-left: 1em;
-
- @include viewport.until(sm) {
- order: 1;
- margin-left: 0;
- }
- }
-
- &__button.danger {
- background-color: var(--danger);
- color: var(--secondary);
- }
-
- &__button.danger:hover,
- &__button.danger:focus {
- background-color: var(--danger-hover);
- }
-
- &__button.danger:active {
- background-color: var(--danger-medium);
- }
-
- &__button.danger:disabled {
- background-color: var(--danger-low);
- }
-
- &__button-upload {
- display: block;
- background-color: transparent;
- margin-top: 1em;
- border: 1px solid var(--tertiary-high);
- text-align: center;
- color: var(--tertiary-high);
- }
-
- &__button-upload:hover {
- background-color: transparent;
- border-color: var(--tertiary-hover);
- color: var(--tertiary-hover);
- }
-
- &__button-upload svg {
- margin-left: 0.5em;
- }
-
- .wizard-hidden-upload-field {
- visibility: hidden;
- position: absolute;
- }
-
- &__button:last-child {
- margin-right: 0;
- }
-
&__step-footer {
display: flex;
- justify-content: space-between;
+ justify-content: space-around;
align-items: center;
@include viewport.until(sm) {
@@ -428,92 +293,6 @@ body.wizard {
border-radius: 4px;
}
- &__field.checkbox-field .wizard-container__label {
- cursor: pointer;
- display: inline-block;
- }
-
- &__checkbox-slider {
- display: inline-block;
- background: var(--primary-low-mid);
- border-radius: 16px;
- width: 50px;
- height: 28px;
- margin-right: 0.5em;
- position: relative;
- vertical-align: middle;
- transition: background 0.25s;
-
- @media only screen and (width <= 568px) {
- height: 20px;
- width: 35px;
- }
- }
-
- &__checkbox-slider::before,
- &__checkbox-slider::after {
- content: "";
- display: block;
- position: absolute;
- }
-
- &__checkbox-slider::after {
- content: "\2713"; // checkmark
- color: var(--secondary);
- top: 4px;
- left: 9px;
-
- @media only screen and (width <= 568px) {
- top: 3px;
- left: 5px;
- font-size: var(--font-down-3);
- }
- }
-
- &__checkbox-slider::before {
- background: var(--secondary);
- border-radius: 50%;
- width: 20px;
- height: 20px;
- top: 4px;
- left: 4px;
- transition: left 0.25s;
-
- @media only screen and (width <= 568px) {
- height: 12px;
- width: 12px;
- }
- }
-
- &__field.checkbox-field
- .wizard-container__label:hover
- .wizard-container__checkbox-slider::before {
- background: var(--secondary);
- box-shadow: 0 0 0 1px rgb(0, 0, 0, 0.15);
- }
-
- &__checkbox:checked + .wizard-container__checkbox-slider {
- background: var(--tertiary);
- }
-
- &__checkbox:checked + .wizard-container__checkbox-slider::before {
- left: 26px;
-
- @media only screen and (width <= 568px) {
- left: 20px;
- }
- }
-
- &__checkbox {
- position: absolute;
- visibility: hidden;
- }
-
- &__checkbox-label {
- position: relative;
- top: 2px;
- }
-
&__radio {
position: absolute;
visibility: hidden;
diff --git a/app/controllers/steps_controller.rb b/app/controllers/steps_controller.rb
index aeed15ca36afb..36727daa002ea 100644
--- a/app/controllers/steps_controller.rb
+++ b/app/controllers/steps_controller.rb
@@ -13,8 +13,7 @@ def update
if updater.success?
result = { success: "OK" }
- result[:refresh_required] = true if updater.refresh_required?
- render json: result
+ render json: result, status: :no_content
else
errors = []
updater.errors.messages.each do |field, msg|
diff --git a/app/serializers/wizard_field_choice_serializer.rb b/app/serializers/wizard_field_choice_serializer.rb
index 0a1fdf3e8925f..ec3950252623f 100644
--- a/app/serializers/wizard_field_choice_serializer.rb
+++ b/app/serializers/wizard_field_choice_serializer.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class WizardFieldChoiceSerializer < ApplicationSerializer
- attributes :id, :label, :extra_label, :description, :icon, :data
+ attributes :id, :label, :extra_label, :description, :data
def id
object.id
@@ -36,14 +36,6 @@ def include_description?
description.present?
end
- def icon
- object.icon
- end
-
- def include_icon?
- object.icon.present?
- end
-
def data
result = object.data.dup
result.delete(:id)
diff --git a/app/serializers/wizard_field_serializer.rb b/app/serializers/wizard_field_serializer.rb
index b4cb8a3b56377..51d7d0839f902 100644
--- a/app/serializers/wizard_field_serializer.rb
+++ b/app/serializers/wizard_field_serializer.rb
@@ -1,17 +1,7 @@
# frozen_string_literal: true
class WizardFieldSerializer < ApplicationSerializer
- attributes :id,
- :type,
- :required,
- :value,
- :label,
- :placeholder,
- :description,
- :extra_description,
- :icon,
- :disabled,
- :show_in_sidebar
+ attributes :id, :type, :required, :value, :label, :placeholder, :description, :extra_description
has_many :choices, serializer: WizardFieldChoiceSerializer, embed: :objects
def id
@@ -77,30 +67,6 @@ def include_extra_description?
extra_description.present?
end
- def icon
- object.icon
- end
-
- def include_icon?
- object.icon.present?
- end
-
- def disabled
- object.disabled
- end
-
- def include_disabled?
- object.disabled
- end
-
- def show_in_sidebar
- object.show_in_sidebar
- end
-
- def include_show_in_sidebar?
- object.show_in_sidebar.present?
- end
-
def include_choices?
object.type == "dropdown" || object.type == "radio"
end
diff --git a/app/serializers/wizard_step_serializer.rb b/app/serializers/wizard_step_serializer.rb
index 1fe6a15cafab6..344cfce3b56a2 100644
--- a/app/serializers/wizard_step_serializer.rb
+++ b/app/serializers/wizard_step_serializer.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class WizardStepSerializer < ApplicationSerializer
- attributes :id, :next, :previous, :description, :title, :index, :emoji
+ attributes :id, :title, :index, :emoji
has_many :fields, serializer: WizardFieldSerializer, embed: :objects
def id
@@ -12,24 +12,8 @@ def index
object.index
end
- def next
- object.next.id if object.next.present?
- end
-
- def include_next?
- object.next.present?
- end
-
- def previous
- object.previous.id if object.previous.present?
- end
-
- def include_previous?
- object.previous.present?
- end
-
def i18n_key
- @i18n_key ||= "wizard.step.#{object.id}".underscore
+ @i18n_key ||= "wizard.step.#{object.id}"
end
def translate(sub_key, vars = nil)
@@ -39,15 +23,6 @@ def translate(sub_key, vars = nil)
vars.nil? ? I18n.t(key) : I18n.t(key, vars)
end
- def description
- key = object.disabled ? "disabled" : "description"
- translate(key, object.description_vars)
- end
-
- def include_description?
- description.present?
- end
-
def title
translate("title")
end
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index f9e96ed295ab2..8482e83004b26 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -8585,83 +8585,4 @@ en:
wizard_js:
wizard:
- jump_in: "Jump in!"
- finish: "Exit setup"
- back: "Back"
- next: "Next"
- configure_more: "Configure more…"
- step-text: "Step"
- step: "%{current} of %{total}"
- upload: "Upload file"
- uploading: "Uploading…"
- upload_error: "Sorry, there was an error uploading that file. Please try again."
-
- staff_count:
- one: "Your community has %{count} staff (you)."
- other: "Your community has %{count} staff, including you."
-
- invites:
- add_user: "add"
- none_added: "You haven’t invited any staff. Are you sure you want to continue?"
- roles:
- admin: "Admin"
- moderator: "Moderator"
- regular: "Regular User"
-
- homepage_choices:
- custom:
- label: "Custom"
- description: "Display a %{type}-focused homepage with users landing on %{landingPage}"
- style_type:
- categories: "category"
- topics: "topic"
-
- top_menu_items:
- new: "New"
- unread: "Unread"
- top: "Top"
- latest: "Latest"
- hot: "Hot"
- categories: "Categories"
- unseen: "Unseen"
- read: "Read"
- bookmarks: "Bookmarks"
-
- previews:
- topic_title: "What books are you reading?"
- share_button: "Share"
- reply_button: "Reply"
- topic_preview: "Topic preview"
- homepage_preview: "Homepage preview"
-
- homepage_preview:
- nav_buttons:
- all_categories: "all categories"
- topic_titles:
- what_books: "What books are you reading?"
- what_movies: "What movies have you seen recently?"
- random_fact: "Random fact of the day"
- tv_show: "Recommend a TV show"
- what_hobbies: "What are your hobbies?"
- what_music: "What are you listening to right now?"
- funniest_thing: "Funniest thing you've seen today"
- share_art: "Share your art!"
- topic_ops:
- what_books: |
- We all love to read, let's use this topic to share our
- current or recent reads. I'm a fantasy fan and I've been
- re-reading The Lord of the Rings for the 100th time.
- What about you?
- category_descriptions:
- icebreakers: "Get to know your fellow community members with fun questions."
- news: "Discuss the latest news and events."
- site_feedback: "Share your thoughts on the community and suggest improvements."
- category_names:
- icebreakers: "Icebreakers"
- news: "News"
- site_feedback: "Site Feedback"
- table_headers:
- topic: "Topic"
- replies: "Replies"
- views: "Views"
- activity: "Activity"
+ jump_in: "Let's go!"
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 37afcf179f59a..a110afba27ecf 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -5526,24 +5526,16 @@ en:
wizard:
title: "Discourse Setup"
step:
- introduction:
- title: "About your site"
- description: "These will be shown on your login and any public pages. You can always change them later."
+ setup:
+ title: "Getting started"
+ description: "Let's get your community set up with the basics. You can always change these later."
fields:
title:
label: "Community name"
- placeholder: "Jane’s Hangout"
- site_description:
- label: "Describe your community in a sentence"
- placeholder: "A place for Jane and her friends to discuss cool stuff"
+ placeholder: "Jane's Hangout"
default_locale:
label: "Language"
-
- privacy:
- title: "Member access"
-
- fields:
login_required:
label: "Visibility"
description: "Is your community public or private?"
@@ -5567,89 +5559,6 @@ en:
label: "No, new members can join immediately"
"yes":
label: "Yes, new members must be approved by moderators"
- chat_enabled:
- placeholder: "Enable chat"
- extra_description: "Engage with your members in real time"
-
- ready:
- title: "Your site is ready!"
- description: "That's it! You've done the basics to setup your community. Now you can jump in and have a look around, write a welcome topic, and send invites!
Have fun!"
-
- styling:
- title: "Look and feel"
- fields:
- color_scheme:
- label: "Color palette"
- body_font:
- label: "Body font"
- site_font:
- label: "Font"
- heading_font:
- label: "Heading font"
- styling_preview:
- label: "Preview"
- homepage_style:
- label: "Homepage style"
- choices:
- latest:
- label: "Latest"
- description: "Displays the most recently active topics in all categories, helping members stay up-to-date with discussions they care about"
- hot:
- label: "Hot"
- description: "Surfaces trending topics by blending recent and overall popularity, showcases what members are talking about in your community right now"
- categories_and_latest_topics:
- label: "Categories with latest topics"
- description: "Combines the recently active topics across all categories with a list of categories, their description, and total topics"
- categories_boxes:
- label: "Category boxes"
- description: "Displays the categories and their description in a grid, ideal for members to see an overview of the sub-communities of your site"
-
- branding:
- title: "Site logo"
- fields:
- logo:
- label: "Primary logo"
- description: "Recommended size: 600 x 200"
- logo_small:
- label: "Square logo"
- description: "Recommended size: 512 x 512. Also used as the favicon and mobile home screen app icon."
-
- corporate:
- title: "Your organization"
- description: "The following information will be used in your Terms of Service and About pages. Feel free to skip if no company exists."
-
- fields:
- company_name:
- label: "Company name"
- placeholder: "Acme Organization"
- governing_law:
- label: "Governing law"
- placeholder: "California law"
- contact_url:
- label: "Web page"
- placeholder: "https://www.example.com/contact-us"
- city_for_disputes:
- label: "City for disputes"
- placeholder: "San Francisco, California"
- site_contact:
- label: "Automated messages"
- description: "All automated Discourse personal messages will be sent from this user, such as flag warnings and backup completion notices."
- contact_email:
- label: "Point of contact"
- placeholder: "example@user.com"
- description: "Email address of key contact responsible for this site. Used for critical notifications, and listed on your your about page for urgent matters."
-
- invites:
- title: "Invite Staff"
- description: "You’re almost done! Let’s invite some people to help seed your discussions with interesting topics and replies to get your community started."
- disabled: "Since local logins are disabled, it’s not possible to send invites to anyone. Please proceed to the next step."
-
- finished:
- title: "Your Discourse is Ready!"
- description: |
-
If you ever feel like changing these settings, re-run this wizard any time, or visit your admin section; find it next to the wrench icon in the site menu.
-It is easy to customize your Discourse even further using our powerful theming system. For examples, check out the top themes and components on meta.discourse.org.
-Have fun, and good luck building your new community!
search_logs: graph_title: "Search Count" diff --git a/frontend/discourse/app/static/wizard/components/fields/checkbox.gjs b/frontend/discourse/app/static/wizard/components/fields/checkbox.gjs deleted file mode 100644 index 67e13b21f3f5b..0000000000000 --- a/frontend/discourse/app/static/wizard/components/fields/checkbox.gjs +++ /dev/null @@ -1,37 +0,0 @@ -/* eslint-disable ember/no-classic-components */ -import Component, { Input } from "@ember/component"; -import { tagName } from "@ember-decorators/component"; -import PluginOutlet from "discourse/components/plugin-outlet"; -import icon from "discourse/helpers/d-icon"; -import lazyHash from "discourse/helpers/lazy-hash"; - -@tagName("") -export default class Checkbox extends Component { - - - -} diff --git a/frontend/discourse/app/static/wizard/components/fields/checkboxes.gjs b/frontend/discourse/app/static/wizard/components/fields/checkboxes.gjs deleted file mode 100644 index 21a2f2f6c0ef5..0000000000000 --- a/frontend/discourse/app/static/wizard/components/fields/checkboxes.gjs +++ /dev/null @@ -1,55 +0,0 @@ -/* eslint-disable ember/no-classic-components */ -import Component, { Input } from "@ember/component"; -import { on } from "@ember/modifier"; -import { action, set } from "@ember/object"; -import icon from "discourse/helpers/d-icon"; - -export default class Checkboxes extends Component { - init(...args) { - super.init(...args); - this.set("field.value", this.field.value || []); - - for (let choice of this.field.choices) { - if (this.field.value.includes(choice.id)) { - set(choice, "checked", true); - } - } - } - - @action - changed(checkbox) { - let newFieldValue = this.field.value; - const checkboxValue = checkbox.parentElement - .getAttribute("value") - .toLowerCase(); - - if (checkbox.checked) { - newFieldValue.push(checkboxValue); - } else { - const index = newFieldValue.indexOf(checkboxValue); - if (index > -1) { - newFieldValue.splice(index, 1); - } - } - this.set("field.value", newFieldValue); - } - - - {{#each this.field.choices as |c|}} -- {{htmlSafe @step.description}} -
- {{/if}} - {{/if}} +