Page MenuHomePhabricator

Paste with a table selection doesn't mark pasted content as a wrapper, making cells look too large
Closed, ResolvedPublic

Description

Select like this and paste:

image.png (847×1 px, 38 KB)
image.png (847×1 px, 37 KB)

Now select like this and paste:

image.png (847×1 px, 29 KB)
image.png (847×1 px, 30 KB)

Note how the first table cell is larger. This is because it is missing the ve-ce-generated-wrapper class:

image.png (2×3 px, 426 KB)

Event Timeline

matmarex renamed this task from Paste with a table selection doesn't mark pasted content to Paste with a table selection doesn't mark pasted content as wrapped, making cells look too large.Jan 22 2022, 2:17 AM

n.b. this is just a view issue for the editor, when saving the page Parsoid converts both to |asd in the table.

Change 768119 had a related patch set uploaded (by Esanders; author: Esanders):

[VisualEditor/VisualEditor@master] Use wrapper paragraphs in fixUpInsertion

https://gerrit.wikimedia.org/r/768119

Change 768119 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Use wrapper paragraphs in fixUpInsertion

https://gerrit.wikimedia.org/r/768119

Change 768183 had a related patch set uploaded (by Bartosz Dziewoński; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (15c1efdc2)

https://gerrit.wikimedia.org/r/768183

Change 768183 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (15c1efdc2)

https://gerrit.wikimedia.org/r/768183

Pasted content is marked as wrapped.See https://photos.app.goo.gl/uPfpwH7mQCxx7pGY8

I did observe that changing the text style affects it as well. In 23, I changed the text to a heading and back to a paragraph. This change doesn't mark it wrapped.

Pasted content is marked as wrapped.See https://photos.app.goo.gl/uPfpwH7mQCxx7pGY8

I did observe that changing the text style affects it as well. In 23, I changed the text to a heading and back to a paragraph. This change doesn't mark it wrapped.

@matmarex, I expected the text to be wrapped after the change. is that a valid expectation?

@EAkinloose Thanks, I didn't think to test that. You're right, the text should still be marked as a wrapper, and the table cell should not be larger. I filed a separate task for this, because it looks like it will need a significantly different fix: T303775: Table cells look too large after applying and then removing paragraph formatting (e.g. heading, preformatted).

matmarex renamed this task from Paste with a table selection doesn't mark pasted content as wrapped, making cells look too large to Paste with a table selection doesn't mark pasted content as a wrapper, making cells look too large.Mar 14 2022, 9:14 PM

@EAkinloose Thanks, I didn't think to test that. You're right, the text should still be marked as a wrapper, and the table cell should not be larger. I filed a separate task for this, because it looks like it will need a significantly different fix: T303775: Table cells look too large after applying and then removing paragraph formatting (e.g. heading, preformatted).

All good here then. Thanks!