Repository navigation
refactor: rename variant and enum values to shared names - #978
rohanchkrabrty wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou'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. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
commit: |
| 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 |
There was a problem hiding this comment.
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?
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
Summary
variantvalues to the names other components use:Input,TextAreaandSearchtakeoutlineandtext(weredefaultandborderless),FilterChiptakesoutline(wasdefault), andChiptakessolid(wasfilled).EmptyStatevariants after their layouts:empty1iscompactandempty2ispage.Gridtakesalignandjustifyin place ofalignItemsandjustifyContent, asFlexdoes.justifyandalignContenttakebetween,aroundandevenlyin place of thespace-*values.alignContentandjustifyItemskeep their names.CalendarPreviewnames the half-year scalehalf-year(washalfYear) inscales,scale,defaultScale,onScaleChange, value objects anddata-scale.Decisions
EmptyStatenames:compactis the centered layout with stacked actions for panels and lists.pageis 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 oneemptyStatePage.<prop>-<value>: FilterChipchip-defaultisvariant-outline, and Chip's private--chip-filled-*variables are--chip-solid-*. Computed styles do not change.variantrow it was missing.docs/V1-migration.mdanddocs/rfcs/005-calendar-preview.mdkeep the old names, because they describe earlier releases.direction(rowReverse,columnReverse) andwrap(noWrap,wrapReverse) values are camelCase, but the proposal does not list them, so they do not change here.Checks
pnpm lint,pnpm exec tsc --noEmitinpackages/react,pnpm test:apsara(3724 tests) andpnpm build:apsarapass.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.