Skip to content

docs(storybook): create deprecated props section in arg tables - #8088

Open
nineteen88 wants to merge 1 commit into
masterfrom
create-deprecated-prop-section
Open

docs(storybook): create deprecated props section in arg tables#8088
nineteen88 wants to merge 1 commit into
masterfrom
create-deprecated-prop-section

Conversation

@nineteen88

Copy link
Copy Markdown
Contributor

Proposed behaviour

Seperate out the main props from the deprecated props

Current behaviour

Deprecated props are jumbled in with the main props which can be quite overwhelming to consumers

Checklist

  • Commits follow our style guide
  • Storybook added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

this will seperate out the main props from the deprecated props

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the Storybook preview configuration to improve docs usability by separating deprecated component props into a dedicated “Deprecated Props” section within ArgTables, while still preserving deprecation text via the existing JSDoc workaround.

Changes:

  • Adds lightweight local typings for argType/table shapes to avoid repeated inline casts.
  • When a prop is marked @deprecated, forces its argTable category to “Deprecated Props” and attempts to retain prior grouping via subcategory.

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

Comment thread .storybook/preview.ts
Comment on lines +64 to +76
const typedArgType = argType as EnhancedArgType;
const existingCategory = typedArgType.table?.category;
const shouldMoveExistingCategoryToSubcategory =
existingCategory && existingCategory !== DEPRECATED_PROPS_CATEGORY;

(acc as Record<string, unknown>)[argName] = {
...typedArgType,
table: {
...typedArgType.table,
category: DEPRECATED_PROPS_CATEGORY,
subcategory: shouldMoveExistingCategoryToSubcategory
? existingCategory
: typedArgType.table?.subcategory,
@nineteen88
nineteen88 force-pushed the create-deprecated-prop-section branch from 8d129bf to 69de7a9 Compare August 11, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants