Skip to content

feat: support TableHeader and make sortType optional#99

Open
adgad wants to merge 1 commit intomainfrom
table-header
Open

feat: support TableHeader and make sortType optional#99
adgad wants to merge 1 commit intomainfrom
table-header

Conversation

@adgad
Copy link
Copy Markdown
Collaborator

@adgad adgad commented Sep 5, 2025

Previously we were relying on the heading:true property on TableCell to determine if it's a <th> - but we didn't really have anything to indicate the <thead>. This meant that consumers like cp-content-pipeline were doing wacky things like pulling out the first row, to put into a th.

Instead, lets be explicit and define a TableHeader.

This change also makes sortType optional. It is considered optional in cp-content-pipeline already (presumably because we have tables that don't define it) , so this makes the types in content-tree compatible.

cp-content-pipeline update: https://github.com/Financial-Times/cp-content-pipeline/pull/1399
spark update : TODO

UPDATE: we have decided for now that Spark/CP will not update to support a TableHeader, as this will involve a breaking change to our table support in CP. We will keep the optional support in content-tree, to support old content.

@adgad adgad requested review from a team as code owners September 5, 2025 15:47
@adgad adgad added this to the v1 milestone Sep 9, 2025
@adgad
Copy link
Copy Markdown
Collaborator Author

adgad commented Sep 9, 2025

I think this schema change is okay to merge, as it's backwards-compatible (the new Header types are optional children)

Some old content has been published with a Table Header, so make that an
optional child type for tables.
@adgad adgad requested a review from a team as a code owner March 30, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants