Skip to content

ref(stories): convert core component stories to mdx#105580

Draft
natemoo-re wants to merge 28 commits intomasterfrom
stories/nm/core-mdx
Draft

ref(stories): convert core component stories to mdx#105580
natemoo-re wants to merge 28 commits intomasterfrom
stories/nm/core-mdx

Conversation

@natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Dec 31, 2025

Closes DE-400

See the preview deployment

Converted all 17 TypeScript-based Storybook documentation files (.stories.tsx) in static/app/components/core/ to comprehensive MDX format (.mdx), following established patterns from existing MDX files.

Changes

Files Converted

  • Button family: buttonBar
  • Input family: input, inputGroup, numberInput, numberDragInput
  • Select family: select (merged multiSelect), compactSelect, composite
  • Form controls: radio, segmentedControl, slider, switch
  • Navigation: tabs
  • Interactive: interactionStateLayer, menuListItem
  • Feedback: toast

Documentation Enhancements

  • Comprehensive component purpose and usage guidance
  • All props documented with examples
  • Multiple usage patterns per component
  • WCAG 2.2 accessibility guidelines
  • Developer responsibilities and best practices
  • Keyboard shortcuts and interaction patterns

Special Cases

  • Merged multiSelect.stories.tsx into select.mdx (same component, just multiple prop)
  • Documented hooks: useAutosizeInput, useCompactSelectOptionsCache
  • Documented compound components: Tabs, InputGroup, CompositeSelect

Testing

Run Storybook to verify all MDX files render correctly:

pnpm run dev-ui

Navigate to each component to verify:

  • MDX frontmatter loads properly
  • Interactive demos work
  • Code examples match demos
  • Props documentation displays

@linear
Copy link

linear bot commented Jan 15, 2026

@natemoo-re natemoo-re marked this pull request as ready for review February 6, 2026 18:49
@natemoo-re natemoo-re requested a review from a team as a code owner February 6, 2026 18:49
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

<InputGroup>
<InputGroup.Input placeholder="Search" />
<InputGroup.TrailingItems>
<Button borderless icon={<IconSettings />} size="zero" aria-label="Settings" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Interactive demo uses non-existent borderless Button prop

Medium Severity

The interactive InteractiveDemo and code examples use <Button borderless ...> but borderless is not a recognized prop on Button. The Button component accepts priority with values like "transparent" for borderless appearance. The old stories used priority="transparent". This affects the rendered demo — the button won't have the intended transparent styling.

Fix in Cursor Fix in Web


import {useState} from 'react';

import {CompositeSelect, SelectTrigger} from '@sentry/scraps/compactSelect';
Copy link
Contributor

Choose a reason for hiding this comment

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

Import of non-existent SelectTrigger crashes Storybook page

High Severity

SelectTrigger is imported from @sentry/scraps/compactSelect but this export doesn't exist in the package's index.tsx. The package exports CompactSelect, CompositeSelect, and various utilities, but not SelectTrigger. This import is used in executable interactive demos (BasicDemo, MultiSelectDemo), so the entire composite.mdx Storybook page will fail to render. The old stories used OverlayTrigger.Button from @sentry/scraps/overlayTrigger for this purpose.

Fix in Cursor Fix in Web

value={values}
onChange={selected => setValues(selected.map(opt => opt.value))}
options={options}
triggerProps={{prefix: 'Character'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Demos use non-existent triggerProps prop on CompactSelect

High Severity

Multiple interactive demos pass triggerProps={{prefix: 'Environment'}} to CompactSelect, but this prop doesn't exist on the component. CompactSelect's ControlProps only exposes trigger (a render prop function), not triggerProps. The old stories correctly used trigger={props => <OverlayTrigger.Button {...props} prefix="..." />}. The triggerProps prop is silently ignored, so all demos render without their intended prefix labels (e.g., "Character", "Size", "Status", "Environment"), making the demos visually incorrect.

Additional Locations (1)

Fix in Cursor Fix in Web

@natemoo-re natemoo-re marked this pull request as draft February 6, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant