From c83ba866b0eca609160d68c26a66a7357a4f1a57 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Wed, 29 Mar 2023 09:10:46 +0100 Subject: [PATCH] Always show StreamField and InlinePanel block actions --- client/scss/components/_panel.scss | 30 +--- .../StreamField/blocks/BaseSequenceBlock.js | 8 +- .../__snapshots__/ListBlock.test.js.snap | 144 +++--------------- .../__snapshots__/StreamBlock.test.js.snap | 104 ++----------- .../templates/wagtailadmin/shared/panel.html | 3 - 5 files changed, 33 insertions(+), 256 deletions(-) diff --git a/client/scss/components/_panel.scss b/client/scss/components/_panel.scss index 1242e3f3b2..5d999fe3ab 100644 --- a/client/scss/components/_panel.scss +++ b/client/scss/components/_panel.scss @@ -56,8 +56,7 @@ $header-gap: theme('spacing.1'); .w-panel__anchor, .w-panel__toggle, -.w-panel__controls .button.button--icon, -.w-panel__controls-cue { +.w-panel__controls .button.button--icon { @include show-focus-outline-inside(); display: inline-grid; justify-content: center; @@ -157,33 +156,6 @@ $header-gap: theme('spacing.1'); margin: calc(-1 * theme('spacing.4')); margin-inline-start: 0; } - - // The cue is meant to be displayed on top of a real button. - > .w-panel__controls-cue { - position: absolute; - visibility: hidden; - } - - @media (hover: hover) { - // Hiding with opacity only, so the elements can still be focused. - > * { - opacity: 0; - } - - > .w-panel__controls-cue { - opacity: 1; - visibility: visible; - } - - .w-panel__header:is(:hover, :focus-within) & > * { - opacity: 1; - - // The cue should be fully hidden, not just transparent. - &.w-panel__controls-cue { - visibility: hidden; - } - } - } } .w-panel__wrapper { diff --git a/client/src/components/StreamField/blocks/BaseSequenceBlock.js b/client/src/components/StreamField/blocks/BaseSequenceBlock.js index 5ec4087e2c..dd8aa0987c 100644 --- a/client/src/components/StreamField/blocks/BaseSequenceBlock.js +++ b/client/src/components/StreamField/blocks/BaseSequenceBlock.js @@ -178,13 +178,7 @@ export class BaseSequenceChild extends EventEmitter {
-
-
- -
-
+
diff --git a/client/src/components/StreamField/blocks/__snapshots__/ListBlock.test.js.snap b/client/src/components/StreamField/blocks/__snapshots__/ListBlock.test.js.snap index 0c14a87a02..c1f08d30bc 100644 --- a/client/src/components/StreamField/blocks/__snapshots__/ListBlock.test.js.snap +++ b/client/src/components/StreamField/blocks/__snapshots__/ListBlock.test.js.snap @@ -38,13 +38,7 @@ exports[`telepath: wagtail.blocks.ListBlock blocks can be duplicated 1`] = `
-
-
- - - -
-