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

Raw Handling: unexpected results when pasting table with list from Google Docs #45774

Open
danielbachhuber opened this issue Nov 15, 2022 · 9 comments · May be fixed by #46775 or #55651
Open

Raw Handling: unexpected results when pasting table with list from Google Docs #45774

danielbachhuber opened this issue Nov 15, 2022 · 9 comments · May be fixed by #46775 or #55651
Assignees
Labels
[Block] Table Affects the Table Block [Feature] Paste Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@danielbachhuber
Copy link
Member

Description

I tried pasting a table from Google Docs and received unexpected results.

Google Docs

image

Gutenberg

image

Notably:

  1. My merged bottom cell doesn't span full width. I assume this is blocked by Table block: Merge/Unmerge cells #15821
  2. My unordered list in the bottom cell lost its formatting. To avoid going down the Table Block: Should we use InnerBlocks? #18768 rabbit hole, I'd be fine with it transforming to:

image

Related #32400

Step-by-step reproduction instructions

  1. Copy table from https://docs.google.com/document/d/17fBRHVwvr9OUzvVR0H1S5-YJ8KKUam1kgnh4X9vtWgU/edit?usp=sharing
  2. Paste table into Gutenberg
  3. Observe results

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 6.2-alpha-54642-src, Gutenberg 14.5.0
  • Chrome 107.0.5304.110 on Mac

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

@danielbachhuber
Copy link
Member Author

To resolve this issue, I'd like to propose two separate PRs:

  1. Support the colspan attribute on the underlying HTML (from Table block: Merge/Unmerge cells #15821 (comment)) with a test case for pasting from Google Docs.
  2. Transform unordered and ordered lists within tables to simple list representations on paste.

@amustaque97 amustaque97 added the Needs Testing Needs further testing to be confirmed. label Nov 15, 2022
@bph bph added the [Block] Table Affects the Table Block label Nov 15, 2022
@mpkelly
Copy link
Contributor

mpkelly commented Nov 15, 2022

To resolve this issue, I'd like to propose two separate PRs:

  1. Support the colspan attribute on the underlying HTML (from Table block: Merge/Unmerge cells #15821 (comment)) with a test case for pasting from Google Docs.

I am going to start this. You can assign this issue to me if you like (I can't do that myself).

@t-hamano
Copy link
Contributor

@mpkelly

Thanks for adding colspan support!

I would suggest adding further rowspan support, what do you think? I would be happy to help with the work.

@mpkelly
Copy link
Contributor

mpkelly commented Dec 13, 2022

@mpkelly

Thanks for adding colspan support!

I would suggest adding further rowspan support, what do you think? I would be happy to help with the work.

Sounds good to me, @t-hamano. It should be easy to use this PR as a template for rowpan too.

@t-hamano
Copy link
Contributor

The PR to support rowspan attribute: #46629

@zaguiini
Copy link
Member

@mpkelly was this fixed in #45981?

@t-hamano
Copy link
Contributor

t-hamano commented Feb 24, 2023

rowspan and colspan when pasting table was implemented in #45981 and #46629. However, #46775, which allows pasting of list content, has not yet been merged.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Jul 28, 2023
@annezazu annezazu changed the title Unexpected results when pasting table from Google Docs Raw Handling: unexpected results when pasting table from Google Docs Aug 3, 2023
@annezazu annezazu added the Needs Dev Ready for, and needs developer efforts label Aug 3, 2023
@annezazu annezazu moved this to Needs Dev / Todo in WordPress 6.4 Editor Tasks Aug 30, 2023
@ellatrix ellatrix changed the title Raw Handling: unexpected results when pasting table from Google Docs Raw Handling: unexpected results when pasting table with list from Google Docs Oct 10, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 26, 2023
@autumnfjeld
Copy link

@mpkelly is this something that you think you'll work on soon or should we move it to the backlog? THere hasn't been any interaction in this issue in eight months.

@mpkelly
Copy link
Contributor

mpkelly commented Jun 16, 2024

@mpkelly is this something that you think you'll work on soon or should we move it to the backlog? THere hasn't been any interaction in this issue in eight months.

It can go on the backlog and I can take a look in the next cool down week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table Affects the Table Block [Feature] Paste Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet