Skip to content

DOCS-3057: Add a component for feature lifecycle notices - #3052

Open
ctauchen wants to merge 1 commit into
tigera:mainfrom
ctauchen:DOCS-3057-mechanism
Open

ctauchen wants to merge 1 commit into
tigera:mainfrom
ctauchen:DOCS-3057-mechanism

Conversation

@ctauchen

@ctauchen ctauchen commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #3051, which is not merged yet, so this diff also shows that change. The commit to review here is the second one, "Add a component for feature lifecycle notices". Merge #3051 first and this diff reduces to that commit alone.

Technology preview and deprecation notices are hand-typed prose repeated across 133 pages in at least eight wordings. That is why notices outlive the status they describe, as DOCS-236, DOCS-616 and DOCS-375 all record, and as #3051 had to fix again. This adds one way to write them.

A page that is wholly about a feature declares the status in front matter and writes nothing in the body:

lifecycle-status: tech-preview
lifecycle-feature: Gateway WAF
lifecycle-id: gateway-waf

A new remark plugin places the notice directly after the page title, where every hand-written notice already sat. It inserts the component rather than building an admonition itself, so the front matter form and the hand-placed form render through the same code and cannot drift apart. A page that declares a status but has no title fails the build.

When only part of an otherwise generally available page is affected, or the notice needs extra guidance such as what to migrate to, the component is used directly in the page.

Two decisions worth a reviewer's attention.

The feature name is the admonition title rather than the subject of a sentence. Four of the names in data/feature-status.yaml are plural, so a template like "X is a technology preview feature" cannot serve all of them without a grammar flag per feature.

The notice reads nothing from data/feature-status.yaml at runtime, because it is a page-level editorial statement and coupling it would make every page edit a data file edit. A build-time check reconciles the two instead. The lifecycle-id binds a page to a feature, and the check fails when a page and the data file disagree for that tree's release. It is seeded with the contradiction that shipped in 3.33, so it is exercised whatever the content tree currently looks like. Pages without an id are not checked, so a feature with no entry in the data file costs nothing.

Verification:

  • yarn test:components passes, 22 suites, 201 tests. The component and the remark plugin are at 100 percent coverage.
  • yarn build and yarn build-next both succeed.
  • Pointing a pilot page at the wrong feature on purpose makes the drift check fail, and correcting it makes it pass again.

Two pages are converted as pilots, one of each form. They are in the next tree, so the links are on the next preview host, because static/_redirects sends next paths away from the main preview.

The remaining pages follow in later changes, one product per change.

Related: DOCS-2999.

@ctauchen
ctauchen requested a review from a team as a code owner October 2, 2026 16:40
Copilot AI balanced review requested due to automatic review settings October 2, 2026 16:40
@netlify

netlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 3425803
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6ac90d814c48b8000897d4de
😎 Deploy Preview https://deploy-preview-3052--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3425803
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6ac90d815b5dbd0008107a47
😎 Deploy Preview https://deploy-preview-3052--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 72 (🔴 down 2 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The drift check omits several actively built versioned documentation trees.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds reusable, validated feature lifecycle notices and includes cleanup from stacked PR #3051.

Changes:

  • Adds the LifecycleNotice component and automatic front-matter insertion plugin.
  • Adds lifecycle-status drift validation and tests.
  • Converts two pilot notices and removes obsolete tech-preview notices.
File Description
src/​theme/​MDXComponents.js Registers the lifecycle component globally.
src/​remark/​lifecycleNoticePlugin.js Inserts notices from front matter.
src/​remark/​__test__/​lifecycleNoticePlugin.test.js Tests notice insertion and validation.
src/​components/​LifecycleNotice/​index.tsx Implements lifecycle notice variants.
src/​components/​LifecycleNotice/​__test__/​index.test.tsx Tests component rendering.
src/​components/​LifecycleNotice/​__test__/​drift.test.ts Checks notices against feature-status data.
src/​components/​FeatureStatusTable/​featureStatus.ts Exposes status resolution for drift checks.
docusaurus.config.js Enables the remark plugin.
calico/​reference/​resources/​felixconfig.mdx Removes an obsolete preview notice.
calico/​reference/​felix/​configuration.mdx Removes an obsolete preview label.
calico/​getting-started/​kubernetes/​self-managed-onprem/​onpremises.mdx Removes obsolete CRD preview notices.
calico-enterprise/​threat/​gateway-waf/​overview.mdx Uses front-matter lifecycle metadata.
calico-enterprise/​reference/​resources/​felixconfig.mdx Uses an inline lifecycle notice.
calico_versioned_docs/​version-3.33/​getting-started/​kubernetes/​self-managed-onprem/​onpremises.mdx Removes obsolete versioned notices.
.github/​copilot-instructions.md Documents lifecycle-notice usage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +33 to +45
const TREES: { dir: string; product: string; version: string | null }[] = [
{ dir: 'calico', product: 'calico', version: null },
{ dir: 'calico_versioned_docs/version-3.33', product: 'calico', version: '3.33' },
{ dir: 'calico-enterprise', product: 'calico-enterprise', version: null },
{ dir: 'calico-enterprise_versioned_docs/version-3.24-2', product: 'calico-enterprise', version: '3.24' },
{ dir: 'calico-enterprise_versioned_docs/version-3.23-2', product: 'calico-enterprise', version: '3.23' },
{ dir: 'calico-cloud', product: 'calico-cloud', version: null },
{
dir: 'calico-cloud_versioned_docs/version-23-2',
product: 'calico-cloud',
version: ceVersionFromCloudversion('v3.23.1-4'),
},
];
Copilot AI balanced review requested due to automatic review settings October 8, 2026 14:27
@ctauchen
ctauchen force-pushed the DOCS-3057-mechanism branch from f11292f to 640a6c6 Compare October 8, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The drift check excludes four documentation versions currently built and published.

1 open finding

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Technology preview and deprecation notices were hand-typed prose repeated across
133 pages in at least eight wordings, which is why notices outlive the status
they describe. This adds one way to write them.

A page that is wholly about a feature declares the status in front matter:

  lifecycle-status: tech-preview
  lifecycle-feature: Gateway WAF
  lifecycle-id: gateway-waf

A new remark plugin places the notice directly after the page title, where every
hand-written notice already sat. It inserts the component rather than building an
admonition, so the front matter form and the hand-placed form render through the
same code and cannot drift apart.

When only part of an otherwise generally available page is affected, or the notice
needs extra guidance such as what to migrate to, the component is used directly in
the page instead.

The feature name is the admonition title rather than the subject of a sentence, so
that one fixed body serves names that are plural, such as Native v3 CRDs, as well
as singular ones.

The notice reads nothing from data/feature-status.yaml at runtime, since it is a
page-level editorial statement. A build-time check reconciles the two instead:
lifecycle-id binds a page to a feature, and the test fails when a page and the data
file disagree. It is seeded with the contradiction that shipped in 3.33, where the
release notes called native v3 CRDs generally available while the install page
still called it a technology preview.

Converts two pages as pilots, one of each form. The remaining pages follow in
later changes.
@ctauchen
ctauchen force-pushed the DOCS-3057-mechanism branch from 640a6c6 to 3425803 Compare October 9, 2026 15:51
Copilot AI balanced review requested due to automatic review settings October 9, 2026 15:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The drift check skips active documentation versions and incorrectly accepts removed features as deprecated.

3 open findings

🧠 Review effort: Balanced

Comment on lines +105 to +108
const ALLOWED: Record<Declarable, CellStatus[]> = {
'tech-preview': ['tech-preview'],
deprecated: ['deprecated', 'removed'],
};
Comment on lines +166 to +169
it('has something to check', () => {
// A rename or a moved tree would otherwise make this suite pass by checking nothing.
expect(TREES.filter((tree) => mdxFiles(tree.dir).length > 0)).toHaveLength(TREES.length);
});
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