-
-
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
Merging header column cells and body cells results in changed header column row #5744
Comments
Hi @aStewartDesign! Thanks for the PR!. Definitely there's a problem with this behavior as we normalize table header column so it will always be rectangular. This is because we use some simple heuristic to detect heading columns. This has it's own issues when it comes to detecting heading rows - when there's no As for the feature of merging cells outside the heading section, it does make sense to not allow this for columns as in rows to match the behavior. However, there is more to be done to match the expected behavior:
@Reinmar - we should decide whether we want to change this behavior in the first place. I'm leaning towards it to match the behavior of the upcast conversion algorithm. If we do - then we can review closely linked PR and add a follow up for the |
Yeah, me too. Ideally, the user should not create invalid content in the editor and content which we cannot load later on seems to be invalid. There's also an accessibility aspect of allowing doing weird things with header cols/rows: #5584. So, taken that, I'm for prohibiting merging header cells beyond their respecitve header rows/cols. |
Thanks @jodator and @Reinmar for the feedback! If you want, I'm happy to help update the behavior of |
I don't recall exactly but you might be right. If you have time and willingnes then you can try :) If you get stuck just let us know. We want to update the I've created a follow-up ticker for this: #5761. |
📝 Provide detailed reproduction steps
✔️ Expected result
Probably should not be able to merge header column cells with body column cells
❌ Actual result
The body cell becomes a header column cell however when the data model is reloaded, the entire column the merged cell is in becomes a header column. Taking the ultimate table of coffee drinks as an example: https://ckeditor.com/docs/ckeditor5/latest/features/table.html
headerColumns === 2
and visually shows this with the rest of the "Espresso" column showing as a header column; inconsistent and different from the visual data that was there before.Maybe disabling merges between body/header column cells isn't the way to go but 1) it prevents this inconsistency in the way headerColumns are displayed 2) it keeps the merge behavior consistent with header rows (which already cannot merge with body cells).
I will have a PR with this fix available soon.
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: