* Refactor NotificationBadge to shared MVVM * Added snapshot images * Replace legacy NotificationBadge with adapter * Fix Eslint * Use regular NotificationBadge prop names * Remove legacy NotificationBadge selectors * Update TAC badge Playwright selectors * Rename NotificationBadgeAdapter to NotificationBadge Addresses review feedback: the component is the app-facing badge, not an adapter, so name it NotificationBadge. * Make NotificationBadgeView isClickable a required boolean Addresses review feedback: there is no semantic difference between `isClickable: false` and `isClickable: undefined` (both render the non-interactive variant), so the field should be a plain boolean. The view model always provides it. * Drop redundant comparison guards in NotificationBadge view model setters Addresses review feedback: Snapshot.merge already compares each field with Object.is and only emits when something actually changed, so the manual equality guards in each setter were redundant. Recompute the snapshot unconditionally and let merge dedupe. * Resolve notification badge labels inside NotificationBadgeView Addresses review feedback: static UI labels belong in the view, not the snapshot. The view now resolves the knock and unsent-message strings via useI18n, and the snapshot exposes a showUnsentTooltip boolean instead of a prebuilt tooltipLabel (and drops knockLabel entirely). Adds the room|knock_sent and notifications|message_didnt_send keys to the shared-components i18n catalogue so they resolve in tests and storybook. * Remove unused translation because of shared components movement * Fix typescript issue * Fix lint issue * Remove unused notification badge count setting * Pass notification badge class names explicitly
67 lines
1.5 KiB
Plaintext
67 lines
1.5 KiB
Plaintext
/*
|
|
Copyright 2024 New Vector Ltd.
|
|
Copyright 2023 The Matrix.org Foundation C.I.C.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE files in the repository root for full details.
|
|
*/
|
|
|
|
.mx_SettingsTab .mx_NotificationSettings2 {
|
|
.mx_SettingsSection_subSections {
|
|
color: $primary-content;
|
|
gap: 32px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.mx_SettingsSubsection_description {
|
|
margin-bottom: 20px;
|
|
|
|
.mx_SettingsSubsection_text {
|
|
.mx_NotificationSettings2_notificationBadge {
|
|
vertical-align: baseline;
|
|
display: inline-flex;
|
|
margin: 0 2px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.mx_SettingsSubsection_content {
|
|
margin-top: 12px;
|
|
gap: 12px;
|
|
justify-items: stretch;
|
|
justify-content: stretch;
|
|
}
|
|
|
|
.mx_StyledRadioButton_content {
|
|
margin-left: 10px;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.mx_TagComposer {
|
|
margin-top: 16px;
|
|
|
|
&.mx_TagComposer_disabled {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.mx_TagComposer_tags {
|
|
margin-top: 16px;
|
|
gap: 8px;
|
|
|
|
.mx_Tag {
|
|
border-radius: 18px;
|
|
padding: 6px 12px;
|
|
background: $panel-actions;
|
|
margin: 0;
|
|
|
|
.mx_Tag_delete {
|
|
background: $tertiary-content;
|
|
color: #fff;
|
|
align-self: initial;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|