Skip to content

feat: align the prop vocabulary and docs format with Kumo#242

Open
sriramveeraghanta wants to merge 1 commit into
mainfrom
feat/kumo-prop-vocabulary
Open

feat: align the prop vocabulary and docs format with Kumo#242
sriramveeraghanta wants to merge 1 commit into
mainfrom
feat/kumo-prop-vocabulary

Conversation

@sriramveeraghanta

Copy link
Copy Markdown
Member

Description

Extends the button-family rework (#239) and the menu/context-menu standardization (#241) across every component, adopting Kumo's prop vocabulary and its component-page format.

Props

Was Now Scope
magnitude size library-wide; sm·md·lg·xl value spellings unchanged
tone variant unions kept intact — Badge carries variant="danger" and variant="crimson" on one axis, exactly as Kumo's Badge does
emphasis variant Pill
appearance variant Tabs
presentation appearance NavigationMenuLink
mode variant Table — also corrects the root cva tableModestableVariants (rule 8)

Per-axis exported types follow (BadgeMagnitude/BadgeToneBadgeSize/BadgeVariant), along with AVATAR_TONESAVATAR_VARIANTS, getAvatarTone(Seed)getAvatarVariant(Seed), avatarToneBgClassavatarVariantBgClass, FieldOptionMagnitudeProvider/useFieldOptionMagnitudeFieldOptionSizeProvider/useFieldOptionSize, and TableMode/useTableModeTableVariant/useTableVariant.

Deliberately not renamed — forcing these would break the API rather than align it:

  • density stays. CheckboxGroupField/RadioGroupField take both density (option spacing) and magnitude (label text scale); both becoming size is a hard collision, and Kumo has no density vocabulary to borrow.
  • sizing, fillType, surface, elevation, visibility, placement, layout stay — Kumo has no counterpart. orientation and side already matched.

The size rename collides with the native <input size> attribute exactly as the old rule 6b predicted. Kumo resolves this with Omit<…, "size">; the same fix is applied to Input, AutocompleteInput, NumberFieldInput, OTPFieldInput, and TextArea.

Docs

All 62 component pages reordered to Kumo's structure — lead demo → ## Installation## Usage## Examples (cases demoted to H3) → ## API Reference — each block wrapped in a new ComponentSection.

propel ships no barrel export (package.json exposes only granular subpaths), so Installation keeps a single granular block rather than Kumo's ### Barrel / ### Granular split, which would document imports that don't resolve. Worth adding a barrel later if full parity is wanted.

Protocol docs

packages/propel/AGENTS.md and docs/design.md still mandated the opposite convention (rule 6b banned native attribute names; rule 6c called variant "a smell"). Both rewritten, merged with the versions #241 landed. Also corrects six JSDoc examples still documenting the prominence prop dropped in #239.

Type of Change

  • Improvement (refactor, restructure, or enhancement to existing functionality)
  • Code refactoring
  • Documentation update

This is a breaking change to the public API; a minor changeset is included (@makeplane/propel is pre-1.0).

Screenshots and Media

Test Scenarios

  • Run the docs site and confirm each component page reads demo → Installation → Usage → Examples → API Reference, with example cases nested under ## Examples.
  • Confirm the props table shows Prop · Type · Default · Description and marks required props with a red asterisk.
  • Verify <Badge variant="danger"> and <Badge variant="crimson"> both render, confirming the mixed semantic/decorative union.
  • Verify <Input size="lg" /> compiles and that the native size attribute is no longer accepted on Input, AutocompleteInput, NumberFieldInput, OTPFieldInput, TextArea.
  • Verify CheckboxGroupField/RadioGroupField still accept density and size independently.
  • Verify Table cells accept variant="table" / variant="spreadsheet" (previously mode).

References

Follows #239 (button-family API) and #241 (menu/context-menu API reference). Rebased onto both.

Verification: typecheck 0 errors, 848 tests passing across 120 files, format clean, and a structural validator over all 62 MDX pages (import resolution, unused imports, undefined JSX refs, balanced sections, PropsTable source paths, section order) reports 0 problems.

⚠️ pnpm build and pnpm check:lint could not be run locally — .node-version requires Node 24.16.0 and the dev machine has 22.17.1, so oxlint cannot load its .ts plugin and tsdown cannot load tsdown.config.ts. Both fail at config-load time on a clean tree too. CI should be treated as the source of truth for those two.

https://claude.ai/code/session_01G2g3qvyp1r5nDydrHk955N

Copilot AI review requested due to automatic review settings July 26, 2026 11:11

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
propel-docs fb6e7c5 Jul 26 2026, 11:17 AM

Extend the button-family rework (#239) and the menu/context-menu API
standardization (#241) across every component, adopting Kumo's prop
vocabulary and its component-page format.

Props: rename magnitude to size library-wide (sm/md/lg/xl spellings
unchanged) and fold tone into variant with each union kept intact, so
Badge carries variant="danger" and variant="crimson" on one axis exactly
as Kumo's Badge does. Also emphasis to variant (Pill), appearance to
variant (Tabs), presentation to appearance (NavigationMenuLink), and mode
to variant (Table, whose root cva is corrected to tableVariants per rule 8).

density stays: CheckboxGroupField and RadioGroupField already spend size on
the label text scale, so option spacing needs its own axis and Kumo has no
density vocabulary to borrow. sizing, fillType, surface, elevation,
visibility, placement and layout stay for the same reason.

size collides with the native <input size> attribute, so Input,
AutocompleteInput, NumberFieldInput, OTPFieldInput and TextArea omit it
from their props types -- the same fix Kumo applies.

Docs: reorder all 62 component pages to Kumo's structure (lead demo,
Installation, Usage, Examples with cases as H3, API Reference) inside a new
ComponentSection wrapper, and switch PropsTable to Kumo's
Prop/Type/Default/Description columns with required marked on the prop name.
propel ships no barrel export, so Installation keeps a single granular block
rather than Kumo's Barrel/Granular split.

Rewrite the prop-vocabulary rules in packages/propel/AGENTS.md and
docs/design.md, which mandated the opposite convention, and correct six
JSDoc examples still documenting the prominence prop dropped in #239.

Claude-Session: https://claude.ai/code/session_01G2g3qvyp1r5nDydrHk955N
Copilot AI review requested due to automatic review settings July 26, 2026 11:14
@sriramveeraghanta
sriramveeraghanta force-pushed the feat/kumo-prop-vocabulary branch from 997b09c to fb6e7c5 Compare July 26, 2026 11:14

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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@github-actions

Copy link
Copy Markdown

📚 Storybook preview: https://pr-242-propel-storybook.vamsi-906.workers.dev

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