fix: use toggleHeader from prosemirror-tables #2412
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will update the tables extension to use the
toggleHeader
command instead of the deprecatedtoggleHeaderColumn
andtoggleHeaderRow
commands fromprosemirror-tables
. This is a breaking change because the commands will now only change the first column or row, respectively, instead of the row(s) or column(s) in the current selection. See the attached videos for examples.The exception to the changes is
toggleHeaderCell
. I'm not sure what we'd like to be done with it and am looking for some feedback. Currently, it toggles any cell(s) in the selection to be "header cells". This is the deprecated behavior inprosemirror-tables
. If we change it to usetoggleHeader
, then it will only toggle cells that are within the first row or column and, even then, it will only remove a header cell, it doesn't put one back. This is confusing which is why I haven't included that change here.Old Behavior
OldBehavior.mp4
New Behavior
NewBehavior.mp4