From 53f11deadac0c23c63251c9369293f14e7deb837 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Wed, 9 Sep 2020 15:04:46 +1000 Subject: [PATCH 01/34] Navigation: Implement redesign of Navigation Editor --- .../components/src/select-control/index.js | 2 + .../components/delete-menu-button/index.js | 29 --- .../components/delete-menu-button/style.scss | 7 - .../src/components/editor/index.js | 14 ++ .../src/components/editor/list-view.js | 32 ++++ .../src/components/editor/style.scss | 43 +++++ .../src/components/editor/visual-view.js | 38 ++++ .../src/components/header/index.js | 41 +++++ .../src/components/header/manage-locations.js | 48 +++++ .../src/components/header/style.scss | 25 +++ .../components/header/use-menu-locations.js | 68 +++++++ .../auto-add-pages-panel.js | 37 ++++ .../inspector-additions/delete-menu-panel.js | 30 ++++ .../components/inspector-additions/index.js | 28 +++ .../components/inspector-additions/style.scss | 20 +++ .../src/components/layout/index.js | 118 ++++++++----- .../shortcuts.js | 0 .../src/components/layout/style.scss | 7 +- .../layout/use-menu-notifications.js | 42 +++++ .../use-navigation-block-editor.js | 3 +- .../layout/use-navigation-editor.js | 58 ++++++ .../components/menu-locations-editor/index.js | 107 ----------- .../use-menu-locations.js | 120 ------------- .../menus-editor/create-menu-area.js | 135 -------------- .../src/components/menus-editor/index.js | 167 ------------------ .../src/components/menus-editor/style.scss | 56 ------ .../navigation-editor/block-editor-area.js | 163 ----------------- .../components/navigation-editor/helpers.js | 4 - .../src/components/navigation-editor/index.js | 81 --------- .../navigation-structure-area.js | 54 ------ .../components/navigation-editor/style.scss | 130 -------------- .../src/components/toolbar/add-menu-form.js | 107 +++++++++++ .../toolbar/block-inspector-dropdown.js | 27 +++ .../src/components/toolbar/index.js | 64 +++++++ .../src/components/toolbar/save-button.js | 26 +++ .../src/components/toolbar/style.scss | 64 +++++++ packages/edit-navigation/src/style.scss | 9 +- 37 files changed, 896 insertions(+), 1108 deletions(-) delete mode 100644 packages/edit-navigation/src/components/delete-menu-button/index.js delete mode 100644 packages/edit-navigation/src/components/delete-menu-button/style.scss create mode 100644 packages/edit-navigation/src/components/editor/index.js create mode 100644 packages/edit-navigation/src/components/editor/list-view.js create mode 100644 packages/edit-navigation/src/components/editor/style.scss create mode 100644 packages/edit-navigation/src/components/editor/visual-view.js create mode 100644 packages/edit-navigation/src/components/header/index.js create mode 100644 packages/edit-navigation/src/components/header/manage-locations.js create mode 100644 packages/edit-navigation/src/components/header/style.scss create mode 100644 packages/edit-navigation/src/components/header/use-menu-locations.js create mode 100644 packages/edit-navigation/src/components/inspector-additions/auto-add-pages-panel.js create mode 100644 packages/edit-navigation/src/components/inspector-additions/delete-menu-panel.js create mode 100644 packages/edit-navigation/src/components/inspector-additions/index.js create mode 100644 packages/edit-navigation/src/components/inspector-additions/style.scss rename packages/edit-navigation/src/components/{navigation-editor => layout}/shortcuts.js (100%) create mode 100644 packages/edit-navigation/src/components/layout/use-menu-notifications.js rename packages/edit-navigation/src/components/{navigation-editor => layout}/use-navigation-block-editor.js (97%) create mode 100644 packages/edit-navigation/src/components/layout/use-navigation-editor.js delete mode 100644 packages/edit-navigation/src/components/menu-locations-editor/index.js delete mode 100644 packages/edit-navigation/src/components/menu-locations-editor/use-menu-locations.js delete mode 100644 packages/edit-navigation/src/components/menus-editor/create-menu-area.js delete mode 100644 packages/edit-navigation/src/components/menus-editor/index.js delete mode 100644 packages/edit-navigation/src/components/menus-editor/style.scss delete mode 100644 packages/edit-navigation/src/components/navigation-editor/block-editor-area.js delete mode 100644 packages/edit-navigation/src/components/navigation-editor/helpers.js delete mode 100644 packages/edit-navigation/src/components/navigation-editor/index.js delete mode 100644 packages/edit-navigation/src/components/navigation-editor/navigation-structure-area.js delete mode 100644 packages/edit-navigation/src/components/navigation-editor/style.scss create mode 100644 packages/edit-navigation/src/components/toolbar/add-menu-form.js create mode 100644 packages/edit-navigation/src/components/toolbar/block-inspector-dropdown.js create mode 100644 packages/edit-navigation/src/components/toolbar/index.js create mode 100644 packages/edit-navigation/src/components/toolbar/save-button.js create mode 100644 packages/edit-navigation/src/components/toolbar/style.scss diff --git a/packages/components/src/select-control/index.js b/packages/components/src/select-control/index.js index 369cc079f7f84..55c507753eda4 100644 --- a/packages/components/src/select-control/index.js +++ b/packages/components/src/select-control/index.js @@ -41,6 +41,7 @@ function SelectControl( options = [], size = 'default', value: valueProp, + labelPosition, ...props }, ref @@ -100,6 +101,7 @@ function SelectControl( } + labelPosition={ labelPosition } >