Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added link to documentation on preferences UI #869

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ $fa-font-path: "~font-awesome/fonts";
padding-left: 0.625rem;
}

.notification-sub-heading {
font-size: 14px;
line-height: 28px;
}

.text-decoration-underline {
text-decoration: underline;
}

.pgn__hyperlink__external-icon{
margin-left: 4px;
}

.notification-preferences {
input[type="checkbox"] {
margin-right: 0;
Expand Down
17 changes: 15 additions & 2 deletions src/notification-preferences/NotificationPreferences.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import React, { useEffect, useMemo } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Link, useParams } from 'react-router-dom';
import { useIntl } from '@edx/frontend-platform/i18n';
import { Container, Icon, Spinner } from '@edx/paragon';
import {
Container, Icon, Spinner, Hyperlink,
} from '@edx/paragon';
import { ArrowBack } from '@edx/paragon/icons';
import {
selectCourseListStatus,
Expand Down Expand Up @@ -56,9 +58,20 @@ const NotificationPreferences = () => {

return (
<Container size="sm" className="notification-preferences">
<h2 className="notification-heading mt-6 mb-5.5">
<h2 className="notification-heading mt-6 mb-4.5">
{intl.formatMessage(messages.notificationHeading)}
</h2>
<div className="mb-6 text-gray-700">
{intl.formatMessage(messages.notificationPreferenceGuideBody)}
<Hyperlink
destination="https://edx.readthedocs.io/projects/open-edx-learner-guide/en/latest/sfd_notifications/managing_notifications.html"
target="_blank"
rel="noopener noreferrer"
className="text-decoration-underline"
>
{intl.formatMessage(messages.notificationPreferenceGuideLink)}
</Hyperlink>
</div>
<div className="h-100">
<div className="d-flex mb-5">
<Link to="/notifications">
Expand Down
10 changes: 10 additions & 0 deletions src/notification-preferences/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@ export const messages = defineMessages({
defaultMessage: 'Load more courses',
description: 'Load more button to load more courses',
},
notificationPreferenceGuideLink: {
id: 'notification.preference.guide.link',
defaultMessage: 'as detailed here',
description: 'Link of the notification preference for learner guide',
},
notificationPreferenceGuideBody: {
id: 'notification.preference.guide.body',
defaultMessage: 'Notifications for certain activities are enabled by default, ',
description: 'Body of the notification preferences for learner guide',
},
});
Loading