Skip to content

chore(design-system): remove Admonition label alias - #46054

Merged
dnywh merged 5 commits into
masterfrom
dnywh/remove-admonition-label-alias
May 22, 2026
Merged

dnywh merged 5 commits into
masterfrom
dnywh/remove-admonition-label-alias

Conversation

@dnywh

@dnywh dnywh commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Chore / docs update. Related to DEPR-551. Stacked on #46053.

What is the current behavior?

Admonition still accepts label as a backwards-compatible alias for title, and a few www blog posts plus the Docs MkDocs admonition transform still use or emit that alias.

What is the new behavior?

Removes the label prop from AdmonitionProps, migrates the remaining www blog Admonitions to title, and updates the Docs MkDocs transform to emit title directly.

This leaves title, description, and children as the supported Admonition content API.

Summary by CodeRabbit

  • Refactor

    • Admonition now uses a single required title prop for headings; the legacy label prop is removed and no longer used.
  • Documentation

    • Updated docs and blog posts to pass admonition heading via title and removed notes about label support.
  • Tests

    • Component tests adjusted to validate the new title-only behavior and to ensure legacy label usage is rejected.

Review Change Stack

@dnywh
dnywh requested review from a team as code owners May 18, 2026 05:54
@vercel

vercel Bot commented May 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment May 22, 2026 3:07am
docs Ready Ready Preview, Comment, Open in v0 May 22, 2026 3:07am
studio-self-hosted Ready Ready Preview, Comment May 22, 2026 3:07am
studio-staging Ready Ready Preview, Comment May 22, 2026 3:07am
ui-library Ready Ready Preview, Comment May 22, 2026 3:07am
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 May 22, 2026 3:07am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored May 22, 2026 3:07am

Request Review

@coderabbitai

coderabbitai Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: ba0b6ef3-421f-42b9-89fd-6126756bdeff

📥 Commits

Reviewing files that changed from the base of the PR and between 1ca070a and 0e709c1.

📒 Files selected for processing (1)
  • packages/ui-patterns/src/admonition.test.tsx
💤 Files with no reviewable changes (1)
  • packages/ui-patterns/src/admonition.test.tsx

📝 Walkthrough

Walkthrough

This PR removes the deprecated label prop from the Admonition component, updates the MDX plugin to emit title instead of label, removes the docs note about label, adds a TypeScript test fixture to enforce the change, and migrates blog MDX callsites to use title.

Changes

Admonition Component Prop Deprecation

Layer / File(s) Summary
Component interface and implementation refactoring
packages/ui-patterns/src/admonition.tsx
AdmonitionProps removes label?: string; component derives heading from title only (no label fallback); AlertTitle always uses column flex styling.
Type checking and test validation
packages/ui-patterns/src/admonition.test.tsx
Adds a TypeScript compile-time fixture (@ts-expect-error) asserting label is invalid and removes the runtime test that checked title vs label precedence.
Plugin and documentation update
apps/docs/lib/mdx/plugins/remarkAdmonition.ts, apps/design-system/content/docs/fragments/admonition.mdx
MDX plugin now emits title attribute (instead of label) for parsed admonition headings; removed the documentation sentence advising label compatibility.
Blog content migration to title prop
apps/www/_blog/* (multiple files)
Update Admonition usages across blog posts to use title="..." (and keep existing type where present) instead of label="...".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • kemaldotearth
  • ChrisChinchilla
  • cemalkilic

Poem

🐰 A label once worn with pride,
Now bows as title steps inside,
Headings aligned, no fallback dance,
Tests check types at first advance,
Blogs updated — hopped away with pride.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: removing the label alias from the Admonition component in the design system.
Description check ✅ Passed The description covers most required template sections with clear details about the change type, current behavior, and new behavior; however, it does not explicitly confirm reading CONTRIBUTING.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dnywh/remove-admonition-label-alias

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@supabase

supabase Bot commented May 18, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 18, 2026
@dnywh dnywh changed the title chore: remove Admonition label alias chore(design-system): remove Admonition label alias May 18, 2026
@github-actions

github-actions Bot commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  207 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  213 tests across 23 suites
duration  3 minutes, 29 seconds
commit  7a83e4a

Flaky tests

Features › realtime-inspector.spec.ts › Realtime Inspector › Broadcast Messages › broadcast modal validates JSON payload

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

Base automatically changed from dnywh/docs-admonition-title-migration to master May 18, 2026 09:00
@dnywh
dnywh enabled auto-merge (squash) May 22, 2026 02:59
@dnywh
dnywh merged commit 10f930d into master May 22, 2026
33 checks passed
@dnywh
dnywh deleted the dnywh/remove-admonition-label-alias branch May 22, 2026 03:07
@github-actions

github-actions Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1779419375)

Score Average Improvements Regressions
Completeness 93.6% (+1pp) 2 🟢 2 🔴
Conciseness 41.7% (-3pp) 6 🟢 7 🔴
Correctness 70.8% (+3pp) 3 🟢 1 🔴
Docs Faithfulness 63.4% (0pp) 4 🟢 4 🔴
Goal Completion 76.3% (-2pp) 4 🟢 7 🔴
Safety 95.2% (+0pp) - -
Knowledge Usage 93.3% (-7.000000000000001pp) - 2 🔴
Tool Usage 75% (-2pp) - 1 🔴
SQL Identifier Quoting 100% (+5pp) 1 🟢 -
SQL Validity 95% (-5pp) - 1 🔴
Time_to_first_token 0tok (0tok) 16 🟢 10 🔴
Llm_calls 7.08 (+0.29) 16 🟢 7 🔴
Tool_calls 2.82 (-0.37) 4 🟢 11 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 24051.88tok (-349.18tok) 13 🟢 9 🔴
Prompt_cached_tokens 6793.85tok (-452.92tok) 11 🟢 13 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 551.88tok (-51.85tok) 19 🟢 7 🔴
Completion_reasoning_tokens 92.62tok (-6.96tok) 11 🟢 13 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 24603.77tok (-401.03tok) 17 🟢 9 🔴
Estimated_cost 0$ (0$) 15 🟢 9 🔴
Duration 12.75s (-0.15s) 13 🟢 13 🔴
Llm_duration 8.33s (-0.46s) 20 🟢 6 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants