Skip to content

chore: forward props in drawer header#817

Merged
rohanchkrabrty merged 2 commits into
mainfrom
fix-drawer-header
May 22, 2026
Merged

chore: forward props in drawer header#817
rohanchkrabrty merged 2 commits into
mainfrom
fix-drawer-header

Conversation

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

Summary

  • Spread native div props onto Drawer.Header so callers can pass id, role, aria-*, event handlers, etc.
  • Replace the bespoke { children, className } prop type with ComponentProps<'div'> for full HTML compatibility.
  • Drop the now-unused ReactNode import.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

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

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment May 21, 2026 5:55am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 32b52569-3143-4856-b1c0-dd4331ec0556

📥 Commits

Reviewing files that changed from the base of the PR and between 4601485 and 5522dc2.

📒 Files selected for processing (1)
  • packages/raystack/components/spinner/spinner.module.css
💤 Files with no reviewable changes (1)
  • packages/raystack/components/spinner/spinner.module.css

📝 Walkthrough

Walkthrough

The DrawerHeader component in the drawer component library was refactored to align with React's standard component patterns. The component signature changed from accepting explicit children and className props to using ComponentProps<'div'>, enabling broader element attribute forwarding. The implementation now renders a self-closing div that merges the styles.header class with any provided className via the cx utility and spreads remaining props, replacing the previous pattern of rendering children directly.

Suggested reviewers

  • rohilsurana
  • rsbh
  • paanSinghCoder
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: refactoring DrawerHeader to forward props instead of accepting a limited prop shape.
Description check ✅ Passed The description accurately details the changeset: spreading div props, replacing bespoke prop types with ComponentProps<'div'>, and removing unused imports.
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.

.spinner {
display: inline-block;
position: relative;
display: flex;
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.

display: flex; and justify-content: center; are also not required as the .spinner only renders 8 poles that are absolutely positioned. Only css required here is position: relative;. Please confirm once.

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.

It's needed because the the sub items are aligned at center and then transformed against.

@rohanchkrabrty rohanchkrabrty merged commit 9943287 into main May 22, 2026
5 checks passed
@rohanchkrabrty rohanchkrabrty deleted the fix-drawer-header branch May 22, 2026 04:26
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