Skip to content

Commit 035d766

Browse files
authored
feat: removed sort and filter tour (#638)
1 parent ee61d1c commit 035d766

File tree

5 files changed

+24
-41
lines changed

5 files changed

+24
-41
lines changed

src/discussions/post-comments/comments/CommentsSort.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const CommentSortDropdown = () => {
4444
<>
4545
<div className="comments-sort d-flex justify-content-end mx-4 mt-2">
4646
<Button
47-
id="comment-sort"
4847
alt={intl.formatMessage(messages.actionsAlt)}
4948
ref={setTarget}
5049
variant="tertiary"

src/discussions/posts/post-filter-bar/PostFilterBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ const PostFilterBar = () => {
197197
cohort: capitalize(selectedCohort?.name),
198198
})}
199199
</span>
200-
<span id="icon-tune">
200+
<span>
201201
<Collapsible.Visible whenClosed>
202202
<Icon src={Tune} />
203203
</Collapsible.Visible>

src/discussions/tours/DiscussionsProductTour.jsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ const DiscussionsProductTour = () => {
1717
}, []);
1818

1919
return (
20-
// eslint-disable-next-line react/jsx-no-useless-fragment
21-
<>
22-
{!isEmpty(config) && (
23-
<ProductTour
24-
tours={config}
25-
/>
26-
)}
27-
</>
20+
!isEmpty(config) && (
21+
<ProductTour
22+
tours={config}
23+
/>
24+
)
2825
);
2926
};
3027

src/discussions/tours/constants.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
import messages from './messages';
22

3+
/**
4+
*
5+
* @param {Object} intl
6+
* @returns {Object} tour checkpoints
7+
*/
38
export default function tourCheckpoints(intl) {
49
return {
5-
NOT_RESPONDED_FILTER: [
10+
EXAMPLE_TOUR: [
611
{
7-
body: intl.formatMessage(messages.notRespondedFilterTourBody),
8-
placement: 'right',
9-
target: '#icon-tune',
10-
title: intl.formatMessage(messages.notRespondedFilterTourTitle),
11-
},
12-
],
13-
RESPONSE_SORT: [
14-
{
15-
body: intl.formatMessage(messages.responseSortTourBody),
16-
placement: 'left',
17-
target: '#comment-sort',
18-
title: intl.formatMessage(messages.responseSortTourTitle),
12+
title: intl.formatMessage(messages.exampleTourTitle),
13+
body: intl.formatMessage(messages.exampleTourBody),
14+
target: '#example-tour-target',
15+
placement: 'bottom',
1916
},
2017
],
2118
};

src/discussions/tours/messages.js

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,15 @@ const messages = defineMessages({
1616
defaultMessage: 'Okay',
1717
description: 'Action to end current tour',
1818
},
19-
notRespondedFilterTourBody: {
20-
id: 'tour.body.notRespondedFilter',
21-
defaultMessage: 'Now you can filter discussions to find posts with no response.',
22-
description: 'Body of the tour for the not responded filter',
19+
exampleTourTitle: {
20+
id: 'tour.example.title',
21+
defaultMessage: 'Example Tour',
22+
description: 'Title for example tour',
2323
},
24-
notRespondedFilterTourTitle: {
25-
id: 'tour.title.notRespondedFilter',
26-
defaultMessage: 'New filtering option!',
27-
description: 'Title of the tour for the not responded filter',
28-
},
29-
responseSortTourBody: {
30-
id: 'tour.body.responseSortTour',
31-
defaultMessage: 'Responses and comments are now sorted by newest first. Please use this option to change the sort order',
32-
description: 'Body of the tour for the response sort',
33-
},
34-
responseSortTourTitle: {
35-
id: 'tour.title.responseSortTour',
36-
defaultMessage: 'Sort Responses!',
37-
description: 'Title of the tour for the response sort',
24+
exampleTourBody: {
25+
id: 'tour.example.body',
26+
defaultMessage: 'This is an example tour',
27+
description: 'Body for example tour',
3828
},
3929
});
4030

0 commit comments

Comments
 (0)