mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
notifications: Add help link for "Followed topics" in triggers table.
Previously, the Notification triggers table in Settings lacked a direct link to documentation for 'Followed topics'. This commit updates the AllNotifications type to include an optional 'help_link' field and adds conditional rendering in the template to show the help icon only if 'help_link' is present.The corresponding test has been updated to verify the presence of the help link. This enables direct links to relevant docs, improving usability. Fixes: #32033.
This commit is contained in:
committed by
Tim Abbott
parent
a19287d581
commit
d3ac1d5cb1
@@ -834,7 +834,11 @@ export function get_notifications_table_row_data(
|
||||
}
|
||||
|
||||
export type AllNotifications = {
|
||||
general_settings: {label: string; notification_settings: NotificationSettingCheckbox[]}[];
|
||||
general_settings: {
|
||||
label: string;
|
||||
notification_settings: NotificationSettingCheckbox[];
|
||||
help_link?: string;
|
||||
}[];
|
||||
settings: {
|
||||
desktop_notification_settings: string[];
|
||||
mobile_notification_settings: string[];
|
||||
@@ -870,6 +874,7 @@ export const all_notifications = (settings_object: Settings): AllNotifications =
|
||||
followed_topic_notification_settings,
|
||||
settings_object,
|
||||
),
|
||||
help_link: "/help/follow-a-topic",
|
||||
},
|
||||
],
|
||||
settings: {
|
||||
|
||||
@@ -29,7 +29,12 @@
|
||||
<tbody>
|
||||
{{#each general_settings}}
|
||||
<tr>
|
||||
<td>{{ this.label }}</td>
|
||||
<td>
|
||||
{{ this.label }}
|
||||
{{#if this.help_link}}
|
||||
{{> ../help_link_widget link=this.help_link }}
|
||||
{{/if}}
|
||||
</td>
|
||||
{{#each this.notification_settings}}
|
||||
{{> notification_settings_checkboxes
|
||||
setting_name=this.setting_name
|
||||
|
||||
@@ -119,6 +119,7 @@ run_test("all_notifications", ({override}) => {
|
||||
},
|
||||
{
|
||||
label: "translated: Followed topics",
|
||||
help_link: "/help/follow-a-topic",
|
||||
notification_settings: [
|
||||
{
|
||||
is_checked: false,
|
||||
|
||||
Reference in New Issue
Block a user