Skip to content

Commit

Permalink
[MM-54440] Add link to notification docs in the Settings modal (matte…
Browse files Browse the repository at this point in the history
…rmost#24538)

* [MM-54440] Add link to notification docs in the Settings modal

* Fix i18n

* PR feedback
  • Loading branch information
devinbinnie committed Sep 13, 2023
1 parent 1ef935c commit c53b5f7
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,28 @@ Object {
<div
class="user-settings"
>
<h3
class="tab-header"
id="notificationSettingsTitle"
<div
class="notificationSettingsModalHeader"
>
Notifications
</h3>
<h3
class="tab-header"
id="notificationSettingsTitle"
>
Notifications
</h3>
<a
href="https://mattermost.com/pl/about-notifications?utm_source=mattermost&utm_medium=in-product&utm_content=&uid=&sid="
rel="noopener noreferrer"
target="_blank"
>
<i
class="icon icon-help-circle-outline"
/>
<span>
Learn more about notifications
</span>
</a>
</div>
<div
class="divider-dark first"
/>
Expand Down Expand Up @@ -248,12 +264,28 @@ Object {
<div
class="user-settings"
>
<h3
class="tab-header"
id="notificationSettingsTitle"
<div
class="notificationSettingsModalHeader"
>
Notifications
</h3>
<h3
class="tab-header"
id="notificationSettingsTitle"
>
Notifications
</h3>
<a
href="https://mattermost.com/pl/about-notifications?utm_source=mattermost&utm_medium=in-product&utm_content=&uid=&sid="
rel="noopener noreferrer"
target="_blank"
>
<i
class="icon icon-help-circle-outline"
/>
<span>
Learn more about notifications
</span>
</a>
</div>
<div
class="divider-dark first"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,37 @@
margin-block-start: 10px;
}
}

.notificationSettingsModalHeader {
display: flex;

> span {
align-self: center;
margin-left: auto;

a {
display: flex;

&:hover,
&:active,
&:focus {
color: var(--button-bg);
text-decoration: none;
}

> i {
font-size: 14.4px;
}

> span {
font-size: 12px;
font-weight: 600;
line-height: 16px;

&:hover {
text-decoration: underline;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {UserNotifyProps, UserProfile} from '@mattermost/types/users';

import type {ActionResult} from 'mattermost-redux/types/actions';

import ExternalLink from 'components/external_link';
import LocalizedIcon from 'components/localized_icon';
import SettingItem from 'components/setting_item';
import SettingItemMax from 'components/setting_item_max';
Expand Down Expand Up @@ -1085,15 +1086,29 @@ class NotificationsTab extends React.PureComponent<Props, State> {
ref={this.wrapperRef}
className='user-settings'
>
<h3
id='notificationSettingsTitle'
className='tab-header'
>
<div className='notificationSettingsModalHeader'>
<h3
id='notificationSettingsTitle'
className='tab-header'
>
<FormattedMessage
id='user.settings.notifications.header'
defaultMessage='Notifications'
/>
</h3>
<FormattedMessage
id='user.settings.notifications.header'
defaultMessage='Notifications'
id='user.settings.notifications.learnMore'
defaultMessage='<a>Learn more about notifications</a>'
values={{
a: (chunks: string) => ((
<ExternalLink href='https://mattermost.com/pl/about-notifications'>
<i className='icon icon-help-circle-outline'/>
<span>{chunks}</span>
</ExternalLink>
)),
}}
/>
</h3>
</div>
<div className='divider-dark first'/>
<DesktopNotificationSettings
activity={this.state.desktopActivity}
Expand Down
1 change: 1 addition & 0 deletions webapp/channels/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5424,6 +5424,7 @@
"user.settings.notifications.info": "Desktop notifications are available on Edge, Firefox, Safari, Chrome and Mattermost Desktop Apps.",
"user.settings.notifications.keywordsWithNotification.extraInfo": "Notifications are triggered when someone sends a message that includes your username (\"@{username}\") or any of the options selected above.",
"user.settings.notifications.keywordsWithNotification.title": "Keywords that trigger Notifications",
"user.settings.notifications.learnMore": "<a>Learn more about notifications</a>",
"user.settings.notifications.never": "Never",
"user.settings.notifications.off": "Off",
"user.settings.notifications.on": "On",
Expand Down

0 comments on commit c53b5f7

Please sign in to comment.