Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image block: Expand on Click won't save in Global Styles on Simple Sites #82789

Closed
happychait opened this issue Oct 10, 2023 · 6 comments
Closed
Labels
Bugs to watch Flagged for observation by Quality Engineering [Feature] Core Blocks Blocks that come with Gutenberg. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. NMIT Bug KitKat's NMIT Bugs flag [Platform] Simple [Pri] High [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug

Comments

@happychait
Copy link

happychait commented Oct 10, 2023

Expand.on.Click.doesn.t.persist.in.Global.Styles.mp4

Quick summary

When "Expand on Click" toggle is enabled for Image block from the Styles panel, the choice is not saved and reverting to disabled state.the

Steps to reproduce

  1. Open the Site Editor
  2. Open the Styles panel from the top right
  3. Search for the Image block
  4. Enable the "Expand on Click" toggle in the Settings section
  5. Hit Save and confirm

What you expected to happen

The "Expand on Click" will remain active and apply to all the image blocks added to the page or post editor.apply

What actually happened

The "Expand on Click" reverts to the disabled state.

Impact

One

Available workarounds?

No and the platform is unusable

Platform (Simple and/or Atomic)

Simple, Atomic

Logs or notes

Video of the problem

Expand.on.Click.doesn.t.persist.in.Global.Styles.mp4
@happychait happychait added [Type] Bug Needs triage Ticket needs to be triaged [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Core Blocks Blocks that come with Gutenberg. labels Oct 10, 2023
@github-actions github-actions bot added [Platform] Atomic [Platform] Simple [Pri] High [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts labels Oct 10, 2023
@happychait
Copy link
Author

WordPress/gutenberg#54509 mentions "Expand on Click" can be enabled via Global Styles.

@cuemarie
Copy link

cuemarie commented Oct 10, 2023

📌 REPRODUCTION RESULTS

  • Tested on Simple – Replicated
  • Tested on Atomic – Could Not Replicate
  • Replicable outside of Dotcom – No

📌 FINDINGS/SCREENSHOTS/VIDEO
I could replicate this on a Simple Site, but not on Atomic. Outside of Dotcom, the issue is not present either. All sites tested with Theme TT3 and Gutenberg v16.7.1

Simple Site - (Gutenberg: v16.7.1)

A3qFjS.mp4

📌 ACTIONS

  • Triaged
  • @Automattic/lego I see y'all are looking over Global Styles recently - is this something y'all could have a look at as well?

@cuemarie cuemarie changed the title Image block: Expand on Click can't be saved in Global Styles Image block: Expand on Click won't save in Global Styles on Simple Sites Oct 10, 2023
@cuemarie cuemarie added Triaged To be used when issues have been triaged. Bugs to watch Flagged for observation by Quality Engineering and removed [Platform] Atomic Needs triage Ticket needs to be triaged labels Oct 10, 2023
@cuemarie cuemarie added this to the NMIT Bugs - October 2023 milestone Oct 10, 2023
@Copons
Copy link
Contributor

Copons commented Oct 11, 2023

I'm unfamiliar with the new property (which is about opening the image in a lightbox, and it works fine when used at an individual block level).

The GS API call contains this (among other things) as payload:

{
  "settings": {
    "blocks": {
      "core/image": {
        "lightbox": {
          "allowEditing": true,
          "enabled": true
        }
      }
    }
  }
}

The feature then adds lots of data attributes to the image element.

Typically, this kind of thing is stripped by the Dotcom KSES (although it doesn't seem to be the case here, since they work at a block level? 🤔 ).

@cuemarie cuemarie removed this from the NMIT Bugs - October 2023 milestone Oct 11, 2023
@dsas
Copy link
Contributor

dsas commented Oct 13, 2023

The GS API call contains this (among other things) as payload:

To rule out kses, you need to compare the response to the request - if the payload you mentioned isn't echoed back in the response it is very likely to be KSES ime

@Copons
Copy link
Contributor

Copons commented Oct 13, 2023

The GS API call contains this (among other things) as payload:

To rule out kses, you need to compare the response to the request - if the payload you mentioned isn't echoed back in the response it is very likely to be KSES ime

@dsas Yes, that's what happens.

Payload Response
Screenshot 2023-10-13 at 13 32 04 Screenshot 2023-10-13 at 13 32 26

@cuemarie cuemarie added the NMIT Bug KitKat's NMIT Bugs flag label Oct 17, 2023
@autumnfjeld
Copy link
Contributor

I tested this on a few pages and image blocks and it consistently worked.

  • I toggle "expand on click" on,
  • I saved
  • I tested in the front end and the image expanded
  • I went back to the editor, refresed the page
  • Checked that the toggle was still set and it was

Image

I'm closing this. @happychait can you please test and confirm this feature works as you expect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs to watch Flagged for observation by Quality Engineering [Feature] Core Blocks Blocks that come with Gutenberg. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. NMIT Bug KitKat's NMIT Bugs flag [Platform] Simple [Pri] High [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug
Development

No branches or pull requests

5 participants