* Optimistic update for renaming Components, Collections and Containers
* Change the InplaceTextEditor to show the new text until the onSave promise resolves
* Change the InplaceTextEditor style to: Always show the rename button
* feat: select component and show sidebar on edit (#1949)
Select component that is being edited in library and show its sidebar. Also fixes issue with children component listing in library unit page
(cherry picked from commit 08ac1c0c4d)
* fix: search text flickering (#1999)
Fix flickering issue in search field.
(cherry picked from commit 6f3b7ab962)
* feat: open collection or unit page on double click only (#2002)
Opens collection or unit page only on double click.
(cherry picked from commit 503642be8c)
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)
* fix: several library unit page UX bugs (#1868)
* fix: rename "Organize" tab to "Manage"
* fix: duplicate key warnings
* fix: uniform messages while adding to collection
* fix: do not allow units be added to a unit
(cherry picked from commit 0fdc460c5b)
* perf: use Library search results to populate container card preview (#1820)
* fix: use Library search results to populate container card preview
* feat: show published children when showing only published Unit content
* fix: nits
(cherry picked from commit 24e469542d)
---------
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
Allows authors to edit components from unit page. It makes sure that the component preview is updated on save, allows user to double click and open editor in modal etc.
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.
* View a unit page, which has its own URL
* Components appear within a unit as full previews. Their top bar shows type icon and title on the left, and draft status (if any), tag count, overflow menu, and drag handle on the right.
* Components have an overflow menu within a unit
* Components can be selected within a unit
* When components are selected, the standard component sidebar appears. The preview tab is hidden, since component previews are visible in the main content area.
* Components within a unit full-page view have hover and selected states
* Unit sidebar preview.
* Frontend implementation Drag-n-drop components to reorder them in unit.