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

@ -51,15 +51,11 @@
</StyleguideExample>
<StyleguideExample
@title="<TopicNotificationOptions>"
@title="<TopicNotificationsTracking>"
@initialValue={{1}}
as |value|
>
<TopicNotificationsOptions
@topic={{@dummy.topic}}
@value={{value}}
@onChange={{fn (mut value)}}
/>
<TopicNotificationsTracking @levelId={{value}} @onChange={{fn (mut value)}} />
</StyleguideExample>
<StyleguideExample
@ -82,20 +78,8 @@
<CategoriesAdminDropdown @onChange={{@dummyAction}} />
</StyleguideExample>
<StyleguideExample @title="<CategoryNotificationsButton>">
<CategoryNotificationsButton
@category={{get @dummy "categories.0"}}
@value={{1}}
@onChange={{@dummyAction}}
/>
</StyleguideExample>
<StyleguideExample @title="<NotificationsButton>">
<NotificationsButton
@options={{hash i18nPrefix="groups.notifications"}}
@value={{2}}
@onChange={{@dummyAction}}
/>
<StyleguideExample @title="<CategoryNotificationsTracking>">
<CategoryNotificationsTracking @levelId={{1}} @onChange={{@dummyAction}} />
</StyleguideExample>
<StyleguideExample @title="<DropdownSelectBox>">