Skip to content

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

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

rohanchkrabrty wants to merge 4 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 Nov 6, 2026 6:02am UTC

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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 24 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aff92fdd-12c2-4b58-ad92-ca28324fa25e
Commits

Reviewing files that changed from the base of the PR and between 5499f69 and b0c9fa5.

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

No actionable comments were generated in the recent review.

Walkthrough

The change renames variants 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

Merge Risk: Minimal · previous review 5499f

The renamed APIs require migration, but no material merge-blocking issue is known.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title describes the main change: renaming component variant and enum values.
Description check Passed The description covers the renamed values, Grid props, documentation, and tests.
Docstring Coverage Passed Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
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.
  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 98ea8dd3-b704-4c39-a6fc-9e9856f26e59
Commits

Reviewing files that changed from the base of the PR and between 73f20e1 and 5499f69.

Files selected for processing: 7

  • apps/www/src/content/docs/(overview)/upgrading.mdx
  • 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
Files with no reviewable changes: 1

  • packages/react/components/search/search.tsx
Files skipped from review as they are similar to previous changes: 1

  • apps/www/src/content/docs/(overview)/upgrading.mdx

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

@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: b0c9fa5

Comment thread packages/react/components/grid/grid.tsx Resolved
from you. The full record of every release, features and fixes included, is
on [GitHub releases](https://github.com/raystack/apsara/releases).

## Unreleased: variant and enum values are renamed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: packages/react/CHANGELOG.md keeps an "Unreleased" list with a (BREAKING) entry for each breaking change (#919 added one next to its Upgrading section). Could we add one for these renames too, so the changelog stays complete for the release?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment thread packages/react/figma/chip.figma.ts Resolved
Co-authored-by: Shreya Gupta <shreyagupta72484@gmail.com>
# Conflicts:
#	apps/www/src/content/docs/(overview)/upgrading.mdx
#	apps/www/src/content/docs/components/chip/demo.ts
#	packages/react/components/search/search.tsx

This branch was successfully deployed

1 active deployment
Preview — b0c9fa55 Deployed Nov 6, 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.

2 participants