DOCS-3021: Render the deprecated and removed tables from the data file - #2980
Conversation
✅ Deploy Preview succeeded!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for calico-docs-preview-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR removes duplicated hand-written “Deprecated and removed features” tables from multiple release-notes pages by rendering them from data/feature-status.yaml, using the same FeatureStatusTable machinery already used for Tech Preview tables. It extends the shared row-building logic with an include status filter so the same component can render both tables consistently.
Changes:
- Refactors the FeatureStatusTable component to support an
includestatus filter and exportsTechPreviewTableandDeprecatedFeaturesTableas named exports. - Extends
buildRowsto accept aninclude: FeatureStatus[]filter (tech-preview vs deprecated/removed). - Replaces hand-typed deprecated/removed Markdown tables in affected release-notes MDX pages with
<DeprecatedFeaturesTable />and updates tests accordingly.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/FeatureStatusTable/index.tsx | Introduces a shared internal table component parameterized by include, and exports TechPreviewTable + new DeprecatedFeaturesTable. |
| src/components/FeatureStatusTable/featureStatus.ts | Updates buildRows signature to filter rows by an include list of statuses. |
| src/components/FeatureStatusTable/test/index.test.tsx | Updates imports to named exports and adds coverage for <DeprecatedFeaturesTable />. |
| src/components/FeatureStatusTable/test/featureStatus.test.ts | Updates helpers/tests for the new include parameter and adds assertions for deprecated/removed tables/legends. |
| calico-enterprise_versioned_docs/version-3.24-2/release-notes/index.mdx | Replaces both hand-written tables with rendered components and imports named exports. |
| calico-enterprise_versioned_docs/version-3.24-1/release-notes/index.mdx | Replaces both hand-written tables with rendered components and imports named exports. |
| calico-enterprise_versioned_docs/version-3.23-2/release-notes/index.mdx | Replaces both hand-written tables with rendered components and imports named exports. |
| calico-enterprise_versioned_docs/version-3.22-2/release-notes/index.mdx | Replaces both hand-written tables with rendered components and imports named exports. |
| calico-enterprise_versioned_docs/version-3.21-2/release-notes/index.mdx | Replaces both hand-written tables with rendered components and imports named exports. |
| calico_versioned_docs/version-3.32/release-notes/index.mdx | Switches to named import style and replaces the deprecated/removed Markdown table with <DeprecatedFeaturesTable />. |
| calico_versioned_docs/version-3.31/release-notes/index.mdx | Replaces both hand-written tables with rendered components and imports named exports. |
| calico_versioned_docs/version-3.30/release-notes/index.mdx | Replaces both hand-written tables with rendered components and imports named exports. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ea4b5d0 to
782410a
Compare
| features: Feature[], | ||
| product: string, | ||
| versions: string[], | ||
| include: FeatureStatus[] |
782410a to
7d7643c
Compare
Every release-notes page carries a second hand-typed table, listing what has been deprecated or removed, with the same duplication and drift problem as the preview table. Generalise buildRows with an include parameter and add DeprecatedFeaturesTable alongside TechPreviewTable. The status filter is the only thing separating the two: one selects rows that were in preview during the window, the other rows that were deprecated or removed. Everything else — the window, the product, carry-forward, ordering, the legend — is already shared. Both statuses select a row so that a feature deprecated earlier and removed inside the window stays visible through the release that removed it, which is what Enterprise 3.24 does with compliance reporting. Both components are now named exports, so a page imports the pair on one line rather than a default and a name. The seven pages that already used the preview table are updated to match. Place the table in all eight release-notes pages, replacing the table and its legend and leaving the surrounding prose and the per-release list alone. No row, cell, or column differs from what is published today. Row order changes the same way it did for the preview tables, and six of the seven legends lose a gloss for a status their table never uses: Removed everywhere but Enterprise 3.24, and GA as well in Enterprise 3.22, where every cell is Deprecated.
7d7643c to
1088ca8
Compare
|
The readonly finding was correct and is fixed: buildRows now takes readonly FeatureStatus[], since it does not mutate the argument. Worth recording how it survived to review, because the same gap will hide the next one. Nothing in the pipeline type-checks this code. Jest transforms through swc, and the site builds through swc as well, so both strip types without checking them. Running the repo's own tsc fails before it reaches any source, on two pre-existing tsconfig problems: @types/node is listed in types but not installed, and suppressImplicitAnyIndexErrors was removed in TypeScript 5. Verified the fix rather than assuming it. Type-checking the two files against a minimal config reports the error before the change and nothing after: Fixing the repo tsconfig so CI can type-check at all is worth its own ticket. It is out of scope here, but this PR is evidence that a type error can reach review with every check green. |

Sits on top of #2979 and will shrink to a single commit once that merges. Review the top commit only.
Every release-notes page carries a second hand-typed table, listing what has been deprecated or removed, with the same duplication and drift problem as the preview table. This renders it from data/feature-status.yaml too. With this and #2979 merged, no feature status is typed into a release-notes page anywhere.
Almost nothing new was needed. buildRows gains an include parameter, and the status filter is the only thing separating the two tables: one selects rows that were in preview during the window, the other rows that were deprecated or removed. The window, the product, carry-forward, ordering, and the legend are already shared. That parameter is the one deliberately left out of #2968 as speculative, on the grounds that it should arrive with a second caller rather than before one. This is the second caller.
Both statuses select a row, so a feature deprecated earlier and removed inside the window stays visible through the release that removed it. Enterprise 3.24 is the case that matters: compliance reporting reads Deprecated, Deprecated, Removed.
Both components are now named exports, so a page imports the pair on one line rather than a default and a name:
Only the table and its legend are replaced. The prose above each table and the per-release list of deprecations below it are untouched.
Verified the same way as #2979, against what docs.tigera.io serves today. Across all seven deprecated tables there is no difference in any column header, in any row, or in any cell. Two things change:
The tables already carried the same legend regardless of content, so this keeps them consistent with each other and with the preview tables, which #2979 puts on the same footing.
On the deploy preview:
The rendered tables should be indistinguishable from hand-written Markdown ones, since they are plain tables picking up the same theme styles.