[Omnidoc] Add links and prop sorting, generate Area doc#6762
[Omnidoc] Add links and prop sorting, generate Area doc#6762PavelVanecek merged 7 commits intomainfrom
Conversation
WalkthroughThis PR refactors the API documentation generation system to support inline type metadata. Key changes include updating type handling in Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (4)
www/src/docs/api/index.ts (1)
54-54: Inconsistent file extension in import path.This import explicitly includes the
.tsxextension, while all other imports in this file omit file extensions. Consider removing the extension for consistency:-import { AreaAPI } from './AreaAPI.tsx'; +import { AreaAPI } from './AreaAPI';omnidoc/simplifyType.spec.ts (1)
9-14: Consider removing or updating the outdated comment.The comment on line 11 references "Current buggy behavior" but the test now expects the function to work correctly. This comment may be misleading for future readers.
it('should handle unions with object types containing unions', () => { const input = '"top" | "left" | { x?: number | Percent; y?: number | Percent; }'; - // Current buggy behavior would likely return a mangled string - // Expected behavior: expect(simplifyType(input, true)).toBe(input); });omnidoc/readProject.ts (1)
568-572: Consider more descriptive variable names.The variables
declarations2anddeclaration0could be renamed for clarity:- const declarations2 = aliasSymbol.getDeclarations(); - const declaration0 = declarations2[0]; - if (declarations2.length > 0 && Node.isTypeAliasDeclaration(declaration0)) { - return declaration0.getTypeNode()?.getText() ?? part.getText(); + const aliasDeclarations = aliasSymbol.getDeclarations(); + const firstAliasDeclaration = aliasDeclarations[0]; + if (aliasDeclarations.length > 0 && Node.isTypeAliasDeclaration(firstAliasDeclaration)) { + return firstAliasDeclaration.getTypeNode()?.getText() ?? part.getText(); }omnidoc/generateApiDoc.ts (1)
241-241: Redundant condition in URL check.Since
'https'starts with'http', the second condition is always covered by the first.- const isExternal = url.startsWith('http') || url.startsWith('https'); + const isExternal = url.startsWith('http');
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (32)
eslint.config.mjs(2 hunks)omnidoc/generateApiDoc.ts(9 hunks)omnidoc/readApiDoc.spec.ts(0 hunks)omnidoc/readProject.spec.ts(1 hunks)omnidoc/readProject.ts(2 hunks)omnidoc/simplifyType.spec.ts(1 hunks)src/cartesian/Area.tsx(5 hunks)src/cartesian/Bar.tsx(1 hunks)src/cartesian/ErrorBar.tsx(1 hunks)src/cartesian/Line.tsx(1 hunks)src/cartesian/Scatter.tsx(1 hunks)src/chart/AreaChart.tsx(1 hunks)src/chart/BarChart.tsx(1 hunks)src/chart/ComposedChart.tsx(1 hunks)src/chart/FunnelChart.tsx(1 hunks)src/chart/LineChart.tsx(1 hunks)src/chart/ScatterChart.tsx(1 hunks)src/component/Label.tsx(2 hunks)src/component/LabelList.tsx(2 hunks)src/component/Text.tsx(1 hunks)src/shape/Curve.tsx(2 hunks)src/state/cartesianAxisSlice.ts(1 hunks)src/state/chartDataSlice.ts(1 hunks)src/util/ChartUtils.ts(1 hunks)src/util/types.ts(6 hunks)www/src/docs/api/Area.ts(0 hunks)www/src/docs/api/AreaAPI.tsx(1 hunks)www/src/docs/api/BarStackAPI.tsx(2 hunks)www/src/docs/api/LabelAPI.tsx(5 hunks)www/src/docs/api/TextAPI.tsx(2 hunks)www/src/docs/api/ZIndexLayerAPI.tsx(1 hunks)www/src/docs/api/index.ts(2 hunks)
💤 Files with no reviewable changes (2)
- www/src/docs/api/Area.ts
- omnidoc/readApiDoc.spec.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{ts,tsx}: Never useanytype (implicit or explicit) in TypeScript code
Preferunknownoveranyand refine the type in TypeScript
Type function parameters and return values explicitly in TypeScript, do not rely on implicit any or inference; exceptions are React components and trivial functions
Do not useastype assertions in TypeScript; the only exception isas const
Files:
www/src/docs/api/BarStackAPI.tsxsrc/state/chartDataSlice.tssrc/component/Label.tsxsrc/cartesian/Scatter.tsxsrc/state/cartesianAxisSlice.tssrc/shape/Curve.tsxsrc/chart/BarChart.tsxomnidoc/readProject.tssrc/chart/ComposedChart.tsxsrc/chart/LineChart.tsxsrc/chart/FunnelChart.tsxwww/src/docs/api/AreaAPI.tsxsrc/component/LabelList.tsxomnidoc/simplifyType.spec.tssrc/cartesian/Line.tsxsrc/chart/AreaChart.tsxwww/src/docs/api/TextAPI.tsxsrc/cartesian/Bar.tsxsrc/util/ChartUtils.tssrc/component/Text.tsxwww/src/docs/api/index.tsomnidoc/readProject.spec.tssrc/cartesian/Area.tsxsrc/cartesian/ErrorBar.tsxwww/src/docs/api/LabelAPI.tsxsrc/chart/ScatterChart.tsxsrc/util/types.tswww/src/docs/api/ZIndexLayerAPI.tsxomnidoc/generateApiDoc.ts
**/*.{js,ts,tsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Ensure code lints by running
npm run lintand follows Airbnb's Style Guide
Files:
www/src/docs/api/BarStackAPI.tsxsrc/state/chartDataSlice.tssrc/component/Label.tsxsrc/cartesian/Scatter.tsxsrc/state/cartesianAxisSlice.tssrc/shape/Curve.tsxsrc/chart/BarChart.tsxomnidoc/readProject.tssrc/chart/ComposedChart.tsxsrc/chart/LineChart.tsxsrc/chart/FunnelChart.tsxwww/src/docs/api/AreaAPI.tsxsrc/component/LabelList.tsxomnidoc/simplifyType.spec.tssrc/cartesian/Line.tsxsrc/chart/AreaChart.tsxwww/src/docs/api/TextAPI.tsxsrc/cartesian/Bar.tsxsrc/util/ChartUtils.tssrc/component/Text.tsxwww/src/docs/api/index.tsomnidoc/readProject.spec.tssrc/cartesian/Area.tsxsrc/cartesian/ErrorBar.tsxwww/src/docs/api/LabelAPI.tsxsrc/chart/ScatterChart.tsxsrc/util/types.tswww/src/docs/api/ZIndexLayerAPI.tsxomnidoc/generateApiDoc.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (DEVELOPING.md)
All imports from
rechartsmust use the public API entry point; imports from internal paths likerecharts/types/*orrecharts/src/*are not allowed
Files:
www/src/docs/api/BarStackAPI.tsxsrc/state/chartDataSlice.tssrc/component/Label.tsxsrc/cartesian/Scatter.tsxsrc/state/cartesianAxisSlice.tssrc/shape/Curve.tsxsrc/chart/BarChart.tsxomnidoc/readProject.tssrc/chart/ComposedChart.tsxsrc/chart/LineChart.tsxsrc/chart/FunnelChart.tsxwww/src/docs/api/AreaAPI.tsxsrc/component/LabelList.tsxomnidoc/simplifyType.spec.tssrc/cartesian/Line.tsxsrc/chart/AreaChart.tsxwww/src/docs/api/TextAPI.tsxsrc/cartesian/Bar.tsxsrc/util/ChartUtils.tssrc/component/Text.tsxwww/src/docs/api/index.tsomnidoc/readProject.spec.tssrc/cartesian/Area.tsxsrc/cartesian/ErrorBar.tsxwww/src/docs/api/LabelAPI.tsxsrc/chart/ScatterChart.tsxsrc/util/types.tswww/src/docs/api/ZIndexLayerAPI.tsxomnidoc/generateApiDoc.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not hardcode any strings or formatting choices in library code; users should provide localized strings as desired
Files:
src/state/chartDataSlice.tssrc/component/Label.tsxsrc/cartesian/Scatter.tsxsrc/state/cartesianAxisSlice.tssrc/shape/Curve.tsxsrc/chart/BarChart.tsxsrc/chart/ComposedChart.tsxsrc/chart/LineChart.tsxsrc/chart/FunnelChart.tsxsrc/component/LabelList.tsxsrc/cartesian/Line.tsxsrc/chart/AreaChart.tsxsrc/cartesian/Bar.tsxsrc/util/ChartUtils.tssrc/component/Text.tsxsrc/cartesian/Area.tsxsrc/cartesian/ErrorBar.tsxsrc/chart/ScatterChart.tsxsrc/util/types.ts
**/*.spec.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
When running unit tests, prefer to run a single test file using
npm run test -- path/to/TestFile.spec.tsxrather than running all tests withnpm test
Files:
omnidoc/simplifyType.spec.tsomnidoc/readProject.spec.ts
🧠 Learnings (7)
📚 Learning: 2025-11-23T13:30:10.395Z
Learnt from: PavelVanecek
Repo: recharts/recharts PR: 6669
File: www/src/docs/exampleComponents/ScatterChart/ScatterChartWithLabels.tsx:2-2
Timestamp: 2025-11-23T13:30:10.395Z
Learning: The `TooltipIndex` type from recharts is defined in `src/state/tooltipSlice.ts` but is not currently exported from the public API entry points. It should not be imported from `recharts/types/state/tooltipSlice` as this is an internal implementation path. An ESLint rule is needed to prevent regressions.
Applied to files:
src/state/chartDataSlice.tssrc/state/cartesianAxisSlice.tssrc/util/ChartUtils.tssrc/chart/ScatterChart.tsx
📚 Learning: 2025-12-08T08:23:26.219Z
Learnt from: PavelVanecek
Repo: recharts/recharts PR: 6750
File: src/state/selectors/axisSelectors.ts:593-602
Timestamp: 2025-12-08T08:23:26.219Z
Learning: In the recharts codebase, `DataKey<any>` is an intentional exception to the "no any" rule while proper typing is being developed. This should not be flagged in reviews.
Applied to files:
src/state/chartDataSlice.tssrc/util/types.ts
📚 Learning: 2025-11-19T14:08:01.728Z
Learnt from: PavelVanecek
Repo: recharts/recharts PR: 6659
File: www/src/components/GuideView/Performance/index.tsx:232-250
Timestamp: 2025-11-19T14:08:01.728Z
Learning: In Recharts version 3.4.2, object-as-prop optimizations were introduced to reduce unnecessary re-renders when new object references are passed as props. This affects the recommendation for the `react-perf/jsx-no-new-object-as-prop` ESLint rule.
Applied to files:
src/chart/BarChart.tsx
📚 Learning: 2025-11-25T01:22:59.729Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.729Z
Learning: Applies to **/*.{ts,tsx} : Type function parameters and return values explicitly in TypeScript, do not rely on implicit any or inference; exceptions are React components and trivial functions
Applied to files:
omnidoc/readProject.ts
📚 Learning: 2025-12-06T03:36:59.377Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: DEVELOPING.md:0-0
Timestamp: 2025-12-06T03:36:59.377Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : All imports from `recharts` must use the public API entry point; imports from internal paths like `recharts/types/*` or `recharts/src/*` are not allowed
Applied to files:
src/chart/LineChart.tsxwww/src/docs/api/index.tssrc/chart/ScatterChart.tsx
📚 Learning: 2025-11-25T01:23:08.250Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: test/README.md:0-0
Timestamp: 2025-11-25T01:23:08.250Z
Learning: Applies to test/**/*.{test,spec}.{ts,tsx} : Prefer to use the `createSelectorTestCase` helper function when writing or modifying tests
Applied to files:
omnidoc/simplifyType.spec.ts
📚 Learning: 2025-11-25T01:22:59.729Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.729Z
Learning: Applies to storybook/stories/**/*.stories.tsx : Update Storybook stories when APIs have been changed to ensure they work as expected
Applied to files:
omnidoc/generateApiDoc.ts
🧬 Code graph analysis (4)
www/src/docs/api/AreaAPI.tsx (1)
www/src/docs/api/types.ts (1)
ApiDoc(21-27)
omnidoc/simplifyType.spec.ts (1)
omnidoc/generateApiDoc.ts (1)
simplifyType(76-141)
src/cartesian/Area.tsx (1)
src/util/ChartUtils.ts (1)
StackId(480-480)
omnidoc/generateApiDoc.ts (2)
omnidoc/readProject.ts (1)
getAllTagTexts(42-53)www/src/docs/api/types.ts (1)
PropExample(4-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build, Test, Pack
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (40)
src/component/LabelList.tsx (2)
128-131: Documentation annotations align with PR objectives.The
@inlineJSDoc annotation on the publicImplicitLabelListTypeexport enables the type to be displayed inline in generated documentation and supports type reuse in TypeScript, as intended by the PR.
151-153: Context consumption is accurately documented.The
@consumes LabelListContextannotation correctly documents that theLabelListfunction consumes context via theuseCartesianLabelListContext()andusePolarLabelListContext()calls (lines 156–157). This supports the omnidoc generation enhancements described in the PR.src/state/chartDataSlice.ts (1)
11-12: LGTM! The@inlineJSDoc annotation aligns with the PR's omnidoc enhancements. All types are properly defined usingunknownrather thanany, and all function parameters and return values are explicitly typed as per coding guidelines.src/chart/ComposedChart.tsx (1)
9-12: JSDoc context annotation looks correctComposedChart is just a thin wrapper around CartesianChart, so documenting that it provides
CartesianChartContextis accurate and keeps API docs aligned with other cartesian chart components.src/cartesian/Line.tsx (1)
869-873: Line’s provides/consumes metadata matches implementation
Linewraps its render tree inLineLabelListProviderand uses cartesian chart layout/plot-area hooks, so documenting it as providingLabelListContextand consumingCartesianChartContextmatches the actual behavior.src/chart/AreaChart.tsx (1)
9-12: Accurate @provides tag for AreaChartAreaChart delegates to
CartesianChart, which owns the cartesian context, so marking AreaChart as providingCartesianChartContextis a correct and useful doc annotation.src/component/Text.tsx (1)
58-75: Good use of@inlineon shared Text helper typesAnnotating
TextAnchor,TextVerticalAnchor, andRenderableTextwith@inlineis consistent with how these unions are used and should improve the generated API docs without affecting runtime behavior.eslint.config.mjs (1)
430-437: Reasonable ESLint override for generated API docsScoping
generatedApiDocsOverridestowww/src/docs/api/**and disabling onlyno-template-curly-in-stringis a minimal, well-targeted relaxation for autogenerated files, and its placement in the export array ensures it takes effect after the general website rules.Also applies to: 465-465
src/cartesian/ErrorBar.tsx (1)
281-285: Correctly documenting ErrorBar as consuming ErrorBarContextSince
ErrorBarInternal/ErrorBarImplrely onuseErrorBarContext, marking the publicErrorBarcomponent as@consumes ErrorBarContextcorrectly reflects its dependency in the generated docs.src/cartesian/Bar.tsx (1)
1075-1081: Bar’s context provides/consumes tags align with implementationBar sets up
SetErrorBarContext, usesBarLabelListProvider(backed byCartesianLabelListContextProvider), and already depends on cartesian layout and bar stack hooks, so the new@provides ErrorBarContext/@provides LabelListContextannotations complement the existing@consumestags accurately.src/chart/LineChart.tsx (1)
9-12: LineChart context JSDoc matches behaviorLineChart simply delegates to
CartesianChart, so adding@provides CartesianChartContextcorrectly advertises that it provides the cartesian chart context for consumers.www/src/docs/api/BarStackAPI.tsx (1)
9-9: LGTM: Type definitions made explicit.The prop types are now explicit inline unions rather than type references, improving documentation clarity and aligning with the PR's inline type metadata goals.
Also applies to: 40-40
src/chart/BarChart.tsx (1)
11-11: LGTM: Context provider documented.The
@providesannotation adds valuable metadata about the context this component provides, improving API documentation without affecting runtime behavior.src/shape/Curve.tsx (1)
60-79: LGTM: Enhanced type documentation.The
@inlineannotation enables better documentation generation by expanding the CurveType union inline, and the added@linkand@seetags provide helpful references to d3-shape documentation and examples.Also applies to: 109-110
www/src/docs/api/TextAPI.tsx (1)
171-171: LGTM: Type definitions made explicit.The prop types are now explicit string literal unions rather than type references, improving documentation clarity and consistency with the PR's inline type metadata approach.
Also applies to: 193-193
src/util/types.ts (1)
60-65: LGTM: Inline annotations added for documentation generation.The
@inlineannotations enable the omnidoc system to expand these types inline in generated documentation, improving API documentation readability. The expanded LegendType union with 'line', 'plainline', and 'rect' is an additive, backward-compatible change.Also applies to: 73-76, 78-92, 635-640, 890-893, 1024-1051, 1070-1100
src/util/ChartUtils.ts (1)
476-480: LGTM: New public type alias improves API clarity.The exported
StackIdtype makes the stack identifier type explicit and reusable, improving API documentation and type consistency across the codebase.src/state/cartesianAxisSlice.ts (1)
8-11: LGTM: Inline annotation added for documentation.The
@inlineannotation enables better documentation generation for the AxisId type, consistent with the broader pattern across the codebase.src/chart/ScatterChart.tsx (1)
11-11: LGTM: Context provider documented.The
@providesannotation adds valuable metadata about the context this component provides, improving API documentation without affecting runtime behavior.www/src/docs/api/index.ts (1)
69-69: LGTM!The Area entry correctly references the new AreaAPI documentation module, consistent with the PR's objective to generate Area component documentation.
src/cartesian/Scatter.tsx (1)
814-818: LGTM!The JSDoc annotations correctly document the context relationships for the Scatter component, aligning with similar annotations added to other chart components in this PR.
src/chart/FunnelChart.tsx (1)
9-12: LGTM!The JSDoc annotation correctly documents that FunnelChart provides CartesianChartContext, consistent with the broader PR effort to document context relationships across chart components.
omnidoc/simplifyType.spec.ts (1)
1-19: LGTM on test coverage!Good test coverage for the
simplifyTypefunction, including edge cases for simple unions, complex object types with unions, and nested structures with theisInlineparameter.omnidoc/readProject.spec.ts (1)
925-946: LGTM!The updated tests correctly validate the new structured return type from
getTypeOf()and the inline type expansion feature. Good use of partial matchers for the complex union type assertions.www/src/docs/api/ZIndexLayerAPI.tsx (1)
5-39: LGTM!The prop reordering prioritizes the required
zIndexprop over the optionalchildrenprop, which improves the API documentation structure. The descriptions clearly explain the z-index layering semantics and portal behavior.src/component/Label.tsx (2)
33-36: LGTM!The
@inlineannotation and export ofLabelContentTypeenable the omnidoc system to generate expanded inline type documentation, improving the public API surface.
67-75: LGTM!Good addition of
LabelPositionandLabelFormattertype exports with@inlineannotations. These provide clearer type documentation for consumers of the Label component API.omnidoc/readProject.ts (1)
515-585: Well-structured type metadata implementation.The enhanced
getTypeOfmethod now returns structured type information that enables better documentation generation. The multiple fallback strategies for resolving alias symbols (lines 536-547) improve robustness.src/cartesian/Area.tsx (5)
75-78: LGTM!The
@inlineJSDoc tag and exportedBaseValuetype are clean additions for documentation generation purposes. The type definition is concise and correctly captures the valid baseline values.
226-226: Good refactor: Using importedStackIdtype.Using the shared
StackIdtype fromsrc/util/ChartUtils.tsimproves consistency across the codebase. This aligns the public prop type with the internal type definition.
241-243: LGTM!The JSDoc enrichment with
@linkand@seetags provides valuable documentation for users. The external link to d3-shape curves and the internal example reference are appropriate.
270-273: LGTM!Expanding the
Omitto exclude additional internal props ('path','pathRef','baseLine','dangerouslySetInnerHTML') appropriately narrows the public API surface by hiding implementation details from consumers.
1079-1083: LGTM!The
@providesand@consumesJSDoc annotations document the context relationships, which is valuable for understanding component hierarchy and for the automated API doc generation.www/src/docs/api/AreaAPI.tsx (1)
1-602: Overall: Comprehensive API documentation.The documentation covers the Area component's props thoroughly with appropriate descriptions, defaults, and examples. The event handlers are extensive but correctly inherited from the SVG props.
www/src/docs/api/LabelAPI.tsx (1)
99-132: LGTM!The expanded type definitions for
parentViewBox,position,value, andviewBoxprovide more informative API documentation. Using concrete union types likeRequired<CartesianViewBox> | Required<PolarViewBox>and the detailed position literal union helps users understand the expected values.omnidoc/generateApiDoc.ts (5)
38-71: LGTM!The
splitTypeStringfunction correctly handles nested structures by tracking bracket depth. This is essential for parsing complex union types without splitting inside generic parameters or object types.
76-141: LGTM!The enhanced
simplifyTypefunction with theisInlineflag allows preserving complex types when the source explicitly marks them for inline documentation. The recursive handling of union parts and the simplification heuristics are reasonable.
198-253: Well-structured link extraction helper.The
getLinksFromPropfunction handles various JSDoc tag formats (@see,@link,{@link ...}) and correctly parses URL/name pairs with deduplication. The prefix stripping forrecharts.github.ioURLs is a nice touch for cleaner internal links.
317-352: Good prop sorting implementation.The sorting prioritizes: required props → recharts props → recharts events → other props → other events, with alphabetical ordering within each category. This provides a logical structure for API documentation.
271-272: LGTM!Using the structured
typeInfoobject withisInlineflag enables the documentation generator to respect the@inlineJSDoc annotations and preserve complex types when appropriate.
| }, | ||
| { | ||
| name: 'activeDot', | ||
| type: 'false | true | Function | React.JSXElementConstructor<any>>', |
There was a problem hiding this comment.
Syntax error: Unbalanced angle bracket in type.
The type string has an extra closing angle bracket.
- type: 'false | true | Function | React.JSXElementConstructor<any>>',
+ type: 'false | true | Function | React.JSXElementConstructor<any>',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| type: 'false | true | Function | React.JSXElementConstructor<any>>', | |
| type: 'false | true | Function | React.JSXElementConstructor<any>', |
🤖 Prompt for AI Agents
In www/src/docs/api/AreaAPI.tsx around line 31, the type string has an unmatched
closing angle bracket ("type: 'false | true | Function |
React.JSXElementConstructor<any>>',"); remove the extra ">" so the generic is
balanced (React.JSXElementConstructor<any>) and update the string accordingly;
ensure the resulting string is "false | true | Function |
React.JSXElementConstructor<any>" (with proper quotes) or convert to a real
TypeScript type instead of a malformed string if appropriate.
| { name: 'data', type: 'Array<unknown>', isOptional: true }, | ||
| { | ||
| name: 'dot', | ||
| type: 'false | true | Function | React.JSXElementConstructor<any>>', |
There was a problem hiding this comment.
Same typo: Unbalanced angle bracket.
Same issue as with activeDot prop type.
- type: 'false | true | Function | React.JSXElementConstructor<any>>',
+ type: 'false | true | Function | React.JSXElementConstructor<any>',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| type: 'false | true | Function | React.JSXElementConstructor<any>>', | |
| type: 'false | true | Function | React.JSXElementConstructor<any>', |
🤖 Prompt for AI Agents
In www/src/docs/api/AreaAPI.tsx around line 122, the prop type string has an
unbalanced angle bracket ("React.JSXElementConstructor<any>>"); remove the
extraneous closing ">" so it reads "React.JSXElementConstructor<any>" (i.e., fix
the typo by balancing the generic angle brackets) and verify the surrounding
quote and punctuation remain correct.
| { name: 'isRange', type: 'boolean', isOptional: true }, | ||
| { | ||
| name: 'label', | ||
| type: 'false | true | ReactNode | Function | React.JSXElementConstructor<any>> | Props', |
There was a problem hiding this comment.
Unbalanced angle bracket in label type.
The type string has unbalanced brackets.
- type: 'false | true | ReactNode | Function | React.JSXElementConstructor<any>> | Props',
+ type: 'false | true | ReactNode | Function | React.JSXElementConstructor<any> | Props',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| type: 'false | true | ReactNode | Function | React.JSXElementConstructor<any>> | Props', | |
| type: 'false | true | ReactNode | Function | React.JSXElementConstructor<any> | Props', |
🤖 Prompt for AI Agents
In www/src/docs/api/AreaAPI.tsx around line 174, the type string for `label`
contains an extra/unbalanced angle bracket; remove the stray '>' (or otherwise
balance the generic angle brackets) and ensure the union parts are separated
correctly so the entire type string has matching '<' and '>' for any
React.JSXElementConstructor generic and no dangling bracket at the end.
| { name: 'onWheel', type: 'WheelEventHandler<P, T>', isOptional: true }, | ||
| { name: 'onWheelCapture', type: 'WheelEventHandler<P, T>', isOptional: true }, | ||
| ], | ||
| parentComponents: ['AreaChart', 'BarChart', 'ComposedChart', 'FunnelChart', 'LineChart', 'ScatterChart'], |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n src/cartesian/Area.tsx | sed -n '850,870p'Repository: recharts/recharts
Length of output: 872
Correct parentComponents list to match implementation.
The Area component explicitly returns null if chartName is not 'AreaChart' or 'ComposedChart' (lines 859-862 in src/cartesian/Area.tsx). The list should only include 'AreaChart' and 'ComposedChart'; remove BarChart, FunnelChart, LineChart, and ScatterChart.
🤖 Prompt for AI Agents
In www/src/docs/api/AreaAPI.tsx around line 600, the parentComponents array is
incorrect — it currently includes BarChart, FunnelChart, LineChart, and
ScatterChart but the Area component only returns content for 'AreaChart' and
'ComposedChart'; update the parentComponents list to contain only 'AreaChart'
and 'ComposedChart' so the docs match the component implementation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6762 +/- ##
==========================================
+ Coverage 93.70% 93.74% +0.04%
==========================================
Files 515 515
Lines 43011 43336 +325
Branches 5018 5018
==========================================
+ Hits 40302 40627 +325
Misses 2703 2703
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Staging Deployment Details
These deployments will remain available for 30 days. To update snapshots: Comment |
| { name: 'onSeeked', type: 'ReactEventHandler<P, T>', isOptional: true }, | ||
| { name: 'onSeekedCapture', type: 'ReactEventHandler<P, T>', isOptional: true }, | ||
| { name: 'onSeeking', type: 'ReactEventHandler<P, T>', isOptional: true }, | ||
| { name: 'onSeekingCapture', type: 'ReactEventHandler<P, T>', isOptional: true }, |
There was a problem hiding this comment.
do we want all these events in here?
There was a problem hiding this comment.
Not entirely necessary but also why not. They're sorted at the bottom, and not hiding anything interesting below.
Description
New features in omnidoc:
And autogenerated Area doc
Related Issue
#6069
Summary by CodeRabbit
Release Notes
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.