mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:23:25 +08:00
UX: Remove emoji step in wizard (#12169)
This commit is contained in:
parent
3ba0a47e61
commit
0620f6298e
|
@ -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;
|
||||
|
|
|
@ -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 <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."
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user