WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.15k stars 4.05k forks source link

Google Forms charts copying not persisting (when copied from Chrome) #60811

Open mlaetitia opened 3 months ago

mlaetitia commented 3 months ago

Description

Google Forms has a feature when seeing the results that allows us to copy charts and paste them somewhere else.

When doing this / pasting them to the editor the images don't persist if the copy was made from Chrome . It does work in Firefox.

Step-by-step reproduction instructions

  1. Create a google form with a question with multiple options
  2. Respond to the form a couple of times to generate data
  3. Head to the Responses tab and find a chart with the summary of the responses
  4. Next to the chart there's a "Copy" button - click it on a chrome browser
  5. Open the Editor and paste . You'll see an image appearing (the copied chart)
  6. Save your draft or publish the post
  7. Leave the editor and re-open the editor with the same post - you'll find the image is missing

You can check - if you click the copy button on the Firefox browser - that the issue won't happen. The chart is copied , the chart is saved to the media library and when we re-enter the editor the chart image is still there.

Screenshots, screen recording, code snippet

Screenshot:

Xnip2024-04-17_11-01-12

From Firefox this is created (when checking the Code Editor instead):

<!-- wp:image {"id":10,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://loudly-intelligent.jurassic.ninja/wp-content/uploads/2024/04/image-1024x430.png" alt="" class="wp-image-10"/></figure>
<!-- /wp:image -->

Whereas pasting from Chrome creates a paragraph instead:

<!-- wp:paragraph -->
<p><img src="blob:https://loudly-intelligent.jurassic.ninja/115b3fb7-5377-4c54-8f3f-40de0b1898e4" alt="Forms response chart. Question title: What about the preferred time of day?. Number of responses: 9 responses."></p>
<!-- /wp:paragraph -->

Clipboard inspector showed two different things being copied - added them to gists:

Environment info

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

mlaetitia commented 3 months ago

cc: @ellatrix

colorful-tones commented 3 months ago

@mlaetitia was this working for you in Chrome with previous versions of Gutenberg?

It seems that if the Copy to Clipboard is different from each browser then it would certainly impact the Paste action too and make it hard for Gutenberg to infer what the copied code is. 🤔

mlaetitia commented 2 months ago

@colorful-tones I can't say for sure it was. I tested with the latest two big WordPress versions and I can replicate with both, but didn't test with oldest ones.

It seems that if the Copy to Clipboard is different from each browser then it would certainly impact the Paste action too and make it hard for Gutenberg to infer what the copied code is. 🤔

I definitely think that's what's happening! Not sure if this qualifies as a Gutenberg bug itself, but definitely isn't working as I would expect it to. Also not sure if this applies to other sources of data other than Google Forms charts .

xpurichan commented 4 weeks ago

Hi @colorful-tones , checking in with you to see where this issue stands in terms of the roadmap for a future Gutenberg update.

colorful-tones commented 3 weeks ago

I'm still unclear as to whether this is a Gutenberg plugin issue. It is not indicated in the original report, which is usually part of the Issue Template: Please confirm that you have tested with all plugins deactivated except Gutenberg. Yes/No

It would be helpful for someone to test and verify that this is still an issue with the latest Gutenberg plugin installed and activated. If it is not an issue with the Gutenberg plugin, then it may be worth creating a support request on the Support forums or even searching to see if there is already an issue on the forums that may guide you to a solution. Perhaps one of these may help? (just did a quick search, and did not read through them, but dropping them in case) https://wordpress.org/support/topic/google-form-embed-error-2/

checking in with you to see where this issue stands in terms of the roadmap for a future Gutenberg update.

@xpurichan I am only one contributor of thousands driving the project forward. Currently, we're in the WordPress 6.6 release cycle, and the Roadmap was shared publicly for discussion several weeks ago.

For now, I would encourage somebody to test and verify this is a Gutenberg issue and then provide further details as to the specifics of the issue (browser, operating system, WP version, Gutenberg version, and steps to recreate the issue, etc.) Thanks!

mlaetitia commented 3 weeks ago

Hi! The question "Please confirm that you have tested with all plugins deactivated except Gutenberg." is indeed replied above with Yes . I also added above the code snippets , example:

<!-- wp:image {"id":10,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://loudly-intelligent.jurassic.ninja/wp-content/uploads/2024/04/image-1024x430.png" alt="" class="wp-image-10"/></figure>
<!-- /wp:image -->

These generally are only generated in gutenberg, afaik. But just to confirm - this is indeed an issue with Gutenberg plugin / editor.

That being said - I totally agree with you : it would be great if someone else tested / replicated other than me.

colorful-tones commented 3 weeks ago

The question "Please confirm that you have tested with all plugins deactivated except Gutenberg." is indeed replied above with Yes .

My apologies @mlaetitia. I was on my mobile phone and must have overlooked these key details. Sorry! 🤦

These generally are only generated in gutenberg, afaik.

Could you clarify a bit more? The Gutenberg plugin has taken on many different meanings throughout its history, and I wonder if we're confusing the block editor (not Classic editor) as a general "Gutenberg issue." 🤔

mlaetitia commented 1 week ago

Hi! It happens on the latest WordPress release, with or without the gutenberg plugin active.