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

Slideshow block has duplicated caption in the Editor for sites with FSE themes. #39459

Closed
nazilya06 opened this issue Sep 19, 2024 · 4 comments · Fixed by #39551
Closed

Slideshow block has duplicated caption in the Editor for sites with FSE themes. #39459

nazilya06 opened this issue Sep 19, 2024 · 4 comments · Fixed by #39551
Assignees
Labels
[Block] Slideshow Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Misc Blocks Other Jetpack blocks. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal Triaged [Type] Bug When a feature is broken and / or not performing as intended

Comments

@nazilya06
Copy link

nazilya06 commented Sep 19, 2024

Impacted plugin

Jetpack

Quick summary

When the Slideshow block images include captions, they appear duplicated in the Editor. However, they display correctly in the preview.

Editor:
Screenshot 2024-09-19 at 3 00 53 PM

Preview:
Screenshot 2024-09-19 at 3 02 29 PM

Steps to reproduce

  1. Make sure your site is using the FSE theme.
  2. Add a Slideshow block
  3. Add captions to the image

A clear and concise description of what you expected to happen.

No response

What actually happened

No response

Impact

Some (< 50%)

Available workarounds?

Yes, difficult to implement

If the above answer is "Yes...", outline the workaround.

For atomic sites, I found that deactivating the Gutenberg plugin fixes it.

Platform (Simple and/or Atomic)

No response

Logs or notes

8751655-zd-a8c

@nazilya06 nazilya06 added [Type] Bug When a feature is broken and / or not performing as intended [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Needs triage Ticket needs to be triaged [Feature] Misc Blocks Other Jetpack blocks. labels Sep 19, 2024
Copy link
Contributor

Support References

This comment is automatically generated. Please do not edit it.

  • 8751655-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Sep 19, 2024
@anomiex
Copy link
Contributor

anomiex commented Sep 23, 2024

Looks like what's going on here is that the swiper library is loaded asynchronously. Webpack's async loader doesn't know anything about Gutenberg's iframe editor, so swiper.css is only async-loaded at the top level, not in the iframe.

Disabling the Gutenberg plugin seems to also turn off the iframe editor, so the top-level-loaded swiper.css takes effect there.

Looks like the Map block has a hack to work around this (see #19552). Podcast Player is doing something seemingly similar (see #19578), but I think that one is more along the lines of needing to use the 'enqueue_block_assets' hook (now that it exists) rather than async loading from webpack.

@anomiex
Copy link
Contributor

anomiex commented Sep 23, 2024

Looking at options, I wonder if we could make use of mini-css-extract-plugin's import option to have it automatically load the styles inside Gutenberg's iframe when the iframe is present.

@jartes jartes added Triaged and removed Needs triage Ticket needs to be triaged labels Sep 24, 2024
@jartes jartes moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Sep 24, 2024
@jartes
Copy link

jartes commented Sep 24, 2024

📌 ACTIONS

  • Triaged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Slideshow Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Misc Blocks Other Jetpack blocks. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal Triaged [Type] Bug When a feature is broken and / or not performing as intended
Development

Successfully merging a pull request may close this issue.

3 participants