Skip to content

refactor: [headline, container] use start and end for align - #974

Open
rohanchkrabrty wants to merge 2 commits into
mainfrom
refactor/align-start-end
Open

rohanchkrabrty wants to merge 2 commits into
mainfrom
refactor/align-start-end

Conversation

@rohanchkrabrty

@rohanchkrabrty rohanchkrabrty commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Rename align values on Headline and Container from left, center, right to start, center, end. This is a breaking change. Headline defaults to start, and Container still defaults to center.
  • Use logical margins (margin-inline) for Container alignment, so start and end follow the text direction. Headline already used text-align: start and end.
  • Rename the CSS module classes to align-start, align-center and align-end.
  • Update the docs pages, playgrounds, props tables and tests, and add an "align takes start and end" section to the upgrading page.

Decisions:

  • center is also renamed to align-center, so the three classes follow the <prop>-<value> rule.
  • left and right are removed with no deprecated alias.
  • In left-to-right layouts, pixels and defaults do not change.

Visual check: I compared the docs from this branch with a docs dev server built from main, in light and dark themes.

  • Headline and Container align demos: in LTR, start, center and end have the same computed margins, text alignment and positions as left, center and right on main. With dir="rtl" on the demo, Container start moves to the right edge. On main, left stays on the left.

  • Playgrounds: the align options are start, center and end. Both components render the selected value. The Headline code leaves out align when it is start.

  • The 404 page (two default Headlines) is the same as on main. The upgrading page section renders. No page errors.

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

@vercel

vercel Bot commented Oct 18, 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 8:27am UTC

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: 9fbd15f1-651c-416c-b17c-f7ca13fce27c
📥 Commits

Reviewing files that changed from the base of the PR and between 0baca36 and 7744d0c.

📒 Files selected for processing: 13
  • apps/www/src/content/docs/(overview)/upgrading.mdx
  • apps/www/src/content/docs/components/container/demo.ts
  • apps/www/src/content/docs/components/container/index.mdx
  • apps/www/src/content/docs/components/container/props.ts
  • apps/www/src/content/docs/components/headline/demo.ts
  • apps/www/src/content/docs/components/headline/index.mdx
  • apps/www/src/content/docs/components/headline/props.ts
  • packages/react/components/container/__tests__/container.test.tsx
  • packages/react/components/container/container.module.css
  • packages/react/components/container/container.tsx
  • packages/react/components/headline/__tests__/headline.test.tsx
  • packages/react/components/headline/headline.module.css
  • packages/react/components/headline/headline.tsx

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

Container and Headline replace left and right alignment values with start and end, while retaining center. The components use updated alignment classes, and Container uses logical inline margins. Headline now defaults to start; Container retains its center default. Tests, playground examples, component documentation, and the upgrading guide reflect the new values and text-direction behavior.

Suggested reviewers: shreyag02

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 7744d

The alignment rename is documented as a breaking change, and no broken in-repository caller or other actionable merge risk was identified. The PR is mergeable subject to normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 8…
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.
Title check Passed The title clearly summarizes the main change: Headline and Container now use start and end alignment values.
Description check Passed The description directly explains the alignment rename, breaking-change behavior, logical CSS updates, documentation changes, and validation performed.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 8 files. (5 skipped: 5 unsupported.)

  • 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 18, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 82e97e0

This branch was successfully deployed

1 active deployment
Preview — 82e97e0c 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