You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: export the props type of every component - #965
Every props type that a component or part declares can be imported from @raystack/apsara. Root parts use <Component>Props (TabsProps, CheckboxProps), as ChatPanelProps and PromptInputProps already did. Parts keep their names (TabsTabProps, CheckboxGroupProps). RangePickerSlotProps is exported next to DatePickerSlotProps.
Renames: BoxProps to FlexProps, ToolbarProps to DataViewToolbarProps, DisplayControlsProps to DataViewDisplayControlsProps, DisplaySettingsProps to DataTableDisplayControlsProps, VirtualizedContentProps to DataTableVirtualizedContentProps and SidebarNavigationGroupProps to SidebarGroupProps. None of these names could be imported before.
Members that were added at the call site are moved into the types: ref on Command.Content, closeLabel on Drawer.Content, and children on DataTable, DataView and DataView.Toolbar. Each exported type is what its part accepts.
The add-new-component skill checks that a new component's props types are listed in dist/index.d.ts after the build. AGENTS.md says to export them with the component.
Parts that take Base UI, HTML or another component's props unchanged get no alias. Use ComponentProps<typeof Tabs.List> for them.
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
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
Walkthrough
The pull request makes component prop types available from component entry points and the main React package entry point. It also exports several previously local prop declarations and updates selected prop type names, aliases, and signatures. Contributor guidance and getting-started documentation explain how to export and import these types.
Suggested reviewers:rohanchkrabrty
Priority: ➖ Normal
Severity of issue fixed: Medium
Merge Risk:⚪ Minimal · up to 49c36
The new prop type exports are ready to merge after normal checks; the legacy-name changes do not break supported imports.
Pre-merge checks | 4 | 1
❌ Failed checks (1 inconclusive)
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 50 files. (50 skipped…
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Linked Issues check
The PR satisfies the coding requirements in [#877]. It exports prop types from component barrels and from packages/react/index.tsx. The required examples include ButtonProps, CheckboxProps with …
Out of Scope Changes check
The changes stay within the linked issue scope. Component-barrel exports, the package-root exports, prop-type corrections, the export verification guidance, and the documentation explain or enforce co…
Description check
The description clearly explains the changes to export component and part prop types, related type renames, updated prop definitions, documentation, and verification coverage.
Title check
The title concisely and accurately summarizes the main change: exporting props types for all components.
Full details: Docstring Coverage
Explanation
Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 50 files. (50 skipped: 3 unsupported, 47 over the file limit.)
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@raystack/apsara. Root parts use<Component>Props(TabsProps,CheckboxProps), asChatPanelPropsandPromptInputPropsalready did. Parts keep their names (TabsTabProps,CheckboxGroupProps).RangePickerSlotPropsis exported next toDatePickerSlotProps.BoxPropstoFlexProps,ToolbarPropstoDataViewToolbarProps,DisplayControlsPropstoDataViewDisplayControlsProps,DisplaySettingsPropstoDataTableDisplayControlsProps,VirtualizedContentPropstoDataTableVirtualizedContentPropsandSidebarNavigationGroupPropstoSidebarGroupProps. None of these names could be imported before.refonCommand.Content,closeLabelonDrawer.Content, andchildrenonDataTable,DataViewandDataView.Toolbar. Each exported type is what its part accepts.add-new-componentskill checks that a new component's props types are listed indist/index.d.tsafter the build.AGENTS.mdsays to export them with the component.ComponentProps<typeof Tabs.List>for them.Closes #877