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

Provide marker conversion handling for table cells #7360

Closed
scofalik opened this issue Jun 2, 2020 · 1 comment · Fixed by #7391
Closed

Provide marker conversion handling for table cells #7360

scofalik opened this issue Jun 2, 2020 · 1 comment · Fixed by #7391
Assignees
Labels
package:table type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@scofalik
Copy link
Contributor

scofalik commented Jun 2, 2020

📝 Provide a description of the new feature

I am not sure if it is a new feature or improvement, but...

In short, it would be nice if table cells behave like images or other widgets when it comes to marker conversion. Right now, they behave like paragraphs, that is, if a marker is created on a cell, the conversion happens for the cell contents not for the cell itself. As a result, the text is highlighted, while it would be better if the cell had received proper classes:

Model now:

[<tableCell><paragraph>Foo</paragraph></tableCell>]

View now:

<td><span class="marker">Foo</span></td>

View expected:

<td class="marker">Foo</td>

This way we can do better styling, for example change table border or background.

This is fairly easy to achieve as proper code already exists.

Of course, this is needed to implement collaboration features for multi-cell selection (comments in this case). However, since downcasting for tables is quite complicated, it cannot be easily done on collaboration features side (it is possible, I did it, but it would require tens of lines of two function calls and it would be limited to comments only).

I will create a branch with a proposal for changes for table package.

Related: #7359

@scofalik scofalik added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:table labels Jun 2, 2020
@scofalik
Copy link
Contributor Author

scofalik commented Jun 2, 2020

@jodator jodator added this to the iteration 33 milestone Jun 4, 2020
@oleq oleq closed this as completed in #7391 Jun 9, 2020
oleq added a commit that referenced this issue Jun 9, 2020
Other (table): Marker on table cells should be downcasted to CSS classes on cells (instead of wrapping the content). Closes #7360.

Tests (engine): Added the Table feature to the "Highlight" manual test (see #7360).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:table type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants