Skip to content

Export bar-geometry constants from the Chart barrel - #134

Open
jamesxu-lightspark wants to merge 1 commit into
mainfrom
export-chart-geometry
Open

Export bar-geometry constants from the Chart barrel#134
jamesxu-lightspark wants to merge 1 commit into
mainfrom
export-chart-geometry

Conversation

@jamesxu-lightspark

Copy link
Copy Markdown

What

Exports BAR_GROUP_GAP and BAR_ITEM_GAP from the Chart barrel (with one-line docs), making Origin's bar geometry consumable as Chart.BAR_GROUP_GAP.

Why

Lighthouse's ECharts theme bridge skins ECharts to look like Origin. Colors/typography already resolve live from Origin's CSS tokens, but the bar geometry has to be mirrored as literals (barCategoryGap: "12%") because these constants aren't exported and the package exports map blocks deep imports — so they drift silently if Origin retunes its geometry. Tracked in lightsparkdev/analytics#3512.

Export-only change: no behavior, no new code paths.

🤖 Generated with Claude Code

Consumers skinning other renderers to match Origin (Lighthouse's ECharts
bridge) currently mirror BAR_GROUP_GAP/BAR_ITEM_GAP as literals that drift
silently if the geometry is retuned. The package exports map blocks deep
imports, so the barrel is the only consumable path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR exposes the existing bar-geometry constants through the public Chart namespace so downstream themes can consume Origin’s canonical values instead of mirroring literals.

  • Re-exports BAR_GROUP_GAP and BAR_ITEM_GAP from the Chart barrel.
  • Documents the units and meaning of both constants.

Confidence Score: 5/5

The PR appears safe to merge with no actionable issues identified.

The additive barrel exports resolve through the existing public Chart namespace, while the documented constants retain their existing values and internal behavior.

Important Files Changed

Filename Overview
src/components/Chart/index.ts Adds the two existing geometry constants to the Chart barrel without introducing an export collision or dependency cycle.
src/components/Chart/types.ts Adds accurate one-line documentation to the unchanged bar-gap constants.

Reviews (1): Last reviewed commit: "Export bar-geometry constants from the C..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant