Skip to content

feat: indicator classNames and sidebar overflow#800

Merged
rohanchkrabrty merged 4 commits into
mainfrom
feat-indicator-align
May 11, 2026
Merged

feat: indicator classNames and sidebar overflow#800
rohanchkrabrty merged 4 commits into
mainfrom
feat-indicator-align

Conversation

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

Summary

  • Add classNames slot prop to Indicator (currently exposes the indicator slot) so consumers can target the inner badge without relying on the bare className pass-through.
  • Update the Indicator docs (props.ts) to replace the removed className entry with the new classNames slot map.
  • Remove a stray overflow rule from sidebar.module.css to fix layout bleed.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

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

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment May 11, 2026 7:06pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d6dd03a8-7315-4dbf-b2ee-bc278a686f3a

📥 Commits

Reviewing files that changed from the base of the PR and between 0abbd76 and cb4bbf0.

📒 Files selected for processing (1)
  • packages/raystack/components/sidebar/sidebar.module.css

📝 Walkthrough

Walkthrough

This PR changes the Indicator API to replace a flat className?: string with classNames?: { container?: string }, updates the Indicator component to apply classNames?.container to its wrapper while preserving the inner CVA-based className usage, and adjusts sidebar CSS padding and layout rules (.root, .header, .main, .footer).

Suggested reviewers

  • rsbh
  • paanSinghCoder
  • rohilsurana
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding classNames to Indicator and fixing sidebar overflow.
Description check ✅ Passed The description is directly related to the changeset, detailing the specific modifications to Indicator props and sidebar CSS.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/raystack/components/indicator/indicator.tsx (1)

32-43: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve wrapper base styles when className is passed

On line 43, ...props is spread after className={styles.wrapper}. Since className is not explicitly destructured, a consumer-provided className prop is captured in ...props and will override styles.wrapper, dropping required wrapper styles.

Suggested fix
 export const Indicator = ({
   classNames,
+  className,
   variant,
   label,
   children,
   'aria-label': ariaLabel,
   ...props
 }: IndicatorProps) => {
   const accessibilityLabel = ariaLabel || label || `${variant} indicator`;

   return (
-    <div className={styles.wrapper} {...props}>
+    <div {...props} className={[styles.wrapper, className].filter(Boolean).join(' ')}>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/raystack/components/indicator/indicator.tsx` around lines 32 - 43,
The wrapper's base styles get overwritten because consumer `className` is
captured in `...props`; update the Indicator component to explicitly destructure
`className` (and keep existing `classNames`) from props, then merge it with
`styles.wrapper` (e.g., via template string or a utility like clsx) and pass
that merged value into the div's `className`, leaving the rest of `...props`
spread afterward; reference: Indicator component, `styles.wrapper`, `className`,
`classNames`, and `...props`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@packages/raystack/components/indicator/indicator.tsx`:
- Around line 32-43: The wrapper's base styles get overwritten because consumer
`className` is captured in `...props`; update the Indicator component to
explicitly destructure `className` (and keep existing `classNames`) from props,
then merge it with `styles.wrapper` (e.g., via template string or a utility like
clsx) and pass that merged value into the div's `className`, leaving the rest of
`...props` spread afterward; reference: Indicator component, `styles.wrapper`,
`className`, `classNames`, and `...props`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1da9731f-3337-46e8-acff-9a34a59408d6

📥 Commits

Reviewing files that changed from the base of the PR and between 3056907 and fde2a55.

📒 Files selected for processing (3)
  • apps/www/src/content/docs/components/indicator/props.ts
  • packages/raystack/components/indicator/indicator.tsx
  • packages/raystack/components/sidebar/sidebar.module.css
💤 Files with no reviewable changes (1)
  • packages/raystack/components/sidebar/sidebar.module.css

Comment thread apps/www/src/content/docs/components/indicator/props.ts
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/www/src/content/docs/components/indicator/props.ts`:
- Around line 17-24: IndicatorProps currently exposes both legacy className and
the new classNames.container which confuses consumers; decide on a single
source-of-truth (either keep className or keep classNames.container) and update
the IndicatorProps declaration and docs accordingly: remove the redundant
property from the props/interface (or mark it deprecated with a clear note) and
update any JSDoc/comments so only the chosen symbol (IndicatorProps.className or
IndicatorProps.classNames.container) is documented; ensure consumers see one
styling API choice and include a short migration note if deprecating the other.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a3c1a860-3abe-4bea-acb9-7103be9bcdfd

📥 Commits

Reviewing files that changed from the base of the PR and between fde2a55 and 0abbd76.

📒 Files selected for processing (2)
  • apps/www/src/content/docs/components/indicator/props.ts
  • packages/raystack/components/indicator/indicator.tsx

Comment thread apps/www/src/content/docs/components/indicator/props.ts
@rohanchkrabrty rohanchkrabrty merged commit fcfaef0 into main May 11, 2026
4 of 5 checks passed
@rohanchkrabrty rohanchkrabrty deleted the feat-indicator-align branch May 11, 2026 19:07
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