Fixes the following issues:
* Selection behavior
* Component selection is by header click only
* Newly created blocks within a unit should be selected on creation/save, appear selected, and have their sidebar open
* Some long text components seem to display at the default height rather than a longer height
* Within the full-page unit view, the "add to collection" overflow menu item on components does not seem to work/only opens the sidebar.
* Draft status indicator text is not vertically centered with icon
* When reordering, dragging a short component past a long component often causes a strange stutter effect.
* When dragging to reorder a component, moving quickly or scrolling often causes the drag handle to be lost / causes the block to jump somewhere else
* Reordering may not consistently support a keyboard-accessible option to change order, like in course authoring
* Tag button on component header opens the old tag side pane
(cherry picked from commit 8c3fab3792)
* feat: Initial worflow to add unit to course
* test: Add initial tests
* feat: Show only published units
* test: Update Subsection card test and ComponentPicker tests
* feat: Connect add unit from library API
* test: Test for Add unit from library in CourseOutline
* fix: create a new Vertical from a Library Unit
* docs: add a little note about avoiding 'vertical' where possible
* refactor: Use visibleTabs instead of showOnlyHomeTab
---------
Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Braden MacDonald <braden@opencraft.com>
Reorders components in unit page via drag and drop. This PR also refactors and moves draggable list and sortable item components to appropriate location.
Course authors will be affected by this change.
* feat: TagCount component
* feat: Update ContentTagsDrawer to use it in the MFE
* feat: Manage tags menu added on units
* feat: Tag count added on unit
* feat: Add button feat to Tag count
* test: Course Outline api tests
* test: Ignore lines that can not be tested
* style: Comment added on ContentTagsDrawer
* style: Nits on CardHeader
* feat: add proctoring exam link to actions
* feat: prerequisite settings in advanced tab
* refactor: use formik for configuration modal in outline
* feat: proctoring exam settings in subsection configuration
test: prereq & proctoring settings
* feat: outline alerts
test: outline page alerts
* refactor: replace highlights badge with bubble
* feat: discussion badge in outline
* refactor: status bar style and date format
* Fix spacing between checklist and highlights button
* Fix title alignment in status bar
* Align learn more link to center with respect to button
* Update start date display in local format
* fix: unit url
* refactor: redesign item header
* move status to end of card
* move edit icon next to title
* make it visible on hover
* test: improve coverage
* refactor: update messages and alert colors
test: add render and API tests
fix: fix non saving options and add review style changes
fix: remove additional tab in the section configuration
fix: remove isSubsection state, fix css issues and fix tests
fix: add review changes, fix advanced tab hour selection and update tests
test: fix failing test in courseOutline.test.jsx
fix: remove unused state, add TODO comment, fix stack rendering and NaN values
feat: show previous state in autosuggest if an invalid option is provided and fix warnings
test: fix failing test
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
Uses action flags from API to control display of delete, duplicate, child new button and dragging.
Use isHeaderVisible flag to control display of subsection headers.
All these changes prepare outline for entrance exam section display.
feat: use actions flags for subsections
test: actions
* feat: video sharing option dropdown
* test: video sharing option
* fix: lint issues
* refactor: messages for video sharing options
* test: add failure test for video sharing
* refactor: rename course block api url
refactor: hide tooltip based on arg
refactor: card header to include title link
feat: delete unit option
feat: duplicate unit option
refactor: title click handler name and remove unwanted scss properties
test: new unit and edit unit option
test: add delete unit and combine it with section and subsection test
test: add duplicate unit test and combine it with section & subsection test
refactor: replace act call by oneline
test: add publish unit & subsection test and combine it with section test
refactor: add jest-expect-message to add custom msg to tests
fix: lint issues
test: fix unit card tests
refactor: remove unnecessary css and message
refactor: pass title as component to card header
refactor: extract status badge to a component
fix: lint issues
refactor: rename status badge component
test: fix card header tests
refactor: new item button styling
feat: show loading spinner while sections are loading
refactor: new button style
refactor: remove delete unit hook and thunk till unit list is implemented
test: additional tests for sections
test: additional tests for subsections
test: replace query calls by button clicks
feat: use react-dnd library for drag and drop implementation
style: fix linting issues
fix: finalize section order on drop instead of hover
fix: prevent same index drag to start request and restore state on error
fix: restore sectionlist order
fix: prevent drag event while editing the text
style: fix linting issues
test: fix failing tests
test: add missing hooks to SectionCard component in test
test: add wrapping to SectionCard test component
test: add tests for checking the API that sets the ordering
fix: merge scroll-to-bottom with drag and drop implementations
fix: fix linting issues
refactor: update publish modal to handle subsections and units
refactor: rename current section state and handlers
refactor: generalize edit title for section, subsection and unit
feat: generalize delete modal
feat: generalize publish modal
refactor: use currentSection and currentSubsection to improve delete item
feat: generalize duplication functionality
feat: generalize add new item for sections and subsections
test: fix subsection tests
fix: lint issues and test arguments
test: fix card header, delete and publish modal tests
fix: invalid use of delete subsection query for unit
refactor: use current section for highlights modal
feat: add auto scroll to subsection and improve scroll behaviour
fix: jsdoc types
fix: rename util function and remove unused eslint comment
fix: fix tests by mocking scrollIntoView function
test: add assertion for checking call to mock function
Also refactor api and hooks
fix: publish button behaviour and card header tests
fix: warning in highlights and publish modal test
fix: courseoutline tests
test: add test for new section functionality
fix(lint): lint issues
refactor: remove unnecessary css in CardHeader
refactor: rename emptyPlaceholder test file
refactor: replace ternary operator with 'and' condition
refactor: add black color to expand/collapse button
refactor: display only changed subsection and units in publish modal
refactor: update messages and css
refactor: wrap urls in function call
refactor: fix jsdoc types
refactor: use helmet for document title