DEV: replaces topic-notifications-options by DMenu (#30298)

This commit introduces <NotificationsTracking /> which is a wrapper component around <DMenu /> which replaces the select-kit component <TopicNotificationsButton />.

Each tracking case has its dedicated component:

- topic -> `<TopicNotificationsTracking />`
- group -> `<GroupNotificationsTracking />`
- tag -> `<TagNotificationsTracking />`
- category -> `<CategoryNotificationsTracking />`
- chat thread -> `<ThreadNotificationsTracking />`
This commit is contained in:
Joffrey JAFFEUX
2024-12-16 19:59:18 +01:00
committed by GitHub
parent 062e4fb4f3
commit 41df705188
38 changed files with 565 additions and 289 deletions

View File

@ -1,5 +1,4 @@
import { hash } from "@ember/helper";
import CategoryNotificationsButton from "select-kit/components/category-notifications-button";
import CategoryNotificationsTracking from "discourse/components/category-notifications-tracking";
import BaseField from "./da-base-field";
import DAFieldDescription from "./da-field-description";
import DAFieldLabel from "./da-field-label";
@ -11,10 +10,9 @@ export default class CategoryNotficationLevelField extends BaseField {
<DAFieldLabel @label={{@label}} @field={{@field}} />
<div class="controls">
<CategoryNotificationsButton
@value={{@field.metadata.value}}
<CategoryNotificationsTracking
@levelId={{@field.metadata.value}}
@onChange={{this.mutValue}}
@options={{hash showFullTitle=true}}
/>
<DAFieldDescription @description={{@description}} />