Skip to content

Commit 71cdbab

Browse files
authored
feat: removed sort and filter tour (#535)
1 parent 831e133 commit 71cdbab

File tree

5 files changed

+19
-66
lines changed

5 files changed

+19
-66
lines changed

src/Notifications/NotificationEmptySection.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const EmptyNotifications = () => {
2323
src={NotificationsNone}
2424
iconAs={Icon}
2525
variant="light"
26-
id="bell-icon"
2726
iconClassNames="text-primary-500"
2827
className="ml-4 mr-1 notification-button notification-lg-bell-icon pl-2"
2928
data-testid="notification-bell-icon"

src/Notifications/index.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ const Notifications = () => {
143143
src={NotificationsNone}
144144
iconAs={Icon}
145145
variant="light"
146-
id="bell-icon"
147146
iconClassNames="text-primary-500"
148147
className="ml-4 mr-1 notification-button"
149148
data-testid="notification-bell-icon"

src/Notifications/tours/constants.js

+10-40
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,18 @@
1-
/* eslint-disable react/jsx-filename-extension */
2-
import React from 'react';
3-
import { Icon, Hyperlink } from '@edx/paragon';
4-
import { Settings } from '@edx/paragon/icons';
5-
import { getConfig } from '@edx/frontend-platform';
61
import messages from './messages';
72

3+
/**
4+
*
5+
* @param {Object} intl
6+
* @returns {Object} tour checkpoints
7+
*/
88
export default function tourCheckpoints(intl) {
99
return {
10-
NOTIFICATION_TOUR: [
10+
EXAMPLE_TOUR: [
1111
{
12-
body: (
13-
<>
14-
<p>
15-
{intl.formatMessage(messages.notificationTourPreferenceBody)}
16-
<Hyperlink
17-
destination={`${getConfig().ACCOUNT_SETTINGS_URL}/notifications`}
18-
target="_blank"
19-
rel="noopener noreferrer"
20-
showLaunchIcon={false}
21-
className="d-inline-block px-1.5"
22-
>
23-
<Icon
24-
src={Settings}
25-
className="icon-size-20 text-primary-500"
26-
data-testid="tour-setting-icon"
27-
screenReaderText="preferences settings icon"
28-
/>
29-
</Hyperlink>
30-
</p>
31-
<p>
32-
{intl.formatMessage(messages.notificationTourGuideBody)}
33-
<Hyperlink
34-
destination="https://edx.readthedocs.io/projects/open-edx-learner-guide/en/latest/sfd_notifications/managing_notifications.html"
35-
target="_blank"
36-
rel="noopener noreferrer"
37-
>
38-
{intl.formatMessage(messages.notificationTourGuideLink)}
39-
</Hyperlink>
40-
</p>
41-
</>
42-
),
43-
placement: 'left',
44-
target: '#bell-icon',
45-
title: intl.formatMessage(messages.notificationTourTitle),
12+
title: intl.formatMessage(messages.exampleTourTitle),
13+
body: intl.formatMessage(messages.exampleTourBody),
14+
target: '#example-tour-target',
15+
placement: 'bottom',
4616
},
4717
],
4818
};

src/Notifications/tours/data/hooks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const useTourConfiguration = () => {
2020
}, [dispatch]);
2121

2222
const toursConfig = useMemo(() => (
23-
tours?.map((tour) => tour.tourName === intl.formatMessage(messages.notificationTourId) && (
23+
tours?.map((tour) => Object.keys(tourCheckpoints(intl)).includes(tour.tourName) && (
2424
{
2525
tourId: tour.tourName,
2626
dismissButtonText: intl.formatMessage(messages.dismissButtonText),

src/Notifications/tours/messages.js

+8-23
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import { defineMessages } from '@edx/frontend-platform/i18n';
22

33
const messages = defineMessages({
4-
notificationTourId: {
5-
id: 'notification.tour.id',
6-
defaultMessage: 'notification_tour',
7-
description: 'Notification Tour Id',
8-
},
94
dismissButtonText: {
105
id: 'tour.action.dismiss',
116
defaultMessage: 'Dismiss',
@@ -16,25 +11,15 @@ const messages = defineMessages({
1611
defaultMessage: 'Okay',
1712
description: 'Action to end current tour',
1813
},
19-
notificationTourPreferenceBody: {
20-
id: 'notification.tour.preference.body',
21-
defaultMessage: 'Click the bell icon to see Discussion notifications and customize your preferences by clicking on the gear icon.',
22-
description: 'Body of the tour for the notification preferences',
23-
},
24-
notificationTourGuideBody: {
25-
id: 'notification.tour.guide.body',
26-
defaultMessage: 'Certain notifications are enabled by default, as further detailed in the ',
27-
description: 'Body of the tour for the notification for the guide',
28-
},
29-
notificationTourGuideLink: {
30-
id: 'notification.tour.guide.link',
31-
defaultMessage: "edX Learner's Guide.",
32-
description: 'Link of the tour for the notification for the guide',
14+
exampleTourTitle: {
15+
id: 'tour.example.title',
16+
defaultMessage: 'Example Tour',
17+
description: 'Title for example tour',
3318
},
34-
notificationTourTitle: {
35-
id: 'notification.tour.title',
36-
defaultMessage: 'Stay informed!',
37-
description: 'Title of the notification tour',
19+
exampleTourBody: {
20+
id: 'tour.example.body',
21+
defaultMessage: 'This is an example tour',
22+
description: 'Body for example tour',
3823
},
3924
});
4025

0 commit comments

Comments
 (0)