From f323d887658c1f82d71960cd48d8929e233ff473 Mon Sep 17 00:00:00 2001 From: Steve Stein Date: Tue, 12 Apr 2022 20:21:51 -0600 Subject: [PATCH] Move page meta information from the header to a new status side panel component inside of the page editing UI (#8285) Co-authored-by: Thibaud Colas --- CHANGELOG.txt | 1 + .../_comments-notification-dropdown.scss | 38 ------- client/scss/components/_footer.scss | 1 + client/scss/components/_switch.scss | 3 + client/scss/core.scss | 1 - .../entrypoints/admin/lock-unlock-action.js | 6 +- .../src/entrypoints/admin/privacy-switch.js | 12 +- .../src/entrypoints/admin/workflow-status.js | 2 +- docs/releases/3.0.md | 1 + wagtail/admin/action_menu.py | 43 -------- wagtail/admin/side_panels.py | 74 ++++++++++--- .../scss/layouts/page-editor.scss | 71 ++++++------ .../collections/_privacy_switch.html | 2 +- .../wagtailadmin/icons/expand-right.svg | 8 +- .../templates/wagtailadmin/icons/globe.svg | 3 + .../wagtailadmin/pages/_privacy_switch.html | 2 +- .../action_menu/lock_unlock_menu_item.html | 4 - .../pages/privacy_switch_panel.html | 2 +- .../includes/action_list_item.html | 33 ++++++ .../includes/page_locale_status.html | 39 +++++++ .../includes/page_locked_status.html | 33 ++++++ .../includes/page_privacy_status.html | 34 ++++++ .../includes/page_workflow_status.html | 104 ++++++++++++++++++ .../includes/side_panel_button.html | 9 ++ .../pages/side_panels/status.html | 34 +++++- .../shared/headers/page_edit_header.html | 2 +- .../shared/headers/slim_header.html | 2 +- .../shared/page_side_panel_toggles.html | 2 +- .../wagtailadmin/shared/page_side_panels.html | 2 +- .../shared/page_status_tag_new.html | 5 +- .../admin/templatetags/wagtailadmin_tags.py | 18 +-- wagtail/admin/tests/pages/test_create_page.py | 37 ++----- wagtail/admin/tests/pages/test_edit_page.py | 43 ++------ wagtail/admin/tests/test_buttons_hooks.py | 5 +- wagtail/admin/tests/test_templatetags.py | 10 ++ wagtail/admin/tests/test_workflows.py | 16 +-- wagtail/admin/views/pages/create.py | 2 +- wagtail/admin/wagtail_hooks.py | 1 + 38 files changed, 459 insertions(+), 246 deletions(-) delete mode 100644 client/scss/components/_comments-notification-dropdown.scss create mode 100644 wagtail/admin/templates/wagtailadmin/icons/globe.svg delete mode 100644 wagtail/admin/templates/wagtailadmin/pages/action_menu/lock_unlock_menu_item.html create mode 100644 wagtail/admin/templates/wagtailadmin/pages/side_panels/includes/action_list_item.html create mode 100644 wagtail/admin/templates/wagtailadmin/pages/side_panels/includes/page_locale_status.html create mode 100644 wagtail/admin/templates/wagtailadmin/pages/side_panels/includes/page_locked_status.html create mode 100644 wagtail/admin/templates/wagtailadmin/pages/side_panels/includes/page_privacy_status.html create mode 100644 wagtail/admin/templates/wagtailadmin/pages/side_panels/includes/page_workflow_status.html create mode 100644 wagtail/admin/templates/wagtailadmin/pages/side_panels/includes/side_panel_button.html diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ae37ae6ebb..9373c3224f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -50,6 +50,7 @@ Changelog * Add internationalisation UI to modeladmin (Andrés Martano) * Support chunking in `PageQuerySet.specific()` to reduce memory consumption (Andy Babic) * Implement new tabs design across the admin interface (Steven Steinwand) + * Move page meta information from the header to a new status side panel component inside of the page editing UI (Steven Steinwand, Karl Hobley) * Fix: When using `simple_translations` ensure that the user is redirected to the page edit view when submitting for a single locale (Mitchel Cabuloy) * Fix: When previewing unsaved changes to `Form` pages, ensure that all added fields are correctly shown in the preview (Joshua Munn) * Fix: When Documents (e.g. PDFs) have been configured to be served inline via `WAGTAILDOCS_CONTENT_TYPES` & `WAGTAILDOCS_INLINE_CONTENT_TYPES` ensure that the filename is correctly set in the `Content-Disposition` header so that saving the files will use the correct filename (John-Scott Atlakson) diff --git a/client/scss/components/_comments-notification-dropdown.scss b/client/scss/components/_comments-notification-dropdown.scss deleted file mode 100644 index 14a2954e25..0000000000 --- a/client/scss/components/_comments-notification-dropdown.scss +++ /dev/null @@ -1,38 +0,0 @@ -.comment-notifications-dropdown { - position: absolute; - display: none; - bottom: -92px; - z-index: 51; - background-color: $color-text-base; - padding: 20px; - border-radius: 6px; - min-width: 260px; - box-sizing: border-box; - border: 1px solid $color-text-base; - - &__title { - font-size: 12px; - font-weight: 700; - color: $color-white; - } - - &--active { - display: block; - } - - &::before { - content: ''; - position: absolute; - top: -8px; - width: 0; - height: 0; - z-index: 2; - // Remove once we drop support for Safari 13. - // stylelint-disable-next-line property-disallowed-list - right: 18px; - inset-inline-end: 18px; - border-style: solid; - border-width: 0 8px 8px 8px; - border-color: transparent transparent $color-text-base transparent; - } -} diff --git a/client/scss/components/_footer.scss b/client/scss/components/_footer.scss index c2dab35999..fa60a5a2bb 100644 --- a/client/scss/components/_footer.scss +++ b/client/scss/components/_footer.scss @@ -4,6 +4,7 @@ $border-curvature: 3px; @include transition(bottom 0.5s ease 1s); @include row(); + z-index: 20; ul { @include unlist(); diff --git a/client/scss/components/_switch.scss b/client/scss/components/_switch.scss index f60d9c2f40..e55600d1cd 100644 --- a/client/scss/components/_switch.scss +++ b/client/scss/components/_switch.scss @@ -15,6 +15,7 @@ $switch-color-middle-grey: #777; display: inline-flex; align-items: center; margin: 5px 0; + position: relative; // Disable forms styling that's applied to the