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

6120: Pasting table into table - base scenarios. #6786

Merged
merged 76 commits into from
May 15, 2020
Merged

6120: Pasting table into table - base scenarios. #6786

merged 76 commits into from
May 15, 2020

Conversation

jodator
Copy link
Contributor

@jodator jodator commented May 11, 2020

Suggested merge commit message (convention)

Feature (table): Introduce pasting tables into a selected table fragment. Closes #6120.

MINOR BREAKING CHANGE: The cropTable() utility method was removed. Use cropTableToDimensions() instead.


Additional information

This PR introduces a subset of pasting scenarios limited to:

  1. The pasted table can have the same or bigger dimensions (width and/or height) than the selected table fragment. If height or width is smaller the paste is blocked (debug message is logged in the console).
  2. The pasted table must be rectangular (not blocked - it will "blow" a table after paste).
  3. The table selection must be rectangular (paste will be blocked with a debug message).

Other than the above scenarios that were targeted includes:

  • Pasting simple (no spans) or complex (various span) table over a simple or complex fragment.
  • Multiple block content inside pasted table cell contents.
  • Pasting table cells with properties (borders, width, background, etc).

Additionally, I had to:

  • again use Element._clone() - this will be reported somewhere
  • extract some utility methods from MergeCellsCommand - again followup for cleaning the utils mess will be reported
  • rewrite table cropping util to support new and old scenarios

What to not review:

  • tests for cut/copy - test were extracted as paste scenarios grew
  • beforementioned utility methods that were moved from command to other locations

jodator added 30 commits May 5, 2020 15:48
@jodator jodator requested a review from niegowski May 13, 2020 10:14
@jodator
Copy link
Contributor Author

jodator commented May 15, 2020

Thanks for 3633a36 I've missed that locally :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pasting table into a selected table fragment (bigger then one cell)
4 participants