Skip to content

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

@Sidsector9

Description

@Sidsector9

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions