forked from openedx/frontend-app-authoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: create search-manager feature
- Loading branch information
Showing
27 changed files
with
126 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export { SearchContextProvider, useSearchContext } from './SearchManager'; | ||
export { default as ClearFiltersButton } from './ClearFiltersButton'; | ||
export { default as FilterByBlockType } from './FilterByBlockType'; | ||
export { default as FilterByTags } from './FilterByTags'; | ||
export { default as SearchKeywordsField } from './SearchKeywordsField'; | ||
export { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from './data/api'; | ||
|
||
export type { ContentHit } from './data/api'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { defineMessages as _defineMessages } from '@edx/frontend-platform/i18n'; | ||
import type { defineMessages as defineMessagesType } from 'react-intl'; | ||
|
||
// frontend-platform currently doesn't provide types... do it ourselves. | ||
const defineMessages = _defineMessages as typeof defineMessagesType; | ||
|
||
const messages = defineMessages({ | ||
clearFilters: { | ||
id: 'course-authoring.search-manager.clearFilters', | ||
defaultMessage: 'Clear Filters', | ||
description: 'Label for the button that removes all applied search filters', | ||
}, | ||
inputPlaceholder: { | ||
id: 'course-authoring.search-manager.inputPlaceholder', | ||
defaultMessage: 'Search', | ||
description: 'Placeholder text shown in the keyword input field when the user has not yet entered a keyword', | ||
}, | ||
blockTypeFilter: { | ||
id: 'course-authoring.search-manager.blockTypeFilter', | ||
defaultMessage: 'Type', | ||
description: 'Label for the filter that allows limiting results to a specific component type', | ||
}, | ||
'blockTypeFilter.empty': { | ||
id: 'course-authoring.search-manager.blockTypeFilter.empty', | ||
defaultMessage: 'No matching components', | ||
description: 'Label shown when there are no options available to filter by component type', | ||
}, | ||
childTagsExpand: { | ||
id: 'course-authoring.search-manager.child-tags-expand', | ||
defaultMessage: 'Expand to show child tags of "{tagName}"', | ||
description: 'This text describes the ▼ expand toggle button to non-visual users.', | ||
}, | ||
childTagsCollapse: { | ||
id: 'course-authoring.search-manager.child-tags-collapse', | ||
defaultMessage: 'Collapse to hide child tags of "{tagName}"', | ||
description: 'This text describes the ▲ collapse toggle button to non-visual users.', | ||
}, | ||
'blockTagsFilter.empty': { | ||
id: 'course-authoring.search-manager.blockTagsFilter.empty', | ||
defaultMessage: 'No tags in current results', | ||
description: 'Label shown when there are no options available to filter by tags', | ||
}, | ||
'blockTagsFilter.error': { | ||
id: 'course-authoring.search-manager.blockTagsFilter.error', | ||
defaultMessage: 'Error loading tags', | ||
description: 'Label shown when the tags could not be loaded', | ||
}, | ||
'blockTagsFilter.incomplete': { | ||
id: 'course-authoring.search-manager.blockTagsFilter.incomplete', | ||
defaultMessage: 'Sorry, not all tags could be loaded', | ||
description: 'Label shown when the system is not able to display all of the available tag options.', | ||
}, | ||
blockTagsFilter: { | ||
id: 'course-authoring.search-manager.blockTagsFilter', | ||
defaultMessage: 'Tags', | ||
description: 'Label for the filter that allows finding components with specific tags', | ||
}, | ||
searchTagsByKeywordPlaceholder: { | ||
id: 'course-authoring.search-manager.searchTagsByKeywordPlaceholder', | ||
defaultMessage: 'Search tags', | ||
description: 'Placeholder text shown in the input field that allows searching through the available tags', | ||
}, | ||
submitSearchTagsByKeyword: { | ||
id: 'course-authoring.search-manager.submitSearchTagsByKeyword', | ||
defaultMessage: 'Submit tag keyword search', | ||
description: 'Text shown to screen reader users for the search button on the tags keyword search', | ||
}, | ||
}); | ||
|
||
export default messages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export { default as SearchModal } from './SearchModal'; |
Oops, something went wrong.