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

Possibility of switching core/table from static to dynamic block? #55087

Closed
Sidsector9 opened this issue Oct 5, 2023 · 1 comment
Closed

Comments

@Sidsector9
Copy link
Contributor

What problem does this address?

Hello all, I wanted to discuss the possibility of converting/migrating the core Table block from static to dynamic type, and I am not sure whether this is possible, or at least discouraged.

There is a list of feature requests & enhancements for the Table block here - #32400

Recently, I picked up the feature request to merge/un-merge cells here - #15821
and made decent progress:

Screen.Recording.2023-09-12.at.1.45.54.AM.mov

This works pretty well until you save and reload. If you try to merge cells after reloading, it will break.
The reason is, when the HTML is saved to the DB, it excluded the cells that were part of the merged cell. Due to this, when the editor reconstructs the table using the save function, the original index values are lost.

I found it to be extremely complicated to fix it as the context of the table before and after saving is lost. And reconstruction passes values to the attributes after parsing the HTML of the saved data.

If we were to use a dynamic table, we could store this information as Block attributes and then use it to build the table server-side.

What is your proposed solution?

I have more of a concept at the moment rather than the actual solution. If this is feasible then I'll be more than willing to contribute to the discussion.

@Sidsector9 Sidsector9 changed the title Possibility of switching Table from static to dynamic block? Oct 5, 2023
@Sidsector9
Copy link
Contributor Author

Closing as I've moved this to discussions - #55089

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant