Skip to content

Misc. Manage Library changes (including temp. hiding "Add folder" behind developer mode flag)

  • "Add" dropdown trigger button added to Manage Library panel
  • "New folder" button:
    • moved to dropdown at top of Manage Library panel
    • hidden behind devMode flag.
  • "New code component" moved from Library into dropdown at top of Manage Library panel
  • 0 shouldn't show when there are no folders or items in a folder
  • Completely refactored PatternList, ComponentList, CodeComponentList to all use a centralised "LibraryItemList"
  • 🔥 Working Search/filter added to both Library and Manage Library
    • Search persists across the "Components" "Patterns" and "Code" tabs
    • Info panel is shown when nothing in the current tab matches the search term.
  • Clicking a component no longer immediately inserts it
    • Components in Library now have contextual menu option "Insert"
    • Cypress and Playwright tests updated to insert components using a centralised "insertComponent" helper function that uses the contextual menu

From the D.o. issue Bonus issue 2 is not addressed by this MR. I think it should be tackled in a follow up or as part of https://www.drupal.org/project/canvas/issues/3541364

Dropping this here as proof 😅

image.png

Closes #3545710

Edited by Jesse Baker

Merge request reports

Loading