Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit d014756

Browse files
authored
GYU: Update banner (#11211)
* Update help text * chore: fixed lint issues * update i18n * Update button text * Correct css for settings banners
1 parent 99343e8 commit d014756

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

res/css/views/settings/tabs/_SettingsBanner.pcss

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ limitations under the License.
1616

1717
.mx_SettingsBanner {
1818
background: $system;
19-
line-height: 2.25rem;
2019
border-radius: 8px;
2120
padding: 12px 16px;
2221
gap: 12px;
@@ -29,7 +28,6 @@ limitations under the License.
2928
}
3029

3130
.mx_AccessibleButton {
32-
align-self: initial;
3331
white-space: nowrap;
3432
}
3533
}

src/components/views/settings/notifications/NotificationSettings2.tsx

+15-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import SettingsStore from "../../../../settings/SettingsStore";
3131
import { NotificationColor } from "../../../../stores/notifications/NotificationColor";
3232
import { clearAllNotifications } from "../../../../utils/notifications";
3333
import AccessibleButton from "../../elements/AccessibleButton";
34+
import ExternalLink from "../../elements/ExternalLink";
3435
import LabelledCheckbox from "../../elements/LabelledCheckbox";
3536
import LabelledToggleSwitch from "../../elements/LabelledToggleSwitch";
3637
import StyledRadioGroup from "../../elements/StyledRadioGroup";
@@ -76,6 +77,10 @@ function boldText(text: string): JSX.Element {
7677
return <strong>{text}</strong>;
7778
}
7879

80+
function helpLink(sub: string): JSX.Element {
81+
return <ExternalLink href="https://element.io/help#settings2">{sub}</ExternalLink>;
82+
}
83+
7984
function useHasUnreadNotifications(): boolean {
8085
const cli = useMatrixClientContext();
8186
return cli.getRooms().some((room) => room.getUnreadNotificationCount() > 0);
@@ -101,13 +106,20 @@ export default function NotificationSettings2(): JSX.Element {
101106
{hasPendingChanges && model !== null && (
102107
<SettingsBanner
103108
icon={<img src={NewAndImprovedIcon} alt="" width={12} />}
104-
action={_t("Switch now")}
109+
action={_t("Proceed")}
105110
onAction={() => reconcile(model!)}
106111
>
107112
{_t(
108-
"<strong>Update:</strong> We have updated our notification settings. This won’t affect your previously selected settings.",
113+
"<strong>Update:</strong>" +
114+
"We’ve simplified Notifications Settings to make options easier to find. " +
115+
"Some custom settings you’ve chosen in the past are not shown here, but they’re still active. " +
116+
"If you proceed, some of your settings may change. " +
117+
"<a>Learn more</a>",
109118
{},
110-
{ strong: boldText },
119+
{
120+
strong: boldText,
121+
a: helpLink,
122+
},
111123
)}
112124
</SettingsBanner>
113125
)}

src/i18n/strings/en_EN.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1783,8 +1783,8 @@
17831783
"Select which emails you want to send summaries to. Manage your emails in <button>General</button>.": "Select which emails you want to send summaries to. Manage your emails in <button>General</button>.",
17841784
"People, Mentions and Keywords": "People, Mentions and Keywords",
17851785
"Mentions and Keywords only": "Mentions and Keywords only",
1786-
"Switch now": "Switch now",
1787-
"<strong>Update:</strong> We have updated our notification settings. This won’t affect your previously selected settings.": "<strong>Update:</strong> We have updated our notification settings. This won’t affect your previously selected settings.",
1786+
"Proceed": "Proceed",
1787+
"<strong>Update:</strong>We’ve simplified Notifications Settings to make options easier to find. Some custom settings you’ve chosen in the past are not shown here, but they’re still active. If you proceed, some of your settings may change. <a>Learn more</a>": "<strong>Update:</strong>We’ve simplified Notifications Settings to make options easier to find. Some custom settings you’ve chosen in the past are not shown here, but they’re still active. If you proceed, some of your settings may change. <a>Learn more</a>",
17881788
"Show message preview in desktop notification": "Show message preview in desktop notification",
17891789
"I want to be notified for (Default Setting)": "I want to be notified for (Default Setting)",
17901790
"This setting will be applied by default to all your rooms.": "This setting will be applied by default to all your rooms.",

0 commit comments

Comments
 (0)