UX: Various improvements to welcome topic CTA (#21010)

- Update welcome topic copy
- Edit the welcome topic automatically when the title or description changes
- Remove “Create your Welcome Topic” banner/CTA
- Add "edit welcome topic" user tip
This commit is contained in:
Bianca Nenciu
2023-05-12 16:09:40 +02:00
committed by GitHub
parent b85d057df4
commit b73a9a1faa
30 changed files with 86 additions and 487 deletions

View File

@ -84,8 +84,14 @@ module SeedData
if general_category = Category.find_by(id: SiteSetting.general_category_id)
topics << {
site_setting_name: "welcome_topic_id",
title: I18n.t("discourse_welcome_topic.title"),
raw: I18n.t("discourse_welcome_topic.body", base_path: Discourse.base_path),
title: I18n.t("discourse_welcome_topic.title", site_title: SiteSetting.title),
raw:
I18n.t(
"discourse_welcome_topic.body",
base_path: Discourse.base_path,
site_title: SiteSetting.title,
site_description: SiteSetting.site_description,
),
category: general_category,
after_create: proc { |post| post.topic.update_pinned(true, true) },
}