Closed joshunrau closed 1 week ago
[!CAUTION]
Review failed
The pull request is closed.
The changes in this pull request introduce several new components and functionalities related to chart rendering and configuration within the @douglasneuroinformatics/libui
package. A new Chart
component and its associated components, such as ChartContainer
, ChartLegendContent
, ChartStyle
, and ChartTooltipContent
, are added to enhance chart visualization capabilities. Additionally, updates to the package.json
file reflect a minor dependency version change. The Form
component is also modified to improve state management related to initial values.
File | Change Summary |
---|---|
package.json |
Updated dependency @douglasneuroinformatics/eslint-config from ^5.2.0 to ^5.2.1 . |
src/components/Chart/Chart.stories.tsx |
Added a new Storybook story for the Chart component, including chartData and chartConfig . |
src/components/Chart/Chart.tsx |
Introduced new Chart component that combines various chart functionalities. |
src/components/Chart/ChartContainer.tsx |
Added ChartContainer component for responsive chart rendering. |
src/components/Chart/ChartLegendContent.tsx |
Introduced ChartLegendContent component for displaying chart legends. |
src/components/Chart/ChartStyle.tsx |
Created ChartStyle component for dynamic CSS styling based on configuration. |
src/components/Chart/ChartTooltipContent.tsx |
Added ChartTooltipContent component for rendering tooltips in charts. |
src/components/Chart/index.ts |
Added re-exports for Chart and types modules. |
src/components/Chart/types.ts |
Introduced ChartConfig type for chart configuration. |
src/components/Chart/utils.ts |
Added getPayloadConfigFromPayload function for payload configuration extraction. |
src/components/Form/Form.stories.tsx |
Enhanced WithInitialValue story with dynamic state management for initial values. |
src/components/Form/Form.tsx |
Modified values state initialization and updated it based on initialValues changes. |
src/components/Form/NumberField/NumberFieldInput.tsx |
Updated input handling logic with new state management. |
src/components/index.ts |
Added export for the Chart component. |
src/context/ChartContext.tsx |
Created ChartContext for managing chart configuration. |
src/hooks/index.ts |
Added export for useChart module. |
src/hooks/useChart/index.ts |
Re-exported all entities from useChart . |
src/hooks/useChart/useChart.ts |
Introduced useChart hook for accessing ChartContext . |
sequenceDiagram
participant User
participant ChartContainer
participant Chart
participant ChartContext
User->>ChartContainer: Render Chart
ChartContainer->>ChartContext: Provide Chart Config
ChartContainer->>Chart: Render Chart with Config
Chart->>User: Display Chart
🐰 In the meadow, charts now bloom,
🐇 With legends bright, dispelling gloom.
📊 A container to hold them tight,
🌈 Styles and tooltips, pure delight!
🎉 With each update, we hop and cheer,
🌟 For charts that shine, our vision clear!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
:tada: This PR is included in version 3.6.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Adds chart component and fix issue where change of
initialValues
does not reset form values. This is the desired behaviour, sinceinitialValues
may be set asynchronously via other side effects.Summary by CodeRabbit
New Features
Chart
component with enhanced functionalities.ChartContainer
,ChartLegendContent
,ChartStyle
, andChartTooltipContent
components for improved chart rendering and interaction.useChart
, for easier access to chart context.Enhancements
Form
component to manage initial values dynamically.NumberFieldInput
for better input handling.Bug Fixes