Skip to content

refactor: reorganize Storybook into Kits, Patterns, and Experimental sections#3824

Open
eliseo-juan wants to merge 8 commits intomainfrom
refactor/storybook-reorganize-kits-patterns-experimental
Open

refactor: reorganize Storybook into Kits, Patterns, and Experimental sections#3824
eliseo-juan wants to merge 8 commits intomainfrom
refactor/storybook-reorganize-kits-patterns-experimental

Conversation

@eliseo-juan
Copy link
Copy Markdown
Contributor

Description

Reorganizes the Storybook navigation structure into four distinct top-level sections, making it easier to discover and consume F0 components by their intended usage context.

New sections:

  • Kits — all chart components (Charts, F0DataChart, WidgetCharts), with canonical code moved to src/kits/
  • Patterns — higher-level UI patterns: OneDataCollection, Navigation folder, and OneDateNavigator
  • Experimental — retains all existing experimental components (was previously mixed with Components)
  • Components — stable, reusable F0 components (unchanged)

Screenshots (if applicable)

[Link to Figma Design](Figma URL here)

Implementation details

src/kits/ — new canonical location for chart code:

  • src/kits/Charts/ — copied from src/components/Charts/ + ProgressBarDuo + RadarChart
  • src/kits/F0DataChart/ — copied from src/components/F0DataChart/
  • src/kits/WidgetCharts/ — copied from src/experimental/Widgets/Charts/ + RadialProgressWidget
  • All stories moved into __stories__/ subfolders within each component directory
  • src/kits.ts entry point added; vite.config.ts kits build entry added

Backward compatibility:

  • Original export locations (src/components/Charts/exports.ts, src/components/F0DataChart/index.ts, etc.) kept as @deprecated re-exports pointing to src/kits/

Story titles updated:

  • ~35 chart stories → Kits/...
  • ~12 Navigation stories → Patterns/Navigation/...
  • ~20 OneDataCollection stories → Patterns/Data Collection/...
  • OneDateNavigator → Patterns/DateNavigator

Config changes:

  • .storybook/main.ts — replaced 5 chart-specific titlePrefix: "" entries with single { directory: "../src/kits", titlePrefix: "" }
  • .storybook/preview.tsx — added components, experimental, patterns, kits to storySort topLevelOrder; fixed pre-existing display-name lint error in withTheme
  • .oxlintrc.json — added **/kits.ts to barrel-import exemption

@eliseo-juan eliseo-juan requested a review from a team as a code owner April 1, 2026 10:35
Copilot AI review requested due to automatic review settings April 1, 2026 10:35
@github-actions github-actions bot added refactor react Changes affect packages/react labels Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-3824 to install the package

Use pnpm i github:factorialco/f0#15227481dbab3783e947df0de5c5e95bfea705d4 to install this specific commit

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🔍 Visual review for your branch is published 🔍

Here are the links to:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 44.86% 12624 / 28137
🔵 Statements 44.22% 13035 / 29477
🔵 Functions 37.48% 2944 / 7854
🔵 Branches 35.52% 8253 / 23231
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/kits.ts 100% 100% 100% 100%
packages/react/src/patterns.ts 100% 100% 100% 100%
packages/react/src/components/Charts/exports.ts 100% 100% 100% 100%
packages/react/src/components/F0DataChart/index.ts 100% 100% 100% 100%
packages/react/src/experimental/Charts/exports.ts 100% 100% 100% 100%
packages/react/src/experimental/Navigation/exports.tsx 100% 100% 100% 100%
packages/react/src/experimental/OneDataCollection/exports.ts 100% 100% 100% 100%
packages/react/src/experimental/OneDateNavigator/index.ts 100% 100% 100% 100%
packages/react/src/experimental/Widgets/Charts/exports.tsx 100% 100% 100% 100%
packages/react/src/experimental/Widgets/Content/ProgressBarDuo/index.tsx 100% 100% 100% 100%
packages/react/src/kits/exports.ts 100% 100% 100% 100%
packages/react/src/kits/Charts/exports.ts 0% 100% 100% 0% 16-52
packages/react/src/kits/Charts/AreaChart/index.tsx 0% 0% 0% 0% 56-265
packages/react/src/kits/Charts/BarChart/index.tsx 0% 0% 0% 0% 54-236
packages/react/src/kits/Charts/CategoryBarChart/index.tsx 0% 0% 0% 0% 23-119
packages/react/src/kits/Charts/ComboChart/index.tsx 0% 0% 0% 0% 34-392
packages/react/src/kits/Charts/F0Chart/F0Chart.tsx 0% 0% 0% 0% 8-90
packages/react/src/kits/Charts/F0Chart/index.ts 0% 100% 100% 0% 8-11
packages/react/src/kits/Charts/F0Chart/__stories__/decorators.tsx 0% 100% 0% 0% 3-8
packages/react/src/kits/Charts/F0Chart/themes/f0.light.ts 0% 0% 0% 0% 7-278
packages/react/src/kits/Charts/LineChart/index.tsx 0% 0% 0% 0% 34-105
packages/react/src/kits/Charts/PieChart/index.tsx 0% 0% 0% 0% 30-136
packages/react/src/kits/Charts/ProgressBarDuo/index.tsx 0% 0% 0% 0% 10-32
packages/react/src/kits/Charts/ProgressChart/index.tsx 0% 0% 0% 0% 17-47
packages/react/src/kits/Charts/RadarChart/index.tsx 0% 0% 0% 0% 31-100
packages/react/src/kits/Charts/RadialProgressChart/index.tsx 0% 0% 0% 0% 16-60
packages/react/src/kits/Charts/VerticalBarChart/index.tsx 0% 0% 0% 0% 31-228
packages/react/src/kits/Charts/utils/bar.ts 0% 100% 0% 0% 4
packages/react/src/kits/Charts/utils/colors.tsx 0% 0% 0% 0% 1-19
packages/react/src/kits/Charts/utils/elements.tsx 0% 0% 0% 0% 10-55
packages/react/src/kits/Charts/utils/forwardRef.ts 0% 100% 0% 0% 6
packages/react/src/kits/Charts/utils/muncher.ts 0% 100% 0% 0% 4
packages/react/src/kits/Charts/utils/types.ts 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/F0DataChart.tsx 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/index.ts 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/skeletons.tsx 3.65% 0% 0% 3.65% 27-234, 284-331, 375-831
packages/react/src/kits/F0DataChart/types.ts 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/__stories__/decorators.tsx 0% 100% 0% 0% 3-12
packages/react/src/kits/F0DataChart/components/BarChart/BarChart.tsx 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/components/BarChart/useBarChartOptions.ts 50.66% 28.04% 70% 50% 30, 83-90, 131-192, 243, 251-282, 296, 304-308
packages/react/src/kits/F0DataChart/components/FunnelChart/FunnelChart.tsx 85% 64.7% 80% 94.11% 21, 23
packages/react/src/kits/F0DataChart/components/FunnelChart/useFunnelChartOptions.ts 63.46% 39.28% 75% 61.22% 48, 125, 134-161, 187
packages/react/src/kits/F0DataChart/components/GaugeChart/GaugeChart.tsx 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/components/GaugeChart/useGaugeChartOptions.ts 53.33% 47.36% 50% 53.33% 79, 108-118, 124
packages/react/src/kits/F0DataChart/components/HeatmapChart/HeatmapChart.tsx 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/components/HeatmapChart/useHeatmapChartOptions.ts 61.53% 41.17% 50% 60% 97-162, 168
packages/react/src/kits/F0DataChart/components/LineChart/LineChart.tsx 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/components/LineChart/useLineChartOptions.ts 90% 72.72% 100% 89.47% 42-44
packages/react/src/kits/F0DataChart/components/PieChart/PieChart.tsx 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/components/PieChart/usePieChartOptions.ts 58.06% 28.94% 71.42% 57.14% 54, 67-75, 132-143, 150
packages/react/src/kits/F0DataChart/components/RadarChart/RadarChart.tsx 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/components/RadarChart/useRadarChartOptions.ts 62.96% 42.42% 66.66% 60% 57, 138-154, 161
packages/react/src/kits/F0DataChart/utils/colors.ts 92.3% 78.57% 100% 92.3% 91, 98
packages/react/src/kits/F0DataChart/utils/formatters.ts 100% 100% 100% 100%
packages/react/src/kits/F0DataChart/utils/options.ts 61.7% 44.44% 60% 61.9% 82, 131, 285-332, 536
packages/react/src/kits/F0DataChart/utils/theme.ts 90% 54.54% 100% 100% 122
packages/react/src/kits/F0DataChart/utils/useAxisLabelTooltip.ts 21.62% 16.66% 22.22% 20.58% 21, 28-96, 102-112
packages/react/src/kits/F0DataChart/utils/useChartTheme.ts 90.47% 50% 83.33% 94.44% 43, 51
packages/react/src/kits/F0DataChart/utils/useContainerSize.ts 76.92% 50% 75% 81.81% 19, 24-28
packages/react/src/kits/F0DataChart/utils/useEChartsInstance.ts 93.33% 50% 80% 93.33% 28
packages/react/src/kits/F0DataChart/utils/useLegendInteraction.ts 13.63% 16.66% 40% 11.9% 32-100
packages/react/src/kits/WidgetCharts/ChartContainer.tsx 0% 0% 0% 0% 12-22
packages/react/src/kits/WidgetCharts/exports.tsx 0% 100% 100% 0% 10-64
packages/react/src/kits/WidgetCharts/storybook-utils.tsx 0% 100% 0% 0% 7-12
packages/react/src/kits/WidgetCharts/AreaChartWidget/index.tsx 0% 0% 0% 0% 13-48
packages/react/src/kits/WidgetCharts/BarChartWidget/index.tsx 0% 100% 0% 0% 9-28
packages/react/src/kits/WidgetCharts/LineChartWidget/index.tsx 0% 100% 0% 0% 9-30
packages/react/src/kits/WidgetCharts/PieChartWidget/index.tsx 0% 100% 0% 0% 9-30
packages/react/src/kits/WidgetCharts/RadialProgressWidget/index.tsx 0% 100% 0% 0% 22-43
packages/react/src/kits/WidgetCharts/SummariesWidget/index.tsx 0% 100% 0% 0% 8-23
packages/react/src/kits/WidgetCharts/VerticalBarChartWidget/index.tsx 0% 100% 0% 0% 12-33
packages/react/src/lib/storybook-utils/pageDecorator.tsx 0% 100% 0% 0% 4-16
packages/react/src/patterns/exports.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/OneDatacollection.tsx 68.93% 41.91% 70.27% 68.46% 230-234, 331-347, 356-364, 379-382, 399, 424-433, 440-446, 464-470, 502-505, 651, 658, 732-832
packages/react/src/patterns/DataCollection/actions.tsx 42.85% 9.09% 30% 44.44% 31-34, 68, 74, 80-94, 121-126, 138-141
packages/react/src/patterns/DataCollection/exports.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/item-actions.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/property-render.ts 100% 50% 100% 100%
packages/react/src/patterns/DataCollection/summary.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/useEventEmitter.ts 30.55% 11.53% 28.57% 36.66% 22-26, 46-66, 81-86, 93-113
packages/react/src/patterns/DataCollection/visualizations.tsx 0% 0% 0% 0% 132-314
packages/react/src/patterns/DataCollection/Settings/Settings.tsx 76.66% 57.69% 45.45% 79.31% 101-102, 108, 138, 158-159, 166
packages/react/src/patterns/DataCollection/Settings/SettingsProvider.tsx 71.42% 33.33% 37.5% 78.94% 65-67, 89-101
packages/react/src/patterns/DataCollection/Settings/VisualizationSettingsRenderer.tsx 55.55% 31.25% 60% 55.55% 28, 47, 72-74, 120, 134, 171-183
packages/react/src/patterns/DataCollection/Settings/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/Settings/components/GroupingSelector.tsx 18.18% 0% 0% 18.18% 33-103
packages/react/src/patterns/DataCollection/Settings/components/SortingSelector.tsx 11.76% 0% 0% 11.76% 24-87
packages/react/src/patterns/DataCollection/Settings/components/VisualizationSelector.tsx 7.14% 0% 0% 7.14% 58-104
packages/react/src/patterns/DataCollection/__stories__/mockData.tsx 0% 0% 0% 0% 80-2065
packages/react/src/patterns/DataCollection/components/ActionBar/index.tsx 8.57% 0% 0% 9.37% 36, 45-59, 112-116, 131-291
packages/react/src/patterns/DataCollection/components/CollectionActions/CollectionActions.tsx 63.63% 85.71% 54.54% 63.63% 37-43, 76, 99-116
packages/react/src/patterns/DataCollection/components/CollectionActions/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/NavigationFilters/NavigationFilters.tsx 20% 0% 0% 20% 26-40
packages/react/src/patterns/DataCollection/components/NavigationFilters/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/PagesPagination/PagesPagination.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/PagesPagination/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/Search/Search.tsx 50% 34.37% 50% 51.28% 41-44, 49, 63-65, 69-71, 128-189
packages/react/src/patterns/DataCollection/components/Search/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/TotalItemsSummary/TotalItemsSummary.tsx 50% 0% 0% 50% 14-21
packages/react/src/patterns/DataCollection/components/TotalItemsSummary/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/itemActions/ItemActionsRowContainer.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/itemActions/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/itemActions/useItemActions.ts 90.9% 90% 75% 90.9% 130-131
packages/react/src/patterns/DataCollection/components/itemActions/ItemActionsDropdown/ItemActionsDropdown.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/itemActions/ItemActionsDropdown/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/itemActions/ItemActionsMobile/ItemActionsMobile.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/itemActions/ItemActionsMobile/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/itemActions/ItemActionsRow/ItemActionsRow.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/components/itemActions/ItemActionsRow/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useEmptyState.ts 81.25% 26.31% 100% 81.25% 79, 91-99
packages/react/src/patterns/DataCollection/hooks/useExportAction.ts 0% 0% 0% 0% 27-314
packages/react/src/patterns/DataCollection/hooks/useInfiniteScrollPagination.ts 80% 45.45% 75% 85.71% 23, 27-28
packages/react/src/patterns/DataCollection/hooks/usePerVisualizationFilters.ts 97.87% 95% 93.75% 97.59% 163-164
packages/react/src/patterns/DataCollection/hooks/useDataColectionStorage/getFeatures.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useDataColectionStorage/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useDataColectionStorage/useDataCollectionStorage.ts 55.26% 35% 66.66% 55.26% 59-63, 85-105, 138-153
packages/react/src/patterns/DataCollection/hooks/useDataColectionStorage/validateStorageKey.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useDataCollectionData/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useDataCollectionData/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useDataCollectionData/useDataCollectionData.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useDataCollectionData/useDataCollectionLanesData.tsx 97.36% 71.42% 100% 97.14% 160
packages/react/src/patterns/DataCollection/hooks/useDataCollectionData/utils.ts 33.33% 0% 50% 33.33% 17-33
packages/react/src/patterns/DataCollection/hooks/useDataCollectionSource/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useDataCollectionSource/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useDataCollectionSource/useDataCollectionSource.ts 76.47% 42.85% 80% 73.33% 79-87, 94
packages/react/src/patterns/DataCollection/hooks/useSelectableLanes/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/hooks/useSelectableLanes/useSelectableLanes.tsx 90.9% 50% 83.33% 95% 127
packages/react/src/patterns/DataCollection/hooks/useSelectableLanes/utils.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/navigationFilters/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/navigationFilters/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/navigationFilters/filterTypes/DateNavigation/DateNavigation.tsx 0% 0% 0% 0% 13-50
packages/react/src/patterns/DataCollection/navigationFilters/filterTypes/DateNavigation/index.tsx 16.66% 0% 33.33% 16.66% 11, 25-48
packages/react/src/patterns/DataCollection/navigationFilters/filterTypes/DateNavigation/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/utils/csvExport.ts 0% 0% 0% 0% 29-438
packages/react/src/patterns/DataCollection/visualizations/collection/VisualizationRenderer.tsx 85.71% 75% 100% 85.71% 103
packages/react/src/patterns/DataCollection/visualizations/collection/collectionViewRegistry.tsx 30% 100% 22.22% 30% 160-324
packages/react/src/patterns/DataCollection/visualizations/collection/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/utils.ts 36.36% 15.38% 66.66% 36.36% 12-31
packages/react/src/patterns/DataCollection/visualizations/collection/Card/index.tsx 68.11% 44.73% 58.33% 71.21% 185, 190, 194, 202-204, 221-240, 254, 258-264, 267, 269, 300, 451-468
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/EditableTable.tsx 11.11% 100% 0% 11.11% 48-89
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/consts.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/EditableCellRenderer.tsx 89.65% 71.42% 100% 92.59% 28-30
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/BaseCell.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/DateCell.tsx 7.14% 0% 0% 8.33% 24-66
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/ErrorTooltip.tsx 66.66% 100% 33.33% 100% 22, 23
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/NumberCell.tsx 100% 90% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/SelectCell.tsx 100% 70% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/TextCell.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/status/DisabledCell.tsx 100% 50% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/components/cells/status/NonEditableCell.tsx 100% 50% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/context/AddRowContext.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/EditableTable/context/EditableRowContext.tsx 100% 87.5% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/Kanban/Kanban.tsx 88.15% 58.1% 82.75% 86.95% 71, 77, 105, 131, 139, 190-191, 254-255
packages/react/src/patterns/DataCollection/visualizations/collection/Kanban/LaneSelectProvider.tsx 0% 0% 0% 0% 48-92
packages/react/src/patterns/DataCollection/visualizations/collection/Kanban/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/Kanban/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/List/index.tsx 4.16% 0% 0% 4.16% 82-216
packages/react/src/patterns/DataCollection/visualizations/collection/List/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/List/components/ItemTeaser.tsx 33.33% 0% 0% 33.33% 11-31
packages/react/src/patterns/DataCollection/visualizations/collection/List/components/ListGroup.tsx 33.33% 0% 0% 33.33% 70-86
packages/react/src/patterns/DataCollection/visualizations/collection/List/components/ListSkeleton.tsx 25% 0% 0% 25% 66-107
packages/react/src/patterns/DataCollection/visualizations/collection/List/components/Row.tsx 5.55% 0% 0% 5.88% 76-187
packages/react/src/patterns/DataCollection/visualizations/collection/Table/Table.tsx 80.62% 62.94% 73.91% 80.8% 70-86, 422-469, 514-515, 549, 582-662, 679, 706-711
packages/react/src/patterns/DataCollection/visualizations/collection/Table/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/Table/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/Table/useSticky.ts 83.33% 37.5% 66.66% 83.33% 26
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/NestedRow.tsx 89.39% 80.51% 90.9% 89.23% 146, 183, 308-338, 368-375
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/Row.tsx 96% 65.57% 75% 96% 269-270
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/TableSettings.tsx 4.34% 0% 0% 5% 32-106
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/AddRow/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/LoadMore/index.tsx 75% 100% 0% 75% 62-69
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/NestedActionRow/index.tsx 85% 60% 83.33% 84.21% 74-76, 84
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/RowLoading/index.tsx 20% 0% 0% 20% 65-89, 185-218
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/SortAndHideList/SortAndHideList.tsx 12.5% 0% 0% 13.33% 24-88, 105-128
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/SortAndHideList/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/Table/components/SortAndHideList/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/Table/hooks/useCalculateConectorHeight.ts 90.56% 65.62% 84.61% 90.56% 55, 59-63, 106
packages/react/src/patterns/DataCollection/visualizations/collection/Table/hooks/useColums.ts 100% 97.72% 100% 100%
packages/react/src/patterns/DataCollection/visualizations/collection/Table/hooks/useHeaderGroups.ts 26.08% 7.69% 40% 25% 36-63, 82-85
packages/react/src/patterns/DataCollection/visualizations/collection/Table/hooks/useLoadChildren.ts 68.91% 52.63% 75% 70% 50, 121-129, 163, 179-180, 192, 196-210
packages/react/src/patterns/DataCollection/visualizations/collection/Table/hooks/useStickyParentRow.ts 85.18% 70.83% 85.71% 84.9% 50-51, 65-66, 81-85, 109
packages/react/src/patterns/DataCollection/visualizations/collection/Table/providers/NestedProvider.tsx 73.91% 50% 85.71% 71.42% 49-50, 56-58, 82-84
packages/react/src/patterns/DataCollection/visualizations/collection/Table/settings/SettingsRenderer.tsx 75% 50% 100% 75% 26-33
packages/react/src/patterns/DateNavigator/OneDateNavigator.tsx 83.33% 82.35% 57.14% 83.33% 68-69, 80-83, 115
packages/react/src/patterns/DateNavigator/index.ts 100% 100% 100% 100%
packages/react/src/patterns/DateNavigator/presets.ts 100% 100% 100% 100%
packages/react/src/patterns/DateNavigator/types.ts 100% 100% 100% 100%
packages/react/src/patterns/DateNavigator/components/DateNavigatorTrigger.tsx 70% 64% 58.82% 69.38% 78, 90-93, 100, 107, 123, 127, 143-147, 168-206
packages/react/src/patterns/Navigation/exports.tsx 100% 100% 100% 100%
packages/react/src/patterns/Navigation/utils.tsx 100% 100% 100% 100%
packages/react/src/patterns/Navigation/ApplicationFrame/index.tsx 0% 0% 0% 0% 47-208
packages/react/src/patterns/Navigation/Carousel/index.tsx 10% 0% 0% 10% 43-48, 61-133
packages/react/src/patterns/Navigation/Carousel/types.ts 100% 100% 100% 100%
packages/react/src/patterns/Navigation/Carousel/DynamicCarousel/index.tsx 6.81% 0% 0% 7.69% 11-103
packages/react/src/patterns/Navigation/DaytimePage/index.tsx 0% 0% 0% 0% 15-151
packages/react/src/patterns/Navigation/Dropdown/DropdownItem.tsx 100% 30% 100% 100%
packages/react/src/patterns/Navigation/Dropdown/index.tsx 34.78% 5.55% 20% 34.78% 39-40, 63-127
packages/react/src/patterns/Navigation/Dropdown/internal.tsx 88.88% 65% 100% 88.88% 94, 98-104
packages/react/src/patterns/Navigation/F0TableOfContent/index.tsx 0% 0% 0% 0% 66-1012
packages/react/src/patterns/Navigation/F0TableOfContent/types.ts 100% 100% 100% 100%
packages/react/src/patterns/Navigation/F0TableOfContent/utils.ts 23.52% 26.5% 23.8% 23.65% 88-304
packages/react/src/patterns/Navigation/F0TableOfContent/DragContext/index.tsx 0% 0% 0% 0% 14-46
packages/react/src/patterns/Navigation/F0TableOfContent/Item/ItemDropDown.tsx 0% 0% 0% 0% 30-161
packages/react/src/patterns/Navigation/F0TableOfContent/Item/PrimitiveItem.tsx 0% 0% 0% 0% 44-152
packages/react/src/patterns/Navigation/F0TableOfContent/Item/index.tsx 0% 0% 0% 0% 49-247
packages/react/src/patterns/Navigation/F0TableOfContent/ItemSectionHeader/CollapsibleItemSectionHeader.tsx 0% 0% 0% 0% 43-50
packages/react/src/patterns/Navigation/F0TableOfContent/ItemSectionHeader/StaticItemSectionHeader.tsx 0% 0% 0% 0% 35-57
packages/react/src/patterns/Navigation/F0TableOfContent/ItemSectionHeader/index.tsx 0% 0% 0% 0% 40-75
packages/react/src/patterns/Navigation/Header/index.tsx 100% 100% 100% 100%
packages/react/src/patterns/Navigation/Header/Breadcrumbs/index.tsx 100% 89.65% 100% 100%
packages/react/src/patterns/Navigation/Header/Breadcrumbs/layoutCalculation.ts 77.5% 60% 80% 78.37% 20, 42-44, 62-64, 79-82, 96-107
packages/react/src/patterns/Navigation/Header/Breadcrumbs/types.ts 100% 100% 100% 100%
packages/react/src/patterns/Navigation/Header/Breadcrumbs/internal/BreadcrumbItem.tsx 100% 82.22% 100% 100%
packages/react/src/patterns/Navigation/Header/Breadcrumbs/internal/BreadcrumbSeparator.tsx 100% 100% 100% 100%
packages/react/src/patterns/Navigation/Header/Breadcrumbs/internal/BreadcrumbSkeleton.tsx 100% 100% 100% 100%
packages/react/src/patterns/Navigation/Header/Breadcrumbs/internal/CollapsedBreadcrumbItem.tsx 100% 100% 100% 100%
packages/react/src/patterns/Navigation/Header/Breadcrumbs/internal/BreadcrumbSelect/index.tsx 0% 0% 0% 0% 21-73
packages/react/src/patterns/Navigation/Header/Favorites/index.tsx 37.5% 0% 0% 37.5% 37-91
packages/react/src/patterns/Navigation/Header/PageHeader/index.tsx 0% 0% 0% 0% 93-330
packages/react/src/patterns/Navigation/Header/ProductUpdates/index.tsx 17.24% 0% 0% 17.24% 101-201, 218-269, 280-304, 317-330, 346-364, 375-384, 393-399, 403-424, 428-431, 445-503
packages/react/src/patterns/Navigation/Page/index.tsx 0% 0% 0% 0% 11-30
packages/react/src/patterns/Navigation/Tabs/index.tsx 85% 65.71% 85.71% 89.47% 44, 82-83
packages/react/src/patterns/Navigation/VirtualList/index.tsx 0% 0% 0% 0% 16-78
Generated in workflow #12451 for commit d483d33 by the Vitest Coverage Report Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reorganizes @factorialco/f0-react Storybook navigation by introducing a new Kits top-level section (with chart code moved into src/kits/) and moving higher-level UI examples into Patterns, while keeping Components and Experimental separated and preserving backwards-compatible exports.

Changes:

  • Add kits as a new build entry (src/kits.ts) and introduce src/kits/* as the canonical location for chart-related code and stories.
  • Implement/relocate chart kits (Recharts charts, ECharts-based F0DataChart, and WidgetCharts) and update Storybook titles/sorting to match the new navigation.
  • Keep legacy import paths working via @deprecated re-export barrels in previous locations.

Reviewed changes

Copilot reviewed 177 out of 177 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/react/vite.config.ts Adds kits entry to the library build.
packages/react/src/kits.ts New public entrypoint exporting kits.
packages/react/src/kits/exports.ts Barrel exporting Kits charts, F0DataChart, and WidgetCharts.
packages/react/src/kits/WidgetCharts/ChartContainer.tsx Shared container wrapper for widget charts.
packages/react/src/kits/WidgetCharts/exports.tsx Public WidgetCharts exports under Kits.
packages/react/src/kits/WidgetCharts/storybook-utils.tsx Shared story args/decorator for widget stories.
packages/react/src/kits/WidgetCharts/AreaChartWidget/index.tsx Kits widget wrapper for AreaChart.
packages/react/src/kits/WidgetCharts/AreaChartWidget/stories/AreaChartWidget.stories.tsx Story under Kits/Widgets/....
packages/react/src/kits/WidgetCharts/BarChartWidget/index.tsx Kits widget wrapper for BarChart.
packages/react/src/kits/WidgetCharts/BarChartWidget/stories/BarChartWidget.stories.tsx Story under Kits/Widgets/....
packages/react/src/kits/WidgetCharts/LineChartWidget/index.tsx Kits widget wrapper for LineChart.
packages/react/src/kits/WidgetCharts/LineChartWidget/stories/LineChartWidget.stories.tsx Story under Kits/Widgets/....
packages/react/src/kits/WidgetCharts/PieChartWidget/index.tsx Kits widget wrapper for PieChart.
packages/react/src/kits/WidgetCharts/PieChartWidget/stories/PieChartWidget.stories.tsx Story under Kits/Widgets/....
packages/react/src/kits/WidgetCharts/VerticalBarChartWidget/index.tsx Kits widget wrapper for VerticalBarChart.
packages/react/src/kits/WidgetCharts/VerticalBarChartWidget/stories/VerticalBarChartWidget.stories.tsx Story under Kits/Widgets/....
packages/react/src/kits/WidgetCharts/SummariesWidget/index.tsx Adds summaries-only widget wrapper.
packages/react/src/kits/WidgetCharts/SummariesWidget/stories/SummariesWidget.stories.tsx Story under Kits/Widgets/....
packages/react/src/kits/WidgetCharts/RadialProgressWidget/index.tsx Adds radial progress widget using chart kit.
packages/react/src/kits/WidgetCharts/RadialProgressWidget/stories/RadialProgressWidget.stories.tsx Story under Kits/Widgets/....
packages/react/src/kits/F0DataChart/index.ts New Kits entry for F0DataChart exports/types.
packages/react/src/kits/F0DataChart/F0DataChart.tsx Switch-based dispatcher for chart types.
packages/react/src/kits/F0DataChart/utils/colors.ts New chart color token system + palette helpers.
packages/react/src/kits/F0DataChart/utils/formatters.ts Adds formatting helpers (e.g., percent).
packages/react/src/kits/F0DataChart/utils/useEChartsInstance.ts ECharts lifecycle management hook.
packages/react/src/kits/F0DataChart/utils/useLegendInteraction.ts Plotly-like legend interactions.
packages/react/src/kits/F0DataChart/utils/useContainerSize.ts ResizeObserver-based size tracking hook.
packages/react/src/kits/F0DataChart/utils/useChartTheme.ts Dark-mode aware theme resolution hook.
packages/react/src/kits/F0DataChart/utils/useAxisLabelTooltip.ts Overlay tooltip for canvas axis labels.
packages/react/src/kits/F0DataChart/components/BarChart/BarChart.tsx ECharts Bar implementation wiring hooks.
packages/react/src/kits/F0DataChart/components/LineChart/LineChart.tsx ECharts Line implementation wiring hooks.
packages/react/src/kits/F0DataChart/components/LineChart/useLineChartOptions.ts Builds ECharts options for line charts.
packages/react/src/kits/F0DataChart/components/PieChart/PieChart.tsx ECharts Pie implementation wiring hooks.
packages/react/src/kits/F0DataChart/components/PieChart/usePieChartOptions.ts Builds ECharts options for pie charts.
packages/react/src/kits/F0DataChart/components/RadarChart/RadarChart.tsx ECharts Radar implementation wiring hooks.
packages/react/src/kits/F0DataChart/components/RadarChart/useRadarChartOptions.ts Builds ECharts options for radar charts.
packages/react/src/kits/F0DataChart/components/FunnelChart/FunnelChart.tsx Funnel chart with overlay labels/conversion.
packages/react/src/kits/F0DataChart/components/GaugeChart/GaugeChart.tsx ECharts gauge wiring.
packages/react/src/kits/F0DataChart/components/GaugeChart/useGaugeChartOptions.ts Builds ECharts options for gauge charts.
packages/react/src/kits/F0DataChart/components/HeatmapChart/HeatmapChart.tsx ECharts heatmap wiring.
packages/react/src/kits/F0DataChart/components/HeatmapChart/useHeatmapChartOptions.ts Builds ECharts options for heatmap charts.
packages/react/src/kits/F0DataChart/tests/F0DataChart.test.tsx Adds component smoke tests with ECharts mocked.
packages/react/src/kits/F0DataChart/tests/colors.test.ts Adds unit tests for palette/color helpers.
packages/react/src/kits/F0DataChart/tests/formatters.test.ts Adds unit tests for formatters.
packages/react/src/kits/F0DataChart/tests/options.test.ts Adds unit tests for label interval helper.
packages/react/src/kits/F0DataChart/stories/decorators.tsx Shared decorators for Kits F0DataChart stories.
packages/react/src/kits/F0DataChart/stories/Skeletons.stories.tsx Kits story grouping for skeleton variants.
packages/react/src/kits/F0DataChart/stories/Bar.stories.tsx Story moved under Kits/F0DataChart/....
packages/react/src/kits/F0DataChart/stories/Line.stories.tsx Story moved under Kits/F0DataChart/....
packages/react/src/kits/F0DataChart/stories/Pie.stories.tsx Story moved under Kits/F0DataChart/....
packages/react/src/kits/F0DataChart/stories/Radar.stories.tsx Story moved under Kits/F0DataChart/....
packages/react/src/kits/F0DataChart/stories/Gauge.stories.tsx Story moved under Kits/F0DataChart/....
packages/react/src/kits/F0DataChart/stories/Heatmap.stories.tsx Story moved under Kits/F0DataChart/....
packages/react/src/kits/F0DataChart/stories/Funnel.stories.tsx Story moved under Kits/F0DataChart/....
packages/react/src/kits/Charts/utils/types.ts Shared chart prop/types moved under Kits.
packages/react/src/kits/Charts/utils/muncher.ts Shared data preparation helper.
packages/react/src/kits/Charts/utils/bar.ts Vertical bar data preparation helper.
packages/react/src/kits/Charts/utils/colors.tsx Shared chart color helpers.
packages/react/src/kits/Charts/utils/elements.tsx Shared Recharts element prop builders.
packages/react/src/kits/Charts/utils/forwardRef.ts Shared generic forwardRef helper.
packages/react/src/kits/Charts/exports.ts Kits chart exports + metadata wrappers.
packages/react/src/kits/Charts/AreaChart/stories/AreaChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/BarChart/stories/BarChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/CategoryBarChart/index.tsx Kits CategoryBarChart implementation.
packages/react/src/kits/Charts/CategoryBarChart/stories/CategoryBarChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/ComboChart/stories/ComboChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/LineChart/index.tsx Kits LineChart implementation.
packages/react/src/kits/Charts/LineChart/stories/LineChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/PieChart/index.tsx Kits PieChart implementation.
packages/react/src/kits/Charts/PieChart/stories/PieChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/ProgressChart/index.tsx Kits progress bar chart implementation.
packages/react/src/kits/Charts/ProgressChart/stories/ProgressChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/ProgressBarDuo/index.tsx Kits ProgressBarDuo implementation.
packages/react/src/kits/Charts/ProgressBarDuo/stories/ProgressBarDuo.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/RadialProgressChart/index.tsx Kits RadialProgressChart implementation.
packages/react/src/kits/Charts/RadialProgressChart/stories/RadialProgressChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/RadarChart/index.tsx Kits RadarChart implementation.
packages/react/src/kits/Charts/RadarChart/stories/RadarChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/VerticalBarChart/stories/VerticalBarChart.stories.tsx Story moved under Kits/Charts/....
packages/react/src/kits/Charts/F0Chart/index.ts Kits F0Chart experimental wrapper.
packages/react/src/kits/Charts/F0Chart/F0Chart.tsx Kits F0Chart implementation.
packages/react/src/kits/Charts/F0Chart/stories/decorators.tsx Decorator for F0Chart stories under Kits.
packages/react/src/kits/Charts/F0Chart/stories/index.stories.tsx Base F0Chart story under Kits.
packages/react/src/kits/Charts/F0Chart/stories/area.stories.tsx Area example under Kits/Charts/F0Chart/....
packages/react/src/kits/Charts/F0Chart/stories/bar.stories.tsx Bar example under Kits/Charts/F0Chart/....
packages/react/src/kits/Charts/F0Chart/stories/barHorizontal.stories.tsx Horizontal bar example under Kits.
packages/react/src/kits/Charts/F0Chart/stories/funnel.stories.tsx Funnel example under Kits.
packages/react/src/kits/Charts/F0Chart/stories/line.stories.tsx Line example under Kits.
packages/react/src/kits/Charts/F0Chart/stories/pie.stories.tsx Pie example under Kits.
packages/react/src/kits/Charts/F0Chart/stories/radar.stories.tsx Radar example under Kits.
packages/react/src/experimental/Widgets/Charts/exports.tsx Deprecated re-export pointing to Kits WidgetCharts.
packages/react/src/experimental/Widgets/Charts/AreaChartWidget/index.stories.tsx Story title moved to Kits/Widgets/....
packages/react/src/experimental/Widgets/Charts/BarChartWidget/index.stories.tsx Story title moved to Kits/Widgets/....
packages/react/src/experimental/Widgets/Charts/LineChartWidget/index.stories.tsx Story title moved to Kits/Widgets/....
packages/react/src/experimental/Widgets/Charts/PieChartWidget/index.stories.tsx Story title moved to Kits/Widgets/....
packages/react/src/experimental/Widgets/Charts/RadialProgressWidget/index.stories.tsx Story title moved to Kits/Widgets/....
packages/react/src/experimental/Widgets/Charts/SummariesWidget/index.stories.tsx Story title moved to Kits/Widgets/....
packages/react/src/experimental/Widgets/Charts/VerticalBarChartWidget/index.stories.tsx Story title moved to Kits/Widgets/....
packages/react/src/experimental/Widgets/Content/ProgressBarDuo/index.tsx Deprecated re-export pointing to Kits ProgressBarDuo.
packages/react/src/experimental/Widgets/Content/ProgressBarDuo/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/experimental/Charts/exports.ts Deprecated re-export pointing to Kits Charts RadarChart.
packages/react/src/experimental/Charts/RadarChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/exports.ts Deprecated re-export pointing to Kits Charts exports.
packages/react/src/components/Charts/AreaChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/BarChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/CategoryBarChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/ComboChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/LineChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/PieChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/ProgressChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/RadialProgressChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/VerticalBarChart/index.stories.tsx Story title moved to Kits/Charts/....
packages/react/src/components/Charts/F0Chart/stories/decorators.tsx Story group moved under Kits/Charts/F0Chart/....
packages/react/src/components/Charts/F0Chart/stories/index.stories.tsx Story title moved under Kits.
packages/react/src/components/Charts/F0Chart/stories/area.stories.tsx Story title moved under Kits.
packages/react/src/components/Charts/F0Chart/stories/bar.stories.tsx Story title moved under Kits.
packages/react/src/components/Charts/F0Chart/stories/barHorizontal.stories.tsx Story title moved under Kits.
packages/react/src/components/Charts/F0Chart/stories/funnel.stories.tsx Story title moved under Kits.
packages/react/src/components/Charts/F0Chart/stories/line.stories.tsx Story title moved under Kits.
packages/react/src/components/Charts/F0Chart/stories/pie.stories.tsx Story title moved under Kits.
packages/react/src/components/Charts/F0Chart/stories/radar.stories.tsx Story title moved under Kits.
packages/react/src/components/F0DataChart/index.ts Deprecated re-export pointing to Kits F0DataChart.
packages/react/src/components/F0DataChart/stories/decorators.tsx Story group moved under Kits/F0DataChart/....
packages/react/src/components/F0DataChart/stories/Skeletons.stories.tsx Story title moved under Kits.
packages/react/src/components/F0DataChart/stories/Bar.stories.tsx Story title moved under Kits.
packages/react/src/components/F0DataChart/stories/Line.stories.tsx Story title moved under Kits.
packages/react/src/components/F0DataChart/stories/Pie.stories.tsx Story title moved under Kits.
packages/react/src/components/F0DataChart/stories/Radar.stories.tsx Story title moved under Kits.
packages/react/src/components/F0DataChart/stories/Gauge.stories.tsx Story title moved under Kits.
packages/react/src/components/F0DataChart/stories/Heatmap.stories.tsx Story title moved under Kits.
packages/react/src/components/F0DataChart/stories/Funnel.stories.tsx Story title moved under Kits.
packages/react/src/experimental/OneDateNavigator/stories/OneDateNavigator.stories.tsx Story moved under Patterns/DateNavigator.
packages/react/src/experimental/OneDataCollection/components/ActionBar/index.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/visualizations/collection/Table/components/SortAndHideList/stories/SortAndHideList.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/index.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/summary.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/grouping.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/full-height.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/empty-states.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/callbacks/callbacks.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/navigation-filters/navigation-filters.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/filters/filters.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/filters/per-visualization-filters.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/actions/item-actions.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/actions/collection-actions.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/total-items-summary/total-items-summary.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/temporary-deprecated/temporary-deprecated.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/visualizations/list/list.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/visualizations/table/table.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/visualizations/card/card.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/visualizations/editable-table/editable-table.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/OneDataCollection/stories/visualizations/kanban.stories.tsx Story moved under Patterns/Data Collection/....
packages/react/src/experimental/Navigation/ApplicationFrame/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/Carousel/index.stories.tsx Story moved under Patterns/Navigation/Carousel/....
packages/react/src/experimental/Navigation/Carousel/DynamicCarousel/index.stories.tsx Story moved under Patterns/Navigation/Carousel/....
packages/react/src/experimental/Navigation/DaytimePage/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/Dropdown/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/F0TableOfContent/stories/F0TableOfContent.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/Header/Breadcrumbs/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/Header/Breadcrumbs/internal/BreadcrumbSelect/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/Header/PageHeader/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/Page/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/Tabs/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/src/experimental/Navigation/VirtualList/index.stories.tsx Story moved under Patterns/Navigation/....
packages/react/.storybook/main.ts Adds Kits story directory and renames experimental title prefix.
packages/react/.storybook/preview.tsx Updates theme decorator implementation and Storybook top-level ordering.
packages/react/.oxlintrc.json Exempts **/kits.ts from barrel-import restriction.

Comment on lines +43 to +56
if (allWereVisible && wasVisible) {
// Isolate: show only the clicked one
const next: Record<string, boolean> = {}
for (const name of allNames) {
next[name] = name === clickedName
}
prevSelectedRef.current = next
chart!.dispatchAction({ type: "legendSelect", name: clickedName })
for (const name of allNames) {
if (name !== clickedName) {
chart!.dispatchAction({ type: "legendUnSelect", name })
}
}
return
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useLegendInteraction updates prevSelectedRef.current and then calls chart.dispatchAction(...) inside the legendselectchanged handler. ECharts dispatch actions also emit legendselectchanged, so this can re-enter the handler with prevVisibleCount === 1 and immediately trigger the “show all” branch, breaking the intended isolate behavior (and potentially causing event loops). Consider suppressing events for internal actions (e.g., silent: true if supported) or using an isProgrammaticRef guard to ignore handler invocations caused by your own dispatches, and only update prevSelectedRef after the programmatic actions complete.

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +52
].join("; ")
container!.style.position = "relative"
container!.appendChild(overlay)
return overlay
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useAxisLabelTooltip forcibly sets container.style.position = "relative" when creating the overlay but never restores the previous position value. This can inadvertently change layout/styling for consumers that rely on a different positioning context. Store the prior inline position value (and possibly only set it when empty) and restore it in the effect cleanup.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +88
const values = data.map((item) => item.value)
const sum = values.reduce((acc, value) => {
return acc + value
})

if (sum === 0) {
preparedData.push({
label: "-",
value: 1,
fill: "hsl(var(--neutral-2))",
})
}

return (
<ChartContainer
config={dataConfig}
ref={ref}
aspect={aspect}
data-chromatic="ignore"
style={{ height: 380 }}
>
<PieChartPrimitive accessibilityLayer margin={{ left: 0, right: 0 }}>
{sum !== 0 && (
<ChartTooltip
isAnimationActive={false}
content={<ChartTooltipContent yAxisFormatter={tickFormatter} />}
/>
)}
<Pie
isAnimationActive={false}
nameKey={"label"}
legendType="circle"
dataKey={"value"}
data={preparedData}
innerRadius={120}
outerRadius={135}
paddingAngle={2.5}
>
{preparedData.map((entry, index) => {
const value = tickFormatter
? tickFormatter(String(entry.value))
: entry.value
return (
<Cell
key={`cell-${index}`}
fill={entry.fill}
aria-label={`${entry.label}: ${value} (${((entry.value / sum) * 100).toFixed(0)}%)`}
/>
)
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the zero-sum case, sum stays 0 but a placeholder slice is pushed to preparedData. The subsequent aria-label computation uses (entry.value / sum) * 100 and calls .toFixed(0) on a non-finite number, which will throw at runtime. Also, values.reduce(...) has no initial value, which will throw when data is empty. Use an initial accumulator for reduce, and compute percentages against a non-zero denominator (e.g., safeSum = sum === 0 ? 1 : sum) or branch the label formatting when sum === 0.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +55
const total = data.reduce((sum, category) => sum + category.value, 0)

return (
<TooltipProvider>
<div className="w-full" ref={ref}>
<div className="flex h-2 gap-1 overflow-hidden">
{data.map((category, index) => {
const percentage = (category.value / total) * 100
const color = category.color
? getColor(category.color)
: getCategoricalColor(index)

const formatPercentage = (value: number): string => {
const percentage = (value / total) * 100
return percentage % 1 === 0
? percentage.toFixed(0)
: percentage.toFixed(1)
}

if (percentage === 0) {
return null
}

return (
<Tooltip key={category.name}>
<TooltipTrigger
className="h-full cursor-default overflow-hidden rounded-2xs"
style={{ width: `${percentage}%` }}
title={category.name}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When total is 0 (e.g., all category values are zero or data is empty), percentage becomes NaN, so the percentage === 0 guard won’t filter it out and you’ll render segments with width: "NaN%" plus tooltip values like NaN%. Add an early return for total <= 0 (render nothing or a neutral placeholder) and ensure percentage formatting never divides by zero.

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +35

const _ProgressBar = <K extends ChartConfig>(
{ value, max = 100, label, color }: ProgressBarProps<K>,
_ref: ForwardedRef<HTMLDivElement>
) => {
const barColor = color ? getColor(color) : getColor("categorical-1")
const percentage = (value / max) * 100

return (
<div className="flex items-center space-x-2" aria-live="polite">
<div className="flex-grow">
<Progress
color={barColor}
value={percentage}
className="w-full"
aria-valuemin={0}
aria-valuemax={max}
aria-valuenow={value}
aria-label={`${percentage.toFixed(1)}%`}
/>
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

percentage is computed as (value / max) * 100 without guarding max === 0 or clamping values. If value > max or max is 0, Progress will receive an out-of-range/non-finite value and aria-label will be misleading or throw. Clamp to [0, 100] and handle max <= 0 (e.g., treat as 0% or fallback to 100).

Copilot uses AI. Check for mistakes.
Comment on lines +81 to +100
visualMap: {
min,
max,
calculable: false,
orient: "horizontal",
bottom: 10,
left: "center",
show: false,
inRange: {
color: [colors.borderSecondary, baseColor],
},
textStyle: {
color: colors.foregroundTertiary,
fontSize: theme.textStyle.fontSize,
},
formatter: valueFormatter
? (value: unknown) => valueFormatter(Number(value))
: undefined,
},
grid: buildGrid({ showLegend: showVisualMap }),
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

showVisualMap prop is effectively ignored: visualMap.show is hard-coded to false, so enabling showVisualMap won’t display the visual map even though layout/grid is computed with showVisualMap. Use show: showVisualMap (or conditionally omit visualMap when false) so the prop behaves as intended.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 1, 2026 10:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 210 out of 397 changed files in this pull request and generated 22 comments.

Comment on lines +1 to +9
import {
FiltersDefinition,
FiltersState,
GroupingDefinition,
GroupingState,
RecordType,
SortingsDefinition,
SortingsState,
} from "@/hooks/datasource"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The folder name useDataColectionStorage is misspelled (missing an 'l' in 'Collection'). This leaks into import paths and public API surface. Rename it to useDataCollectionStorage and update internal imports; if it's already consumed externally, consider adding a deprecated re-export/shim to preserve backwards compatibility.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +52 to +70
const DataCollectionSettingsContext =
createContext<DataCollectionSettingsContextType>({
setSettings: () => {},
settings: {
// To avoid circular dependency initializating the settings (the value is provided in the provider)
visualization: {} as VisualizationSettings,
},
setVisualizationSettings: () => {},
})

export const useDataCollectionSettings = () => {
const context = useContext(DataCollectionSettingsContext)
if (!context) {
throw new Error(
"useTableSettings must be used within a TableSettingsProvider"
)
}
return context
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provider-usage guard is ineffective: useContext(DataCollectionSettingsContext) will never be falsy because the context has a non-null default value. Also, the error message references useTableSettings/TableSettingsProvider, which doesn't match this hook/provider. Use a createContext<DataCollectionSettingsContextType | null>(null) default and throw a correctly named error (e.g. useDataCollectionSettings must be used within DataCollectionSettingsProvider).

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +103
className={cn(
"flex w-full flex-col items-center justify-center gap-1 rounded-sm p-2 font-medium text-f1-foreground-secondary transition-colors",
isSelected && "bg-f1-background-secondary text-f1-foreground",
focusRing()
)}
key={visualization.type}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using key={visualization.type} can produce duplicate keys if multiple visualizations share the same type (e.g. multiple custom visualizations). This can cause incorrect reconciliation/rendering. Use a unique key (e.g. include index or a unique visualization id if available). Also consider setting type=\"button\" to avoid accidental form submission if this is ever rendered inside a <form>.

Suggested change
className={cn(
"flex w-full flex-col items-center justify-center gap-1 rounded-sm p-2 font-medium text-f1-foreground-secondary transition-colors",
isSelected && "bg-f1-background-secondary text-f1-foreground",
focusRing()
)}
key={visualization.type}
type="button"
className={cn(
"flex w-full flex-col items-center justify-center gap-1 rounded-sm p-2 font-medium text-f1-foreground-secondary transition-colors",
isSelected && "bg-f1-background-secondary text-f1-foreground",
focusRing()
)}
key={`${visualization.type}-${index}`}

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +49
// eslint-disable-next-line react-hooks/exhaustive-deps -- we are deep comparing the currentSortings
}, [JSON.stringify(currentSortings)])
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using JSON.stringify(currentSortings) in the dependency array is expensive and brittle (it allocates every render and can change due to key order). Prefer a proper dependency list (e.g. currentSortings?.field, currentSortings?.order) or normalize upstream so currentSortings has stable identity when unchanged.

Suggested change
// eslint-disable-next-line react-hooks/exhaustive-deps -- we are deep comparing the currentSortings
}, [JSON.stringify(currentSortings)])
}, [currentSortings?.field, currentSortings?.order])

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +23
export const SortingSelector = <Sortings extends SortingsDefinition>({
currentSortings,
sortings,
onChange,
}: {
sortings: SortingsDefinition
currentSortings: SortingsState<Sortings>
onChange: (sorting: SortingsState<Sortings>) => void
}) => {
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prop typing for sortings loses the generic relationship: it's declared as SortingsDefinition instead of Sortings, which weakens type safety for SortingKey<Sortings>. Also, handleChange calls onChange(null), so the callback type should allow null if SortingsState doesn't already include it. Align the prop types to the actual behavior (sortings: Sortings and an onChange signature consistent with nullable state).

Copilot uses AI. Check for mistakes.
const center = size / 2
const radius = center - strokeWidth / 2
const circumference = 2 * Math.PI * radius
const progressOffset = ((max - Math.min(value, max)) / max) * circumference
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If max is 0, this divides by zero and produces Infinity/NaN for progressOffset, breaking the SVG stroke. Clamp/guard max (e.g. treat 0 as 1 or render an empty ring).

Suggested change
const progressOffset = ((max - Math.min(value, max)) / max) * circumference
const clampedMax = max > 0 ? max : 1
const progressOffset =
((clampedMax - Math.min(value, clampedMax)) / clampedMax) * circumference

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +22
const barColor = color ? getColor(color) : getColor("categorical-1")
const percentage = (value / max) * 100
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If max is 0, percentage becomes Infinity/NaN, which can break Progress rendering and accessibility labels. Add a max <= 0 guard and clamp percentage to [0, 100].

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +4
export function prepareData<K extends ChartConfig>(data: ChartItem<K>[]) {
return data.map((item) => ({ x: item.label, ...item.values }))
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two identical prepareData implementations (utils/muncher.ts and utils/bar.ts). This duplication increases drift risk. Consider keeping a single implementation and re-exporting it where needed.

Suggested change
export function prepareData<K extends ChartConfig>(data: ChartItem<K>[]) {
return data.map((item) => ({ x: item.label, ...item.values }))
function mapChartItem<K extends ChartConfig>(item: ChartItem<K>) {
return { x: item.label, ...item.values }
}
export function prepareData<K extends ChartConfig>(data: ChartItem<K>[]) {
return data.map(mapChartItem)

Copilot uses AI. Check for mistakes.
Comment on lines 168 to +174
"how-to-contribute",
"ai-configuration",
"foundations",
"components",
"experimental",
"patterns",
"kits",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The storySort.topLevelOrder entries are lowercase (components, experimental, patterns, kits), but your Storybook titles/prefixes in this PR use capitalized segments (e.g. Components/..., Experimental/..., Patterns/..., Kits/...). Storybook's sorting typically matches on the actual title segments, so this may not apply as intended. Align the casing with the real top-level titles.

Copilot uses AI. Check for mistakes.
Comment on lines 40 to 43
{
directory: "../src/experimental",
titlePrefix: "Components",
titlePrefix: "Experimental",
},
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several story files under src/experimental/ were retitled to start with Kits/... in this PR, but titlePrefix: \"Experimental\" will prepend them to Experimental/Kits/..., which conflicts with the stated goal of having chart components under the Kits top-level section. Consider either excluding/moving those deprecated stories, or setting an appropriate titlePrefix/no-sidebar strategy so they don't show up under the wrong section.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 1, 2026 11:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 196 out of 397 changed files in this pull request and generated 10 comments.

createContext<DataCollectionSettingsContextType>({
setSettings: () => {},
settings: {
// To avoid circular dependency initializating the settings (the value is provided in the provider)
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: 'initializating' should be 'initializing'.

Suggested change
// To avoid circular dependency initializating the settings (the value is provided in the provider)
// To avoid circular dependency initializing the settings (the value is provided in the provider)

Copilot uses AI. Check for mistakes.
settings:
| VisualizationSettings[keyof VisualizationSettings]
| ((
prevVisualiztionSettings: VisualizationSettings[keyof VisualizationSettings]
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in parameter name: 'prevVisualiztionSettings' should be 'prevVisualizationSettings'.

Suggested change
prevVisualiztionSettings: VisualizationSettings[keyof VisualizationSettings]
prevVisualizationSettings: VisualizationSettings[keyof VisualizationSettings]

Copilot uses AI. Check for mistakes.

export const ProgressBarDuo = forwardRef<HTMLDivElement, DualProgressBarProps>(
function ProgressBarDuo({ value, max = 100 }: DualProgressBarProps, ref) {
const percentage = Math.min(100, Math.max(0, (value / max) * 100))
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max can be 0 (or negative), which would produce Infinity/NaN percentages and invalid widths. Use the same guard/clamp approach used in ProgressChart (e.g., safeMax = max > 0 ? max : 1) before computing the percentage.

Suggested change
const percentage = Math.min(100, Math.max(0, (value / max) * 100))
const safeMax = max > 0 ? max : 1
const percentage = Math.min(100, Math.max(0, (value / safeMax) * 100))

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +15
export function RadialProgressChart({
value,
max = 100,
color,
overview,
}: RadialProgressProps) {
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This divides by max without guarding against max <= 0, which can create non-finite SVG values. Add a safeMax (like max > 0 ? max : 1) and clamp value to [0, safeMax] before computing the offset.

Copilot uses AI. Check for mistakes.
}
return (
<div className="grid grid-cols-2 p-2">
{visualizations.map((visualization, index) => {
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key={visualization.type} can collide when multiple visualizations share the same type (notably "custom", or if multiple instances of the same built-in type are provided). Use a unique key (e.g., prefer a stable id on the visualization if available, otherwise fall back to ${visualization.type}-${index}) to avoid React reconciliation bugs.

Copilot uses AI. Check for mistakes.
const isSelected = currentVisualization === index

return (
<button
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key={visualization.type} can collide when multiple visualizations share the same type (notably "custom", or if multiple instances of the same built-in type are provided). Use a unique key (e.g., prefer a stable id on the visualization if available, otherwise fall back to ${visualization.type}-${index}) to avoid React reconciliation bugs.

Copilot uses AI. Check for mistakes.
style={{ backgroundColor: color }}
role="img"
title={category.name}
tabIndex={0}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A focusable element with role="img" should have an accessible name; title is not a reliable accessible name across assistive tech. Add an aria-label (e.g., include category name + value/percentage) or change the semantics to a non-focusable purely decorative element (remove tabIndex) if it’s not intended to be keyboard-navigable.

Suggested change
tabIndex={0}
tabIndex={0}
aria-label={`${category.name}: ${category.value} (${formatPercentage(category.value)}%)`}

Copilot uses AI. Check for mistakes.
dataCollectionStorageFeatures: ["filters", "sortings", "grouping", "search"],
}))

describe("calculateFeatures", () => {
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test suite name doesn’t match the function under test (getFeatures). Renaming this describe block to describe("getFeatures", ...) will make failures easier to interpret and keep naming consistent.

Suggested change
describe("calculateFeatures", () => {
describe("getFeatures", () => {

Copilot uses AI. Check for mistakes.
Comment on lines +91 to +92
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- to test the function
const result = getFeatures(["*", "!nonexistent"] as any)
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid as any even in tests. Prefer as unknown as <ExpectedType> (or explicitly type a narrower invalid input) to keep type-safety and avoid masking real typing regressions.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
import { ChartConfig, ChartItem } from "./types"

export function prepareData<K extends ChartConfig>(data: ChartItem<K>[]) {
return data.map((item) => ({ x: item.label, ...item.values }))
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prepareData is duplicated in packages/react/src/kits/Charts/utils/bar.ts with the same implementation. Keeping two identical helpers increases drift risk; consider keeping a single implementation (e.g., one shared prepareData in muncher.ts) and re-exporting/using it from the specialized modules.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings April 1, 2026 11:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 178 out of 366 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (1)

packages/react/src/kits/Charts/utils/bar.ts:1

  • This prepareData helper duplicates utils/muncher.ts (same signature/logic). Consolidating to a single implementation reduces the chance of drift and makes future changes (like adding derived fields) easier.

Comment on lines +1 to +27
import { TranslationsType } from "@/lib/providers/i18n"

import {
DateNavigatorFilterDefinition,
DateValue,
} from "./filterTypes/DateNavigation/types"

export type NavigationFilter<T, InitialValue = T> = {
/**
* Converts the initial value to the correct type for the filter.
* This is useful for filters that have a complex internal state but the initial value is a simple type, for example a navigation filter. The initial can be a simple date but the internal state converts it to a date range based on the granularity.
* @param defaultValue - The initial value to convert
* @param props - The props of the filter
* @returns The converted value
*/
valueConverter?: (
defaultValue: InitialValue,
filterDef: NavigationFilterComponentProps<T>["filter"],
i18n: TranslationsType
) => T
/**
* Renders the filter component.
* @param props - The props of the filter
* @returns The rendered component
*/
render: (props: NavigationFilterComponentProps<T>) => React.ReactNode
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React.ReactNode is referenced but React isn't imported in this .ts file, which will fail type-checking in TS configurations that don't provide a global React namespace. Import type ReactNode from "react" (or import type * as React from "react") and use that type instead of React.ReactNode.

Copilot uses AI. Check for mistakes.
const isDateValue = (
value: Date | DateRange | DateValue
): value is DateValue => {
return "date" in value
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type guard is checking "date" in value, but DateValue (as defined in types.ts) doesn’t have a date property, so this will always be false (and can throw if value is a Date in some TS/JS edge cases). Update the guard to check a property that actually exists on DateValue (e.g. "granularity" in value and "valueString" in value), or use a more robust shape check.

Suggested change
return "date" in value
return (
typeof value === "object" &&
value !== null &&
"granularity" in value &&
"valueString" in value
)

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +24
* Rules:
* - Key must contain at least one forward slash
* - The part after the last slash is the version
* - Version must start with 'v' followed by alphanumeric characters
* - Name can be a path (e.g., 'employees/list/') and must not be empty
*
* Valid examples:
* - 'employees/v1'
* - 'employees/list/v2'
* - 'products/categories/v1'
*
* Invalid examples:
* - 'employees' (no version)
* - 'employees/1' (version doesn't start with 'v')
* - '/v1' (empty name)
* - 'employees/v' (version has no number/identifier)
*/
export const validateStorageKey = (key: string): boolean => {
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring and inline comment disagree with the actual validation regex. The text says "alphanumeric characters" and the examples mention v.1.2, but the regex only allows digits (/^v[0-9]+$/). Please align docs/comments with the implementation, or broaden the regex to match the documented allowed versions.

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +46
// Version must match 'v' followed by one or more digits (e.g., v1, v2, v123 v.1.2)
if (!version || !/^v[0-9]+$/.test(version)) {
return false
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring and inline comment disagree with the actual validation regex. The text says "alphanumeric characters" and the examples mention v.1.2, but the regex only allows digits (/^v[0-9]+$/). Please align docs/comments with the implementation, or broaden the regex to match the documented allowed versions.

Copilot uses AI. Check for mistakes.
Comment on lines +57 to +64
/* Validate the storage key */
if (key && !validateStorageKey(key)) {
console.error(
`Invalid storage key format: "${key}". ` +
`Key must follow the format "name/version" where name can be a path ` +
`(e.g., "employees/list/") and version must start with "v" (e.g., "v1", "v2.1").`
)
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation runs during render and will log on every render for an invalid key, which can spam logs and impact performance in real apps. Consider moving this into an effect (so it runs only when key changes) and/or short-circuiting the hook’s storage behavior when the key is invalid (instead of continuing with storageProvider.get/set using an invalid key). Also, the error text mentions v2.1 as valid but the current validator rejects it.

Copilot uses AI. Check for mistakes.
/>
))
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [JSON.stringify(lanes)])
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The memoized JSX depends on source (and indirectly onSelectItems through upstream behavior), but the dependency array only includes JSON.stringify(lanes). If source changes while lanes stringify stays the same, LaneSelectProvider will keep receiving a stale source prop. Include source (and any other referenced values) in the dependency list, and avoid JSON.stringify(lanes) (it’s expensive and can still miss cases); consider using a deep-compare memo helper if needed.

Suggested change
}, [JSON.stringify(lanes)])
}, [lanes, source])

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +8
import { forwardRef, PropsWithoutRef } from "react"

export function fixedForwardRef<T, P>(
render: (props: PropsWithoutRef<P>, ref: React.Ref<T>) => React.ReactNode
) {
return forwardRef(render) as (
props: P & React.RefAttributes<T>
) => React.ReactNode
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file references React.Ref, React.ReactNode, and React.RefAttributes but doesn’t import the React namespace (and only imports named exports). This will fail type-checking unless the repo provides a global React namespace. Import the needed types directly from "react" (e.g. type Ref, ReactNode, RefAttributes) or import type * as React from "react".

Suggested change
import { forwardRef, PropsWithoutRef } from "react"
export function fixedForwardRef<T, P>(
render: (props: PropsWithoutRef<P>, ref: React.Ref<T>) => React.ReactNode
) {
return forwardRef(render) as (
props: P & React.RefAttributes<T>
) => React.ReactNode
import { forwardRef } from "react"
import type { PropsWithoutRef, Ref, ReactNode, RefAttributes } from "react"
export function fixedForwardRef<T, P>(
render: (props: PropsWithoutRef<P>, ref: Ref<T>) => ReactNode
) {
return forwardRef(render) as (
props: P & RefAttributes<T>
) => ReactNode

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,115 @@
/**
* This hooks extends the useDataSource hook to provide features only releated to data collection like: Bulk actions, summary, navigation filters, etc.
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the typo "releated" → "related" in the top-level comment to keep public-facing documentation clean.

Suggested change
* This hooks extends the useDataSource hook to provide features only releated to data collection like: Bulk actions, summary, navigation filters, etc.
* This hooks extends the useDataSource hook to provide features only related to data collection like: Bulk actions, summary, navigation filters, etc.

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +33
{primaryItemActions.map((action) => (
<F0Button
key={action.label}
label={action.label}
variant="outline"
onClick={action.onClick}
icon={action.icon}
/>
))}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using action.label as the React key can cause key collisions if two actions share the same label (which can lead to incorrect reconciliation). Prefer a stable unique identifier (e.g., an id field) or fall back to a composite key (like label + index) if no id exists.

Copilot uses AI. Check for mistakes.
…sections

- Create src/kits/ with Charts, F0DataChart, and WidgetCharts submodules
- Add src/kits.ts entry point and vite.config.ts kits build entry
- Move all chart stories under __stories__/ subdirectories
- Update story titles: charts → Kits/, navigation/data-collection → Patterns/
- Deprecate original chart exports with backward-compatible re-exports
- Update .storybook/main.ts to use single kits titlePrefix directory
- Add components/experimental/patterns/kits to storySort topLevelOrder
- Fix pre-existing display-name lint error in .storybook/preview.tsx
- Exempt src/kits.ts from barrel-import lint rule in .oxlintrc.json
…rns/

- Create src/patterns/ with Navigation, DataCollection, DateNavigator
- Add src/patterns.ts entry point and vite.config.ts patterns build entry
- Add src/patterns/ to .storybook/main.ts with titlePrefix: "" so stories
  use their own title field (Patterns/Navigation/..., etc.)
- Fix broken relative imports pointing outside patterns/ to use @/experimental/
- Deprecate original exports in experimental/Navigation, experimental/OneDataCollection,
  experimental/OneDateNavigator with re-exports to patterns/ canonical location
- Exempt src/patterns.ts from barrel-import lint rule in .oxlintrc.json
Delete all .stories.tsx and .mdx files from experimental/Navigation,
experimental/OneDataCollection, and experimental/OneDateNavigator — the
canonical stories now live in src/patterns/. Update the two files that
imported the deleted Navigation/Page stories to use @/patterns instead.
- useLegendInteraction: add isProgrammaticRef guard to prevent
  re-entrant legendselectchanged handler from own dispatchAction calls
- useAxisLabelTooltip: save and restore container.style.position on
  cleanup instead of unconditionally overwriting it
- PieChart: add initial accumulator to reduce, use safeSum denominator
  to avoid NaN in aria-label percentage when sum is 0
- CategoryBarChart: early-return null when total <= 0 to avoid NaN%
  segment widths and tooltip values
- ProgressChart: guard max <= 0 and clamp percentage to [0, 100] so
  Progress never receives a non-finite value
- useHeatmapChartOptions: wire showVisualMap prop to visualMap.show
  (was hard-coded false, making the prop a no-op)
All 22 MDX files with explicit <Meta title="..."> were missing the
Patterns/ prefix, causing those docs pages to appear under separate
top-level sections ("Data collection", "DateNavigator") instead of
under the Patterns section. Fixes Storybook Patterns section not
showing correctly.
… in story files

Let Storybook's titlePrefix do the work. Removes manual 'Patterns/'
prefix from all title fields in .stories.tsx and <Meta title> in .mdx
files under src/patterns, keeping the files clean and decoupled from
the sidebar section name.
- Set titlePrefix: 'Kits' for src/kits in .storybook/main.ts so
  Storybook handles the section prefix automatically
- Strip 'Kits/' prefix from all title fields in src/kits/**/*.stories.tsx
- Delete 34 legacy redirect story files in src/components and
  src/experimental that had title: 'Kits/...' to point at canonical kits
- Update Dashboard, WidgetStrip, HomeLayout, and Carousel stories to
  import story args from the canonical src/kits/ paths
The expected structure under Kits is:
- Kits/Charts/...
- Kits/F0DataChart/...
- Kits/Widget/Charts/...

'Widgets' (plural) was incorrect — updated all 7 WidgetCharts stories.
@eliseo-juan eliseo-juan force-pushed the refactor/storybook-reorganize-kits-patterns-experimental branch from feeff86 to d483d33 Compare April 1, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

react Changes affect packages/react refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants