UX: Remove emoji step in wizard (#12169)

This commit is contained in:
Penar Musaraj 2021-02-22 12:14:18 -05:00 committed by GitHub
parent 3ba0a47e61
commit 0620f6298e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 67 deletions

View File

@ -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;

View File

@ -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: "Youre almost done! Lets invite some people to help <a href='https://blog.discourse.org/2014/08/building-a-discourse-community/' target='blank'>seed your discussions</a> with interesting topics and replies to get your community started."

View File

@ -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|
"<img src='#{Discourse.base_path}/images/emoji/#{set[:value]}/#{e}.png'>"
end
sets.add_choice(set[:value],
label: I18n.t("js.#{set[:name]}"),
extra_label: "<span class='emoji-preview'>#{imgs.join}</span>")
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

View File

@ -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")