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

Table can overlap with List #8412

Open
LangQian opened this issue Nov 3, 2020 · 10 comments · May be fixed by #17741
Open

Table can overlap with List #8412

LangQian opened this issue Nov 3, 2020 · 10 comments · May be fixed by #17741
Labels
domain:ui/ux This issue reports a problem related to UI or UX. package:table pending:feedback This issue is blocked by necessary feedback. squad:core Issue to be handled by the Core team. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@LangQian
Copy link

LangQian commented Nov 3, 2020

📝 Provide detailed reproduction steps (if any)

  1. Insert a table
  2. Left align the table
  3. Insert a list right after the table (the list will appear on the right of the table)

✔️ Expected result

No overlapping between the list and the table.

❌ Actual result

There is overlapping. See below:
Screen Shot 2020-11-03 at 1 15 29 PM

📃 Other details

Reproducible here: https://ckeditor.com/docs/ckeditor5/latest/features/table.html


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@LangQian LangQian added the type:bug This issue reports a buggy (incorrect) behavior. label Nov 3, 2020
@FilipTokarski
Copy link
Member

Hi, thanks for the report. I can confirm this issue. Happens in all browsers and seems like an old issue.

@FilipTokarski FilipTokarski added squad:core Issue to be handled by the Core team. package:table labels Nov 4, 2020
@Mgsy Mgsy added this to the backlog milestone Nov 4, 2020
@Reinmar Reinmar added the intro Good first ticket. label Nov 9, 2020
@lslowikowska lslowikowska added the support:2 An issue reported by a commercially licensed client. label Dec 15, 2020
@oleq oleq modified the milestones: backlog, iteration 39 Dec 21, 2020
@magda-chrzescian
Copy link
Contributor

magda-chrzescian commented Dec 28, 2020

The problem is related rather to the lists themselves - it occurs also when the list follows an image or probably any widget positioned with a float property. I provided a list of possible solutions that I found below. It is probably possible to explore this topic some more and get better results by styling every nested level of the list separately.

Current state

overflow: hidden

  • it fixes the problem with the indentation of the lists next to the widget (see my next comment)
  • all of the lists are indented equally
  • the list doesn't wrap around the widget

list-style-position: inside 

  • the list next to the widget is fully visible, but not indented properly
  • nested elements aren't indented properly
  • indentation of any other lists is increased
  • edit: breaks the multiline list items indentation

list-style-position: inside and 
text-indent: 1.5em

  • the list next to the widget is fully visible and indented properly if not nested
  • nested elements aren't indented properly
  • indentation of any other lists is very increased
  • edit: breaks the multiline list items indentation

@magda-chrzescian
Copy link
Contributor

magda-chrzescian commented Dec 28, 2020

The indentation of nested lists also doesn't work properly if the list is next to the widget:

@oleq
Copy link
Member

oleq commented Jan 4, 2021

@Comandeer Do you know any other way to get this done? We're stuck.

@magda-chrzescian
Copy link
Contributor

magda-chrzescian commented Jan 7, 2021

I think I found a working solution, so no more research needs to be done on this issue.

It works properly for the table as a whole, only the separate points won't be wrapped around the widget (as below).

@magda-chrzescian
Copy link
Contributor

There are two related issues:
#8769 Text indent doesn't work if the paragraph is preceded by the block widget.
#8770 Table widget aligned to the left/right has no margins.

@magda-chrzescian
Copy link
Contributor

The solution proposed in #8767 (review) seems to be a CSS hack and can be unpredictable is the edge cases.

The other solutions we found affect the rest of the layout to aggressively to be implemented, so we decided to put off this issue for now.

@LukaszGudel
Copy link
Contributor

Same issue came out during new inline image testing. New findings not yet covered by this issue:

1. TODO lists also can overlap with the tables/images:

CKE5-inline-wrap-indent-todo.mp4

2. [SAFARI] Changing indent levels on lists results in hanging bullet points/numbers:

CKE5-inline-lists-with-wrap.mp4

@pszczesniak
Copy link
Contributor

Maybe we can think about how to "push" the list so the markers wont lies inside table cells. We can use :has in CSS and detect if table has float (we should use some class not an inline style) and next element is a list - we can set a margin on the right/lest side of the table (depend on float and/or RTL). It's not a perfect solution but it should help a bit.

Originally mention here: #14921 (comment)

@niegowski
Copy link
Contributor

I'd suggest using the floating images approach. The floating image itself should set the margin on the opposite side. The problem here is that tables do not use CSS classes for styles. An inline style is used. We could modify the table alignment feature to upcast both, inline style and dedicated CSS class and downcast always to a CSS class that could include the margin style.

@pszczesniak pszczesniak linked a pull request Jan 10, 2025 that will close this issue
@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. package:table pending:feedback This issue is blocked by necessary feedback. squad:core Issue to be handled by the Core team. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. support:2 An issue reported by a commercially licensed client. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet