Export bar-geometry constants from the Chart barrel - #134
Open
jamesxu-lightspark wants to merge 1 commit into
Open
Export bar-geometry constants from the Chart barrel#134jamesxu-lightspark wants to merge 1 commit into
jamesxu-lightspark wants to merge 1 commit into
Conversation
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 SummaryThis 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.
Confidence Score: 5/5The 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.
|
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Exports
BAR_GROUP_GAPandBAR_ITEM_GAPfrom the Chart barrel (with one-line docs), making Origin's bar geometry consumable asChart.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 packageexportsmap 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