Skip to content

chore: Expose classNames from display-settings#754

Merged
rohanchkrabrty merged 1 commit intoraystack:mainfrom
singh-pk:pk/display-setting-class-expose
Apr 23, 2026
Merged

chore: Expose classNames from display-settings#754
rohanchkrabrty merged 1 commit intoraystack:mainfrom
singh-pk:pk/display-setting-class-expose

Conversation

@singh-pk
Copy link
Copy Markdown
Contributor

@singh-pk singh-pk commented Apr 23, 2026

Description

Expose classNames from display-settings

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes, no bug fixes just code improvements)
  • Chore (changes to the build process or auxiliary tools and libraries such as documentation generation)
  • Style (changes that do not affect the meaning of the code (white-space, formatting, etc))
  • Test (adding missing tests or correcting existing tests)
  • Improvement (Improvements to existing code)
  • Other (please specify)

How Has This Been Tested?

[Describe the tests that you ran to verify your changes]

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (.mdx files)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Screenshots (if appropriate):

[Add screenshots here]

Related Issues

[Link any related issues here using #issue-number]

@singh-pk singh-pk requested a review from rohanchkrabrty April 23, 2026 07:08
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

@singh-pk is attempting to deploy a commit to the Raystack Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@singh-pk has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 53 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 53 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: df4fa895-4c0c-45fb-8052-62772feb72bc

📥 Commits

Reviewing files that changed from the base of the PR and between 134b1e7 and 839d7aa.

📒 Files selected for processing (8)
  • apps/www/src/app/api/search/route.ts
  • apps/www/src/app/layout.tsx
  • apps/www/src/components/docs/docs-body.tsx
  • apps/www/src/components/icon-details/index.ts
  • apps/www/src/components/tag/tag.tsx
  • apps/www/src/components/theme-customiser/index.ts
  • apps/www/src/components/theme-switcher/theme-toggle.tsx
  • apps/www/src/components/theme.tsx
📝 Walkthrough

Walkthrough

The DisplaySettings component in packages/raystack/components/data-table/components/display-settings.tsx now accepts a classNames prop with a content property as a parameter. The component uses a cx utility to combine the existing module class (display-popover-content) with the externally provided classNames.content value when rendering Popover.Content. A cx utility import was added to support this class composition. The function signature was updated accordingly to reflect the new parameter structure.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The pull request description uses only a template with no author-provided detail, but the title and code changes clearly indicate the intent to expose classNames from display-settings. Provide a meaningful description explaining why classNames are being exposed, how they're used, and any relevant context or examples. The template sections should be completed rather than left as placeholders.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: exposing the classNames prop from the DisplaySettings component.
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.


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.

@rohanchkrabrty rohanchkrabrty enabled auto-merge (squash) April 23, 2026 07:10
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 the current code and only fix it if needed.

Inline comments:
In `@packages/raystack/components/data-table/components/display-settings.tsx`:
- Around line 20-22: The DisplaySettings component currently requires a
classNames prop which breaks callers like toolbar.tsx that render
<DisplaySettings /> with no props; make classNames optional by updating the
DisplaySettings signature to accept classNames?: { content?: string } and
provide a safe default (or fallback) when reading classNames.content (e.g., use
classNames?.content or a default string) so existing callers won’t fail
TypeScript checks or throw at runtime; update any internal references in
DisplaySettings to use the optional/fallback value.
🪄 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: 6fd011b2-716a-47e1-929c-ad9c1ecfca2a

📥 Commits

Reviewing files that changed from the base of the PR and between 3cf0c70 and 134b1e7.

📒 Files selected for processing (1)
  • packages/raystack/components/data-table/components/display-settings.tsx

Comment on lines +20 to +22
export function DisplaySettings<TData, TValue>({
classNames
}: { classNames: { content: string } }) {
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.

⚠️ Potential issue | 🔴 Critical

Keep classNames optional to avoid breaking existing callers.

packages/raystack/components/data-table/components/toolbar.tsx:17 still renders <DisplaySettings /> without props. With the new required parameter, this can fail TypeScript checks and classNames['content'] will throw at runtime if omitted.

🐛 Proposed fix
 export function DisplaySettings<TData, TValue>({
   classNames
-}: { classNames: { content: string } }) {
+}: { classNames?: { content?: string } } = {}) {
-        className={cx(styles['display-popover-content'], classNames['content'])}
+        className={cx(styles['display-popover-content'], classNames?.content)}

Also applies to: 86-86

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/raystack/components/data-table/components/display-settings.tsx`
around lines 20 - 22, The DisplaySettings component currently requires a
classNames prop which breaks callers like toolbar.tsx that render
<DisplaySettings /> with no props; make classNames optional by updating the
DisplaySettings signature to accept classNames?: { content?: string } and
provide a safe default (or fallback) when reading classNames.content (e.g., use
classNames?.content or a default string) so existing callers won’t fail
TypeScript checks or throw at runtime; update any internal references in
DisplaySettings to use the optional/fallback value.

Comment thread packages/raystack/components/data-table/components/display-settings.tsx Outdated
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@singh-pk singh-pk force-pushed the pk/display-setting-class-expose branch from 839d7aa to 6358875 Compare April 23, 2026 07:18
@singh-pk singh-pk requested a review from rohanchkrabrty April 23, 2026 07:18
@rohanchkrabrty rohanchkrabrty merged commit 1306a62 into raystack:main Apr 23, 2026
3 of 4 checks passed
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