# サイドバーにデフォルトのタグが表示されるのは、ユーザー設定が空の場合

**URL:** https://meta.discourse.org/t/default-tags-appear-in-sidebar-if-user-preference-is-empty/239548
**Category:** UX
**Tags:** sidebar
**Created:** [2022 年 9 月 20 日午後 2:11 UTC](https://meta.discourse.org/t/default-tags-appear-in-sidebar-if-user-preference-is-empty/239548 "2022-09-20T14:11:20Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2022 年 9 月 20 日午後 2:11 UTC](https://meta.discourse.org/t/default-tags-appear-in-sidebar-if-user-preference-is-empty/239548/1 "2022-09-20T14:11:21Z")

</div>

サイドバーのタグリストを空にしようとすると、「official」が戻ってきます。

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2022 年 9 月 20 日午後 2:18 UTC](https://meta.discourse.org/t/default-tags-appear-in-sidebar-if-user-preference-is-empty/239548/2 "2022-09-20T14:18:31Z")

</div>

管理者はサイドバーのデフォルトのカテゴリとタグのセットを設定できます。メタでは、現在、`#official` のみがデフォルトタグとなるように設定しています。

ユーザーの設定が空の場合、デフォルトタグでそれを埋めますが、意図的に空にしている場合は予期しない動作となる可能性があります。

空の設定の処理方法について、いくつか変更を予定しています。

現在考えている仕様は以下の通りです。

サイドバーのカテゴリとタグの空の設定とデフォルトの空の設定の処理方法を更新し、設定を促しつつ、それらを使用しないサイトやユーザーを煩わせないようにしたいと考えています。

アプローチは以下の通りです。

1. スタッフにデフォルト設定を促す
2. デフォルト設定が存在することを、これらのセクションをユーザーに表示するシグナルとして扱う
3. デフォルト設定が構成されていない場合、ユーザーに対してセクションを非表示にする

より詳細なロジックは以下の通りです。

1. サイトにタグがない場合
  - 全員に対してタグセクションを非表示にする
  - サイドバータグのユーザー設定を非表示にする

2. サイトにデフォルトタグがない場合
  - ユーザーがタグを設定していない場合、タグセクションを非表示にする。設定でタグを設定した場合は、セクションを表示する。
  - タグセクションの下部に、「デフォルトタグを設定」へのリンクを管理者に表示する（自身で設定したタグがある場合はその下）。

3. サイトにデフォルトカテゴリがない場合
  - ユーザーがカテゴリを設定していない場合、カテゴリセクションを非表示にする。設定でカテゴリを設定した場合は、セクションを表示する。
  - カテゴリセクションの下部に、「デフォルトカテゴリを設定」へのリンクを管理者に表示する（自身で設定したタグがある場合はその下）。

4. サイトにタグとデフォルトタグがあるが、ユーザーが何も設定していない場合
  - サイドバーに「タグを追加」へのリンクを表示する。

5. サイトにデフォルトカテゴリがあるが、ユーザーが何も設定していない場合
  - サイドバーに「カテゴリを追加」へのリンクを表示する。

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2022 年 9 月 20 日午後 2:23 UTC](https://meta.discourse.org/t/default-tags-appear-in-sidebar-if-user-preference-is-empty/239548/3 "2022-09-20T14:23:26Z")

</div>

Dave、その理由がわかりました。迅速かつ詳細なご回答、ありがとうございます！！

> [@mcwumbly](#):
>
> - サイトにタグとデフォルトが存在し、ユーザー側に設定がない場合
> - サイドバーに「タグを追加」へのリンクを表示
> - サイトにデフォルトのカテゴリが存在し、ユーザー側に設定がない場合
> - サイドバーに「カテゴリを追加」へのリンクを表示

これについては、#Contribute > UX で投稿しようと思っていたところでした。

![image](https://sea3.discourse-cdn.com/meta/images/transparent.png)

これは初めて利用するユーザーにとっては良い案ですね。

ただし、ユーザーがカテゴリ（またはタグ）セクションを明示的にクリアした後には、セクション全体が完全に消えるようにすると良いでしょう。

ユーザーはカテゴリやタグの設定方法と場所を明確に理解しており、あえて空にしました。それなのに再び促しが表示されるのは、彼らが設定を望んでいないことが既にわかっているためです。

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2022 年 9 月 20 日午後 2:34 UTC](https://meta.discourse.org/t/default-tags-appear-in-sidebar-if-user-preference-is-empty/239548/4 "2022-09-20T14:34:08Z")

</div>

> [@RGJ](#):
>
> ユーザーが明示的にカテゴリ（またはタグ）セクションをクリアした後、セクション全体が完全に消えるようにすると良いでしょう。
> 
> ユーザーは明らかにカテゴリやタグの設定方法と場所を知っており、明示的に空にしたのに、設定したくないことがすでにわかっているのに、その通知が再び表示されます。

これは非常にしっかりした根拠だと思いますし、「促す」ことと「しつこく言う」ことのバランスを見つけることが重要であるという点を重視してくださっていることに感謝します。私の上記の根拠は、コミュニティのメンバーのユーザーエクスペリエンスを定義する上で、管理者に少しでも多くの権限を与えることです。

セクションが完全に非表示になった場合、ユーザーがこれらの項目を追加する方法を簡単に見つけられなくなるのではないかという懸念があります。なぜなら、削除するためにそこへ行く経路（セクション内のリンクをクリックする）と、再度追加するためにそこへ行く経路（設定ページを直接見つける）が異なるからです。

しかし、これは今後、さらに学習していく中で進化し続ける分野になると予想しています。

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2022 年 11 月 5 日午前 1:41 UTC](https://meta.discourse.org/t/default-tags-appear-in-sidebar-if-user-preference-is-empty/239548/6 "2022-11-05T01:41:29Z")

</div>

@tgxworld 上記で概説した計画を完了するためのPRがいくつか最近作成されました。

> <https://github.com/discourse/discourse/pull/18620>
>
> The previous sidebar default tags and categories implementation did not
> allow f…or a user to configure their sidebar to have no categories or
> tags. This commit changes how the defaults are applied. When a user is being created,
> we create the SidebarSectionLink records based on the \`default\_sidebar\_categories\` and
> \`default\_sidebar\_tags\` site settings. SidebarSectionLink records are
> only created for categories and tags which the user has visibility on at
> the point of user creation.
> 
> With this change, we're also adding the ability for admins to apply
> changes to the \`default\_sidebar\_categories\` and \`default\_sidebar\_tags\`
> site settings historically when changing their site setting. When a new
> category/tag has been added to the default, the new category/tag will be
> added to the sidebar for all users if the admin elects to apply the changes historically.
> Like wise when a tag/category is removed, the tag/category will be
> removed from the sidebar for all users if the admin elects to apply the
> changes historically.
> 
> Internal Ref: /t/73500

> <https://github.com/discourse/discourse/pull/18787>
>
> Internal Ref: /t/73500
> 
> \### Screenshots
> 
> \#### Before
> 
> !\[Screenshot from 20…22-10-28 10-18-39\](https://user-images.githubusercontent.com/4335742/198464292-851729a4-ddb2-4ff9-a7fc-76b192c99824.png)
> 
> \#### After
> 
> !\[Screenshot from 2022-10-28 10-18-17\](https://user-images.githubusercontent.com/4335742/198464339-2ef9d09e-3c02-4dd3-bbcf-539fe768459c.png)

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2022 年 11 月 9 日午前 3:41 UTC](https://meta.discourse.org/t/default-tags-appear-in-sidebar-if-user-preference-is-empty/239548/7 "2022-11-09T03:41:45Z")

</div>

このトピックは4日後に自動的に閉じられました。返信はもう許可されていません。
