Commit a2d92e9
Charts: Fix Line Chart Annotations Custom story error in Storybook (#47990)
* Charts: Replace gridicons with inline SVG to fix Storybook Vite transform error
The gridicons package is CJS-only, which causes Vite's CJS-to-ESM interop
in Storybook to fail when resolving the default export. This results in
Gridicon being treated as an object instead of a React component, throwing
'Element type is invalid... got: object' in LineChartAnnotationLabelWithPopover.
Replace the single Gridicon usage (cross icon in popover close button) with
an inline SVG component using the same path data. This eliminates the
CJS interop issue and also removes the gridicons dependency (~106KB) from
the charts package.
Ref CHARTS-208
* Add changelog entry for CHARTS-208 fix
* Charts: Use @wordpress/icons instead of inline SVG for close icon
Replace the inline CloseIcon SVG with the close icon from @wordpress/icons
to align with WordPress ecosystem conventions. The package is tree-shakeable
and already used widely across the monorepo.
* Update changelog entry to reflect @wordpress/icons usage
* Update changelog
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/24167983418
Upstream-Ref: Automattic/jetpack@0b78e641 parent 7086206 commit a2d92e9
File tree
7 files changed
+16
-15
lines changed- dist
- src/charts/line-chart/private
7 files changed
+16
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6926 | 6926 | | |
6927 | 6927 | | |
6928 | 6928 | | |
| 6929 | + | |
6929 | 6930 | | |
6930 | | - | |
6931 | 6931 | | |
6932 | 6932 | | |
6933 | 6933 | | |
| |||
7000 | 7000 | | |
7001 | 7001 | | |
7002 | 7002 | | |
7003 | | - | |
7004 | | - | |
| 7003 | + | |
| 7004 | + | |
7005 | 7005 | | |
7006 | 7006 | | |
7007 | 7007 | | |
| |||
8822 | 8822 | | |
8823 | 8823 | | |
8824 | 8824 | | |
8825 | | - | |
| 8825 | + | |
8826 | 8826 | | |
8827 | 8827 | | |
8828 | 8828 | | |
| |||
8855 | 8855 | | |
8856 | 8856 | | |
8857 | 8857 | | |
8858 | | - | |
| 8858 | + | |
8859 | 8859 | | |
8860 | 8860 | | |
8861 | 8861 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
0 commit comments