feat: removed sort and filter tour (#638)

This commit is contained in:
Awais Ansari
2024-01-09 12:30:18 +05:00
committed by GitHub
parent ee61d1c95d
commit 035d766886
5 changed files with 24 additions and 41 deletions

View File

@@ -44,7 +44,6 @@ const CommentSortDropdown = () => {
<>
<div className="comments-sort d-flex justify-content-end mx-4 mt-2">
<Button
id="comment-sort"
alt={intl.formatMessage(messages.actionsAlt)}
ref={setTarget}
variant="tertiary"

View File

@@ -197,7 +197,7 @@ const PostFilterBar = () => {
cohort: capitalize(selectedCohort?.name),
})}
</span>
<span id="icon-tune">
<span>
<Collapsible.Visible whenClosed>
<Icon src={Tune} />
</Collapsible.Visible>

View File

@@ -17,14 +17,11 @@ const DiscussionsProductTour = () => {
}, []);
return (
// eslint-disable-next-line react/jsx-no-useless-fragment
<>
{!isEmpty(config) && (
<ProductTour
tours={config}
/>
)}
</>
!isEmpty(config) && (
<ProductTour
tours={config}
/>
)
);
};

View File

@@ -1,21 +1,18 @@
import messages from './messages';
/**
*
* @param {Object} intl
* @returns {Object} tour checkpoints
*/
export default function tourCheckpoints(intl) {
return {
NOT_RESPONDED_FILTER: [
EXAMPLE_TOUR: [
{
body: intl.formatMessage(messages.notRespondedFilterTourBody),
placement: 'right',
target: '#icon-tune',
title: intl.formatMessage(messages.notRespondedFilterTourTitle),
},
],
RESPONSE_SORT: [
{
body: intl.formatMessage(messages.responseSortTourBody),
placement: 'left',
target: '#comment-sort',
title: intl.formatMessage(messages.responseSortTourTitle),
title: intl.formatMessage(messages.exampleTourTitle),
body: intl.formatMessage(messages.exampleTourBody),
target: '#example-tour-target',
placement: 'bottom',
},
],
};

View File

@@ -16,25 +16,15 @@ const messages = defineMessages({
defaultMessage: 'Okay',
description: 'Action to end current tour',
},
notRespondedFilterTourBody: {
id: 'tour.body.notRespondedFilter',
defaultMessage: 'Now you can filter discussions to find posts with no response.',
description: 'Body of the tour for the not responded filter',
exampleTourTitle: {
id: 'tour.example.title',
defaultMessage: 'Example Tour',
description: 'Title for example tour',
},
notRespondedFilterTourTitle: {
id: 'tour.title.notRespondedFilter',
defaultMessage: 'New filtering option!',
description: 'Title of the tour for the not responded filter',
},
responseSortTourBody: {
id: 'tour.body.responseSortTour',
defaultMessage: 'Responses and comments are now sorted by newest first. Please use this option to change the sort order',
description: 'Body of the tour for the response sort',
},
responseSortTourTitle: {
id: 'tour.title.responseSortTour',
defaultMessage: 'Sort Responses!',
description: 'Title of the tour for the response sort',
exampleTourBody: {
id: 'tour.example.body',
defaultMessage: 'This is an example tour',
description: 'Body for example tour',
},
});