Skip to content

Commit

Permalink
ICU-711 Fix help text missing for Channel Notification preferences (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
enahum authored and GoldUniform committed Feb 6, 2018
1 parent aae37a4 commit acd3c2f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
18 changes: 14 additions & 4 deletions components/channel_notifications_modal/components/extra_info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {FormattedMessage} from 'react-intl';
import {NotificationSections} from 'utils/constants.jsx';

export default function ExtraInfo({section}) {
if (section === NotificationSections.DESKTOP) {
switch (section) {
case NotificationSections.DESKTOP:
return (
<span>
<FormattedMessage
Expand All @@ -17,7 +18,7 @@ export default function ExtraInfo({section}) {
/>
</span>
);
} else if (section === NotificationSections.PUSH) {
case NotificationSections.PUSH:
return (
<span>
<FormattedMessage
Expand All @@ -26,9 +27,18 @@ export default function ExtraInfo({section}) {
/>
</span>
);
case NotificationSections.MARK_UNREAD:
return (
<span>
<FormattedMessage
id='channel_notifications.unreadInfo'
defaultMessage='The channel name is bolded in the sidebar when there are unread messages. Selecting "Only for mentions" will bold the channel only when you are mentioned.'
/>
</span>
);
default:
return null;
}

return null;
}

ExtraInfo.propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ exports[`components/channel_notifications_modal/ExtraInfo should match snapshot,
</span>
`;

exports[`components/channel_notifications_modal/ExtraInfo should match snapshot, on MARK_UNREAD 1`] = `""`;
exports[`components/channel_notifications_modal/ExtraInfo should match snapshot, on MARK_UNREAD 1`] = `
<span>
<FormattedMessage
defaultMessage="The channel name is bolded in the sidebar when there are unread messages. Selecting \\"Only for mentions\\" will bold the channel only when you are mentioned."
id="channel_notifications.unreadInfo"
values={Object {}}
/>
</span>
`;

exports[`components/channel_notifications_modal/ExtraInfo should match snapshot, on PUSH 1`] = `
<span>
Expand Down

0 comments on commit acd3c2f

Please sign in to comment.