Skip to content

refactor: rename variant and enum values to shared names - #978

Open
rohanchkrabrty wants to merge 2 commits into
mainfrom
refactor/variant-values
Open

rohanchkrabrty wants to merge 2 commits into
mainfrom
refactor/variant-values

Conversation

@rohanchkrabrty

Copy link
Copy Markdown
Contributor

Summary

  • Rename variant values to the names other components use: Input, TextArea and Search take outline and text (were default and borderless), FilterChip takes outline (was default), and Chip takes solid (was filled).
  • Rename EmptyState variants after their layouts: empty1 is compact and empty2 is page.
  • Grid takes align and justify in place of alignItems and justifyContent, as Flex does. justify and alignContent take between, around and evenly in place of the space-* values. alignContent and justifyItems keep their names.
  • CalendarPreview names the half-year scale half-year (was halfYear) in scales, scale, defaultScale, onScaleChange, value objects and data-scale.
  • Update the internal users (Command, Editor link form, PromptInput, FilterChip), docs, playgrounds, Figma templates and tests, and add an Upgrading section with the old and new values.

Decisions

  • EmptyState names: compact is the centered layout with stacked actions for panels and lists. page is the full-page layout with left-aligned content, a larger icon and actions in a row. The docs already describe them this way, and the CSS calls the second one emptyStatePage.
  • CSS classes follow <prop>-<value>: FilterChip chip-default is variant-outline, and Chip's private --chip-filled-* variables are --chip-solid-*. Computed styles do not change.
  • The Search props table gets the variant row it was missing.
  • docs/V1-migration.md and docs/rfcs/005-calendar-preview.md keep the old names, because they describe earlier releases.
  • Flex direction (rowReverse, columnReverse) and wrap (noWrap, wrapReverse) values are camelCase, but the proposal does not list them, so they do not change here.

Checks

  • pnpm lint, pnpm exec tsc --noEmit in packages/react, pnpm test:apsara (3724 tests) and pnpm build:apsara pass.

  • Compared the docs pages against apsara.raystack.org: Input, TextArea, Search, FilterChip, Chip, EmptyState, Grid, CalendarPreview, Command, Editor and PromptInput in light, and TextArea, Search, FilterChip, Chip, EmptyState and Grid in dark. The computed styles of every demo match. The Chip, TextArea, FilterChip, EmptyState and Grid playgrounds render the new values with the same styles as the old ones. The Upgrading page renders.

  • I have followed the pull request section of the contributing guide.

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
apsara Ready Ready Preview Oct 20, 2026 9:01am UTC

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ced722d0-41de-48ba-8bbc-4dbe597c169f
📥 Commits

Reviewing files that changed from the base of the PR and between 73f20e1 and 3b0e773.

📒 Files selected for processing: 6
  • packages/react/components/input/__tests__/input.test.tsx
  • packages/react/components/input/input.tsx
  • packages/react/components/search/__tests__/search.test.tsx
  • packages/react/components/search/search.tsx
  • packages/react/components/text-area/__tests__/text-area.test.tsx
  • packages/react/components/text-area/text-area.tsx

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c656a9d-1e11-42b7-984d-a04899b36393
📥 Commits

Reviewing files that changed from the base of the PR and between 5a54d44 and 73f20e1.

📒 Files selected for processing: 58
  • apps/www/src/components/docs/search.tsx
  • apps/www/src/content/docs/(overview)/upgrading.mdx
  • apps/www/src/content/docs/ai-elements/prompt-input/index.mdx
  • apps/www/src/content/docs/components/calendar-preview/demo.ts
  • apps/www/src/content/docs/components/calendar-preview/props.ts
  • apps/www/src/content/docs/components/chip/demo.ts
  • apps/www/src/content/docs/components/chip/index.mdx
  • apps/www/src/content/docs/components/chip/props.ts
  • apps/www/src/content/docs/components/empty-state/demo.ts
  • apps/www/src/content/docs/components/empty-state/index.mdx
  • apps/www/src/content/docs/components/empty-state/props.ts
  • apps/www/src/content/docs/components/filter-chip/demo.ts
  • apps/www/src/content/docs/components/filter-chip/props.ts
  • apps/www/src/content/docs/components/grid/demo.ts
  • apps/www/src/content/docs/components/grid/index.mdx
  • apps/www/src/content/docs/components/grid/props.ts
  • apps/www/src/content/docs/components/input/props.ts
  • apps/www/src/content/docs/components/search/props.ts
  • apps/www/src/content/docs/components/textarea/demo.ts
  • apps/www/src/content/docs/components/textarea/index.mdx
  • apps/www/src/content/docs/components/textarea/props.ts
  • packages/react/components/calendar-preview/__tests__/calendar-preview.test.tsx
  • packages/react/components/calendar-preview/__tests__/parse.test.ts
  • packages/react/components/calendar-preview/__tests__/scale-selection.test.tsx
  • packages/react/components/calendar-preview/__tests__/scale.test.ts
  • packages/react/components/calendar-preview/calendar-preview-periods.tsx
  • packages/react/components/calendar-preview/calendar-preview-scales.tsx
  • packages/react/components/calendar-preview/lib/parse.ts
  • packages/react/components/calendar-preview/lib/scale.ts
  • packages/react/components/chip/__tests__/chip.test.tsx
  • packages/react/components/chip/chip.module.css
  • packages/react/components/chip/chip.tsx
  • packages/react/components/command/command-input.tsx
  • packages/react/components/command/command.module.css
  • packages/react/components/editor/editor-link-form.tsx
  • packages/react/components/empty-state/__tests__/data-slots.test.tsx
  • packages/react/components/empty-state/__tests__/empty-state.test.tsx
  • packages/react/components/empty-state/empty-state.module.css
  • packages/react/components/empty-state/empty-state.tsx
  • packages/react/components/filter-chip/__tests__/filter-chip.test.tsx
  • packages/react/components/filter-chip/filter-chip.module.css
  • packages/react/components/filter-chip/filter-chip.tsx
  • packages/react/components/grid/__tests__/grid.test.tsx
  • packages/react/components/grid/grid.tsx
  • packages/react/components/grid/types.ts
  • packages/react/components/input/__tests__/input.test.tsx
  • packages/react/components/input/input.module.css
  • packages/react/components/input/input.tsx
  • packages/react/components/prompt-input/prompt-input-textarea.tsx
  • packages/react/components/prompt-input/prompt-input.module.css
  • packages/react/components/search/__tests__/search.test.tsx
  • packages/react/components/search/search.tsx
  • packages/react/components/text-area/__tests__/text-area.test.tsx
  • packages/react/components/text-area/text-area.module.css
  • packages/react/components/text-area/text-area.tsx
  • packages/react/figma/chip.figma.ts
  • packages/react/figma/empty-state.figma.ts
  • packages/react/figma/search.figma.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The change updates variant names for Input, TextArea, Search, FilterChip, Chip, and EmptyState. It renames Grid alignment props and values, and changes the CalendarPreview half-year scale identifier to half-year. Component implementations, CSS selectors, Figma mappings, tests, demos, and documentation are updated to use the revised names. The upgrade guide documents the renamed values and notes the handling of unknown scale names and stored halfYear values.

Suggested reviewers: shreyag02, ravisuhag

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 73f20

The renamed APIs appear consistent across the supplied components and examples. No actionable merge-blocking issue remains after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 45 files. (13 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: renaming variant and enum values to shared names across components.
Description check Passed The description directly matches the changeset and documents the renamed variants, props, scale values, affected internal users, tests, documentation, and validation results.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 45 files. (13 skipped: 13 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@raystack/apsara@978

commit: 3b0e773

This branch was successfully deployed

1 active deployment
Preview — 3b0e7739 Deployed Oct 20, 2026 by vercel[bot]
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.

1 participant