-
Notifications
You must be signed in to change notification settings - Fork 17
Introduced support for removing multiple rows / columns using multi-cell selection #261
Conversation
…i cell selection case passes. Also renamed removedRow to removedRowIndex as it was extremely confusing to see a number there instead of the element.
…ti cell table selection.
…gular row being removed.
…e of multiple cells selected.
…single column are selected.
Currently it contains a bit of dirty code that I'm planning to simplify soon.
…ngly if there's a multiple cells selected.
…n contains all the columns in the table.
…er branch (remove row command).
…n is now consistent with collapsed caret selection. Now if you make a selection that contains all the rows, the command state is disabled.
@ckeditor/qa-team guys can you give it some testing? |
Steps:
NOTES:
Uncaught TypeError: Cannot read property 'column' of undefined
at RemoveRowCommand.execute (removerowcommand.js:70)
at RemoveRowCommand.<anonymous> (observablemixin.js:255)
at RemoveRowCommand.fire (emittermixin.js:209)
at RemoveRowCommand.<computed> [as execute] (observablemixin.js:259)
at CommandCollection.execute (commandcollection.js:68)
at ClassicEditor.execute (editor.js:288)
at DropdownView.<anonymous> (tableui.js:225)
at DropdownView.fire (emittermixin.js:209)
at fireDelegatedEvents (emittermixin.js:625)
at ListItemView.fire (emittermixin.js:232) browser: any EDITI guess this scenario can be simplified by simply selecting cells upwards like this: |
Forgot to mention that there's an external issue ckeditor/ckeditor5#6370 when you include the last row to be removed. It's not caused by this PR, it's on |
…tly with remove column / row commands.
Pushed a fix - this has been addressed in a way that it no longer crashes. However handling rowspan/colspan in case of multi-cell selection is still not ideal, which is something I'd like to extract to a separate task. Reason is that it will take substantial amount of time, for a relatively minor effect. This also affects:
|
Ok pushed some polishing. Better handling for colspan/rowspan edge cases extracted to ckeditor/ckeditor5#6406. The code wasn't changed that much that it would require QA team retest (all the cases are covered by unit tests too). |
~ Conflicts: ~ src/commands/removecolumncommand.js ~ src/commands/removerowcommand.js
Merged master branch, resolved conflicts. |
I tried to remove the very first row (bulleted, numbered, todo) from http://localhost:8125/ckeditor5/tests/manual/all-features.html. I select this entire row and when I execute the command it crashes with:
|
I also get this in:
|
…election in last row's cell.
…ith selection in the last cell (of a row that had to be removed).
~ Conflicts: ~ src/commands/removerowcommand.js ~ tests/commands/removerowcommand.js
That's unfortunately issue inherited from I have fixed this.
That's the last row issue mentioned here #261 (comment). Luckily it has been already merged on master branch, so I merged it here. Should no longer be reproducible. Merged |
Suggested merge commit message (convention)
Type: Introduced support for removing multiple rows or cells when multiple columns are selected selection. Closes ckeditor/ckeditor5#6126.
Additional information
Currently there's added row removal support.
There's a followup: ckeditor/ckeditor5#6370 related to:
ckeditor5-table/tests/commands/removerowcommand.js
Lines 130 to 151 in 23d3a40