The text & problem xblock editors will display a confirmation box before
cancelling only if user has changed something else it will directly go
back.
(cherry picked from commit df8a65dc4e)
* fix: warnings about Duplicate message id
* fix: paragon's Hyperlink no longer accepts a 'content' attribute
* test: ensure all act() calls are async
* test: Removed "async" from "describe"
* fix: DiscussionsSettings tests
* Don't nest userAction.click in act() -- nested act() statements have
indeterminent behaviour.
* Use getBy* instead of findBy* with userAction to avoid nested act() statements
* Always await userEvent.click
* Use fireEvent.click when the onClick handlers need to be called
* Use queryBy* instead of getBy* when using .toBeInTheDocument or
* fix: typo in data-testid
* test: Use useLocation to test route changes
* Don't nest userAction.click in act() -- nested act() statements have
* chore: fix lint:fix and lint errors
* remove "indent" setting from .eslintrc.js
* add @typescript-eslint/ prefix to eslint-disable-line statements where flagged by linter
* changed stylelint setting import-notation to "string"
* test: fix failing tests after upgrade
* fix: css error "target selector was not found"
* chore: upgrades dependency frontend-lib-content-components@2.3.0
* chore: bumps @edx/frontend-component-ai-translations to ^2.1.0
---------
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
This reverts commit e22cce9fa6.
Reverts #1106
The reason is that the pipeline to deploy to stage broke. This commit is probably the reason.
The revert is temporary until the pipeline problem is solved.
* chore: add @openedx/frontend-plugin-framework
chore: move plugin page setting button to a props
chore: split out app setting modal for reusability
chore: add implementation of WTC plugin
chore: update app setting form
chore: implement the plugin form with mock
chore: follow the UI design
chore: remove translation plugin and move it into frontend-plugin instead
* chore: add eslint ignore for env.config.jsx
* chore: update package-lock.json
As of #918 , the content search only allows filtering the results by one tag at a time, which is a limitation of Instantsearch.
So with this change, usage of Instantsearch + instant-meilisearch has been replaced with direct usage of Meilisearch. Not only does this simplify the code and make our MFE bundle size smaller, but it allows us much more control over how the tags filtering works, so that we can implement searching by multiple tags.
Trying to modify Instantsearch to do that was too difficult, given the complexity of its codebase.
Related ticket: openedx/modular-learning#201
Implementation of openedx/modular-learning#201
Implements a modal for searching course content with filters for searching in current or all courses, filtering by content type, content tags and text.
* feat: Use react-select for tags selector
Replace existing component with react-select component, by passing in
our custom component.
This retained the existing search functionality.
* fix: Fix missing deps causing constant rerender
This bug appeared after removing the react-query call to the backend
when selecting/unselecting a tag in the dropdown. Since it no longer
gets the updated state from the backend, it doesnt mask the bug.
The bug is essentially the `ContentTagsCollapsibleHelper` rerendering
causing the states to reset overriding the selected (not commited) tags.
This is due to missing dependancies in the useCallback.
* feat: Add stagedContentTags state in react-select
This adds a state and callbacks in the toplevel component of the content
tags drawer to be able to add/remove staged content tags and have them
showup in the react-select as selected chips.
* feat: Split up applied & staged content tags trees
Now content tags have seperate tree states for applied ones and staged
ones. They are updated seperately and both are used when updating the
selectable box UI. This allows for more flexibility with actions that
can be performed on the staged content tags with impacting the applied
ones.
* feat: Change style of implicit checkbox to checks
This overrides the indeterminate input checkbox style to match the
checked checkbox style, using variables defined in paragon.
* feat: Add bottom buttons in tags dropdown selector
* refactor: Remove cloneDeep + simplify code
* feat: Update placeholder/button texts
* feat: Implement cancel button + add proptypes
* feat: Implement commit/cancel staged tags
This implements the commit functionality for staged tags, taking account
for implicit tags. This also handles the case for removing applied tags
by clicking on the "x" in the TagBubble.
* feat: Keep all staged tags only commit explicit
* feat: Change style of add/cancel/load more buttons
* feat: Add inline "Add" button to commit tags
In the react-select component, an inline "Add" button showsup when some
tags are staged, if they are clicked they are commited/applied.
* fix: Keep applied tag checked when only staged child unchecked
* feat: Style add tags widget + staged tags
Also clear search term whenever tags are staged/cancelled
* feat: Fixed some typing errors
* test: Update tests to fix existing broken cases
* test: Add new functionality tests
* chore: add types to ContentTagsCollapsible
* chore: add types for useContentTagsCollapsibleHelper
* fix: Small bug with useIntl
* chore: Fix more linter issues
* refactor: Separate stagedTags and stagedTagsTree state updates
This refactor removed the warning that was caused because the state of a
parent component (ContentTagsDrawer) was being updated in the middle of
a state update in (ContentTagsCollapsible). This seperated the two state
updates to avoid this issue.
* chore: Update package-lock.json
* fix: Reset applied tags in selectbox when fetching
Whenever we get new applied tags from the backend, we reset the applied
tags that are checked, and only check the explicit tags. This was
causing an issue of duplicate applied tags being added to the selectbox.
* chore: Update package.json
---------
Co-authored-by: Braden MacDonald <braden@opencraft.com>
Due to a bug in the SelectableBox component, selecting values was not possible in different components throughout this MFE.
This fixes the Gallery and the Select Problem Types components by updating the FLCC version and replacing the SelectableBox copy with an import from FLCC.
For a full bug description see #880.
* feat: Make "Pages & Resources" course apps into plugins
* feat: move ora_settings
* feat: move proctoring
* feat: move progress
* feat: move teams
* feat: move wiki
* feat: move Xpert settings
* fix: add webpack.prod.config.js
* fix: clean up unused parts of package.json files
* feat: Add an error message when displaying a Course App Plugin fails
* chore: fix various eslint warnings
* chore: fix jest tests
* fix: error preventing "npm ci" from working
* feat: better tests for <SettingsComponent>
* chore: move xpert_unit_summary into same dir as other plugins
* fix: eslint-import-resolver-webpack is a dev dependency
* chore: move learning_assistant to be a plugin too
* feat: for compatibility, install 2U plugins by default
* fix: bug with learning_assistant package.json
- install atlas
- remove `--filter` to pull all languages by default
- use ATLAS_OPTIONS to allow custom `--filter`
- include frontend-platform, ai-translations and lib-contents in `atlas pull` command
Refs: FC-0012 OEP-58
test: add tests for move options
refactor: disable move option instead of hiding
fix: incorrect variable name in tests
feat: move up & down menu action for units
test: add tests for unit move options