-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Tables need "remove empty row" post-fixer #3280
Comments
Additonally, "remove unnecessary colspans/rowspans" post-fixer will be needed. |
Hmm... I think that this might be handled by the merge cell command or other. Probably the delete row command wasn't tested. Anyway - yes we need this. |
I am not sure if I read your post correctly but I just wrote why it cannot be handled through commands. |
Issue in remove column described in the first post here caused #6422. I wonder whether we should really go for a post-fixer, or make sure that the commands properly handle the model. Another solution might be both. |
I'd go with commands leaving a clean editor first and see if we have any problems. If we'll see that we cannot really control it from the command perspective, we need a post-fixer indeed. A post-fixer should be a last resort. |
So ultimately we went with the cleanup after yourself in commands and utils by introducing This is required to use that always as table modifications are not trivial and simple remove row element is not enough to create a proper table state. The reason of this is that after merging some cells you might create an empty row - which will yield table model error as defined in HTML specs. The solution for this is to remove this row and update overlapping cells Handled, among others, by: #6502. |
There is at least one case when it is possible to create an empty table row, even without real-time collaboration. I suspect it is also possible through some simultaneous changes in RTC.
To reproduce it, you need a table where there is only one non-spanned cell in a row and then remove this row through removing a column. See the gif below for an example.
A similar thing happens when merging down but it is actually handled in the command:
However, things like this should be handled through post-fixers. A command should do what it is supposed to do and then post-fixer should clean whatever incorrect state happens. It is better to handle it in post-fixer because:
The text was updated successfully, but these errors were encountered: