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: [docs, button] generate the button props table from its types - #997
Generate the Button props table from ButtonProps. The docs props.ts re-exports the type, so a wrong name fails the docs build.
Map @raystack/apsara and ~/* to the package source in tsconfig.props.json, so the tables read the current types.
Extend the transform. It hides props that only React, the DOM or another library declares (Base UI props stay) and props tagged @ignore. It uses the Apsara JSDoc when Base UI declares the same prop, adds the @deprecated text to the description, and reads a cva prop's default from defaultVariants.
Show a cva prop's values in the order of its keys, without the null that cva adds. Other props keep null, since it can mean something (Progress value).
Write the Button prop descriptions in button.tsx and the radius description in shared/radius. Button declares nativeButton and focusableWhenDisabled again, since it changes their Base UI defaults.
The change documents Button and radius props, adds two optional Button props, and re-exports ButtonProps from @raystack/apsara in the Button documentation module. The type-table generator now processes declaration and JSDoc information, filters hidden entries, and derives prop types and defaults. The props TypeScript configuration adds path mappings for React and the package.
Sequence Diagram(s)
sequenceDiagram
participant Fumadocs
participant Generator
participant Transform
participant Declarations
Fumadocs->>Generator: generateDocumentation
Generator->>Transform: process prop entries
Transform->>Declarations: resolve declarations and documentation
Transform-->>Generator: return updated entries and hidden-entry state
Generator-->>Fumadocs: return generated documentation without hidden entries
Loading
Possibly related issues
raystack/apsara#990 — The PR updates the type-table transform and re-exports ButtonProps from the package.
raystack/apsara#988 — The type-table transform reads TypeScript declaration nodes and checker types.
Suggested reviewers:rohanchkrabrty
Priority: Low
Merge Risk: Minimal · up to 1c6b6
No confirmed merge-blocking defect remains. Button variant-row visibility remains unverified; confirm the generated table includes variant, size, color, and radius during normal documentation validation.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely identifies the main change: generating the Button props table from its types.
Description check
The description directly explains the changes to Button prop-table generation, type mapping, transform behavior, and related documentation.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 4 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
apps/www/src/lib/type-table.ts-109-111: 1
109-111: Minor · Potential issue · Heavy lift
Unverified finding
We couldn't verify this from the code. It is shown for review, not as a verified issue.
The visibility test assumes every prop symbol has a declaration in an allowed source file. Synthetic or mapped CVA properties may instead have no declarations, or only declarations in class-variance-authority, and be hidden.
One or more Button variant rows disappear from the generated table.
This can occur when: ButtonProps variant, size, color, or radius resolves as a mapped property without a declaration pointing back to the package source.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 56d0063f-1fbf-4e50-a46b-be3c3f7578f0
Commits
Reviewing files that changed from the base of the PR and between 3fe7815 and 1c6b6a7.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
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
ButtonProps. The docsprops.tsre-exports the type, so a wrong name fails the docs build.@raystack/apsaraand~/*to the package source intsconfig.props.json, so the tables read the current types.@ignore. It uses the Apsara JSDoc when Base UI declares the same prop, adds the@deprecatedtext to the description, and reads a cva prop's default fromdefaultVariants.nullthat cva adds. Other props keepnull, since it can mean something (Progressvalue).button.tsxand theradiusdescription inshared/radius. Button declaresnativeButtonandfocusableWhenDisabledagain, since it changes their Base UI defaults.Part of #879