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

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

Closed
mlaetitia opened this issue Apr 17, 2024 · 12 comments · Fixed by #64502
Closed

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

mlaetitia opened this issue Apr 17, 2024 · 12 comments · Fixed by #64502
Assignees
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Feature] Paste [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@mlaetitia
Copy link

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

  • Tested on the two last versions of WordPress , with PHP 8.1
  • Both Chromium (ARC and Chrome) and Firefox browsers
  • MacOS operating system

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 mlaetitia added the [Type] Bug An existing feature does not function as intended label Apr 17, 2024
@mlaetitia
Copy link
Author

cc: @ellatrix

@colorful-tones
Copy link
Member

@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. 🤔

@colorful-tones colorful-tones added Browser Issues Issues or PRs that are related to browser specific problems [Feature] Paste labels Apr 18, 2024
@mlaetitia
Copy link
Author

@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
Copy link

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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

@lovestulip
Copy link

Hi @colorful-tones 😄 We're just checking back in on the progress of this issue.

In case it helps, I was also able to replicate the problem within Chrome: https://d.pr/i/pWsj6Y

@lovestulip
Copy link

Hi @colorful-tones - I wondered if this might land somewhere on the roadmap for Gutenberg improvements? Even being able to share with our partner that it's planned work would be promising! Thank you.

@colorful-tones
Copy link
Member

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

Then I would encourage us to close this issue and report the issue to the WordPress support forums. This is the Gutenberg plugin repository, and if the issue is not related to Gutenberg then it is likely a larger WordPress issue.

In case it helps, I was also able to replicate the problem within Chrome: https://d.pr/i/pWsj6Y

I would encourage you to share the copied code the Google Forms provides when you hit the 'copy' button. This will likely help debug the issue.

Hi @colorful-tones - I wondered if this might land somewhere on the roadmap for Gutenberg improvements? Even being able to share with our partner that it's planned work would be promising! Thank you.

Gutenberg and WordPress are open-source projects that rely on contributions from anyone and anywhere. The roadmap is ideally something that is greatly influenced by larger community needs and the governance around who/how/when these things are decided is quite fluid. So, I can not (merely an individual contributor to a larger community-drive open-source project) dictate, nor infer what is planned for the roadmap. Sorry.

@lovestulip
Copy link

Understood, thank you @colorful-tones for the clarification. I see two new PRs that are linked to this issue is open to track the work here:
#64502
#64479

I think it would make sense to close this issue once those changes are merged. We're keeping an eye on the progress as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Feature] Paste [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants