From 0620f6298e8558b370ab3aa81458b5fd45cc7661 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Mon, 22 Feb 2021 12:14:18 -0500 Subject: [PATCH] UX: Remove emoji step in wizard (#12169) --- app/assets/stylesheets/wizard.scss | 29 --------------------- config/locales/server.en.yml | 4 --- lib/wizard/builder.rb | 23 ---------------- spec/components/wizard/step_updater_spec.rb | 11 -------- 4 files changed, 67 deletions(-) diff --git a/app/assets/stylesheets/wizard.scss b/app/assets/stylesheets/wizard.scss index c2ba5c08142..0ec2ef2a7be 100644 --- a/app/assets/stylesheets/wizard.scss +++ b/app/assets/stylesheets/wizard.scss @@ -823,35 +823,6 @@ body.wizard { max-height: 500px; } -.wizard-step-emoji { - .radio-area { - display: flex; - flex-direction: row; - align-items: center; - - input { - flex: 1 0 0px; - } - - span { - flex: 10 0 0; - } - - span.extra-label { - flex: 20 0 0; - } - } - - .emoji-preview { - margin-left: 1em; - img { - height: 40px; - width: 40px; - padding-right: 0.5em; - } - } -} - .wizard-step-homepage { .field-homepage-style { width: 280px; diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 6eb78d05236..473ad850a7d 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -4843,10 +4843,6 @@ en: categories_boxes_with_topics: label: "Categories boxes with Topics" - emoji: - title: "Emoji" - description: "Which Emoji style do you prefer for your community? You can add more custom Emoji later via Admin, Customize, Emoji." - 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." diff --git a/lib/wizard/builder.rb b/lib/wizard/builder.rb index 2dd469431b5..014e514a4e0 100644 --- a/lib/wizard/builder.rb +++ b/lib/wizard/builder.rb @@ -265,29 +265,6 @@ class Wizard end end - @wizard.append_step('emoji') do |step| - sets = step.add_field(id: 'emoji_set', - type: 'radio', - required: true, - value: SiteSetting.emoji_set) - - emoji = ["smile", "+1", "tada", "poop"] - - EmojiSetSiteSetting.values.each do |set| - imgs = emoji.map do |e| - "" - end - - sets.add_choice(set[:value], - label: I18n.t("js.#{set[:name]}"), - extra_label: "#{imgs.join}") - - step.on_update do |updater| - updater.apply_settings(:emoji_set) - end - end - end - @wizard.append_step('invites') do |step| if SiteSetting.enable_local_logins staff_count = User.staff.human_users.where('username_lower not in (?)', reserved_usernames).count diff --git a/spec/components/wizard/step_updater_spec.rb b/spec/components/wizard/step_updater_spec.rb index a4ea41cc635..1f508507794 100644 --- a/spec/components/wizard/step_updater_spec.rb +++ b/spec/components/wizard/step_updater_spec.rb @@ -307,17 +307,6 @@ describe Wizard::StepUpdater do end end - context "emoji step" do - it "updates the fields correctly" do - updater = wizard.create_updater('emoji', emoji_set: "twitter") - updater.update - - expect(updater).to be_success - expect(wizard.completed_steps?('emoji')).to eq(true) - expect(SiteSetting.emoji_set).to eq('twitter') - end - end - context "homepage step" do it "updates the fields correctly" do updater = wizard.create_updater('homepage', homepage_style: "categories_and_top_topics")