From 9c287d25507d042a0eb5e154ae814ec28e3efc9d Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Mon, 21 Oct 2024 12:48:13 -0400 Subject: [PATCH] fix(charts): update font-family https://github.com/patternfly/patternfly-react/issues/11116 --- .../Chart/__snapshots__/Chart.test.tsx.snap | 62 +++++++++---------- .../__snapshots__/ChartAxis.test.tsx.snap | 36 +++++------ .../__snapshots__/ChartBar.test.tsx.snap | 16 ++--- .../__snapshots__/ChartBoxPlot.test.tsx.snap | 18 +++--- .../ChartBoxPlot/examples/ChartBoxPlot.md | 2 +- .../__snapshots__/ChartBullet.test.tsx.snap | 14 ++--- .../ChartContainer.test.tsx.snap | 6 +- .../__snapshots__/ChartLegend.test.tsx.snap | 14 ++--- .../ChartLegendTooltip.test.tsx.snap | 22 +++---- .../__snapshots__/ChartLine.test.tsx.snap | 22 +++---- .../__snapshots__/ChartPoint.test.tsx.snap | 14 ++--- .../__snapshots__/ChartScatter.test.tsx.snap | 28 ++++----- .../__snapshots__/ChartStack.test.tsx.snap | 18 +++--- .../ChartTheme/themes/base-theme.ts | 4 +- .../ChartThreshold.test.tsx.snap | 22 +++---- .../ChartTooltip/examples/ChartTooltip.md | 2 +- 16 files changed, 150 insertions(+), 150 deletions(-) diff --git a/packages/react-charts/src/victory/components/Chart/__snapshots__/Chart.test.tsx.snap b/packages/react-charts/src/victory/components/Chart/__snapshots__/Chart.test.tsx.snap index 2f7a44f4d3c..399b97d88d5 100644 --- a/packages/react-charts/src/victory/components/Chart/__snapshots__/Chart.test.tsx.snap +++ b/packages/react-charts/src/victory/components/Chart/__snapshots__/Chart.test.tsx.snap @@ -49,7 +49,7 @@ exports[`Chart 1`] = ` @@ -80,7 +80,7 @@ exports[`Chart 1`] = ` @@ -111,7 +111,7 @@ exports[`Chart 1`] = ` @@ -142,7 +142,7 @@ exports[`Chart 1`] = ` @@ -173,7 +173,7 @@ exports[`Chart 1`] = ` @@ -218,7 +218,7 @@ exports[`Chart 1`] = ` @@ -249,7 +249,7 @@ exports[`Chart 1`] = ` @@ -280,7 +280,7 @@ exports[`Chart 1`] = ` @@ -311,7 +311,7 @@ exports[`Chart 1`] = ` @@ -342,7 +342,7 @@ exports[`Chart 1`] = ` @@ -415,7 +415,7 @@ exports[`Chart 2`] = ` @@ -446,7 +446,7 @@ exports[`Chart 2`] = ` @@ -477,7 +477,7 @@ exports[`Chart 2`] = ` @@ -508,7 +508,7 @@ exports[`Chart 2`] = ` @@ -539,7 +539,7 @@ exports[`Chart 2`] = ` @@ -584,7 +584,7 @@ exports[`Chart 2`] = ` @@ -615,7 +615,7 @@ exports[`Chart 2`] = ` @@ -646,7 +646,7 @@ exports[`Chart 2`] = ` @@ -677,7 +677,7 @@ exports[`Chart 2`] = ` @@ -708,7 +708,7 @@ exports[`Chart 2`] = ` @@ -879,7 +879,7 @@ exports[`renders axis and component children 1`] = ` @@ -910,7 +910,7 @@ exports[`renders axis and component children 1`] = ` @@ -941,7 +941,7 @@ exports[`renders axis and component children 1`] = ` @@ -972,7 +972,7 @@ exports[`renders axis and component children 1`] = ` @@ -1003,7 +1003,7 @@ exports[`renders axis and component children 1`] = ` @@ -1034,7 +1034,7 @@ exports[`renders axis and component children 1`] = ` @@ -1065,7 +1065,7 @@ exports[`renders axis and component children 1`] = ` @@ -1110,7 +1110,7 @@ exports[`renders axis and component children 1`] = ` @@ -1141,7 +1141,7 @@ exports[`renders axis and component children 1`] = ` @@ -1172,7 +1172,7 @@ exports[`renders axis and component children 1`] = ` @@ -1203,7 +1203,7 @@ exports[`renders axis and component children 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap b/packages/react-charts/src/victory/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap index 9d63fdfa12c..1b9c5e4545a 100644 --- a/packages/react-charts/src/victory/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartAxis/__snapshots__/ChartAxis.test.tsx.snap @@ -46,7 +46,7 @@ exports[`ChartAxis 1`] = ` @@ -77,7 +77,7 @@ exports[`ChartAxis 1`] = ` @@ -108,7 +108,7 @@ exports[`ChartAxis 1`] = ` @@ -139,7 +139,7 @@ exports[`ChartAxis 1`] = ` @@ -170,7 +170,7 @@ exports[`ChartAxis 1`] = ` @@ -201,7 +201,7 @@ exports[`ChartAxis 1`] = ` @@ -270,7 +270,7 @@ exports[`ChartAxis 2`] = ` @@ -301,7 +301,7 @@ exports[`ChartAxis 2`] = ` @@ -332,7 +332,7 @@ exports[`ChartAxis 2`] = ` @@ -363,7 +363,7 @@ exports[`ChartAxis 2`] = ` @@ -394,7 +394,7 @@ exports[`ChartAxis 2`] = ` @@ -425,7 +425,7 @@ exports[`ChartAxis 2`] = ` @@ -595,7 +595,7 @@ exports[`renders component data 1`] = ` @@ -626,7 +626,7 @@ exports[`renders component data 1`] = ` @@ -657,7 +657,7 @@ exports[`renders component data 1`] = ` @@ -702,7 +702,7 @@ exports[`renders component data 1`] = ` @@ -733,7 +733,7 @@ exports[`renders component data 1`] = ` @@ -764,7 +764,7 @@ exports[`renders component data 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap b/packages/react-charts/src/victory/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap index 93022e5629a..2be439c1caa 100644 --- a/packages/react-charts/src/victory/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartBar/__snapshots__/ChartBar.test.tsx.snap @@ -491,7 +491,7 @@ A 0 0 0 0 1, 246.5, 150 @@ -522,7 +522,7 @@ A 0 0 0 0 1, 246.5, 150 @@ -553,7 +553,7 @@ A 0 0 0 0 1, 246.5, 150 @@ -584,7 +584,7 @@ A 0 0 0 0 1, 246.5, 150 @@ -629,7 +629,7 @@ A 0 0 0 0 1, 246.5, 150 @@ -660,7 +660,7 @@ A 0 0 0 0 1, 246.5, 150 @@ -691,7 +691,7 @@ A 0 0 0 0 1, 246.5, 150 @@ -722,7 +722,7 @@ A 0 0 0 0 1, 246.5, 150 diff --git a/packages/react-charts/src/victory/components/ChartBoxPlot/__snapshots__/ChartBoxPlot.test.tsx.snap b/packages/react-charts/src/victory/components/ChartBoxPlot/__snapshots__/ChartBoxPlot.test.tsx.snap index a5fe7944808..c35a6de7347 100644 --- a/packages/react-charts/src/victory/components/ChartBoxPlot/__snapshots__/ChartBoxPlot.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartBoxPlot/__snapshots__/ChartBoxPlot.test.tsx.snap @@ -709,7 +709,7 @@ exports[`renders component data 1`] = ` @@ -740,7 +740,7 @@ exports[`renders component data 1`] = ` @@ -771,7 +771,7 @@ exports[`renders component data 1`] = ` @@ -802,7 +802,7 @@ exports[`renders component data 1`] = ` @@ -847,7 +847,7 @@ exports[`renders component data 1`] = ` @@ -878,7 +878,7 @@ exports[`renders component data 1`] = ` @@ -909,7 +909,7 @@ exports[`renders component data 1`] = ` @@ -940,7 +940,7 @@ exports[`renders component data 1`] = ` @@ -971,7 +971,7 @@ exports[`renders component data 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartBoxPlot/examples/ChartBoxPlot.md b/packages/react-charts/src/victory/components/ChartBoxPlot/examples/ChartBoxPlot.md index b54a7690896..f576317d989 100644 --- a/packages/react-charts/src/victory/components/ChartBoxPlot/examples/ChartBoxPlot.md +++ b/packages/react-charts/src/victory/components/ChartBoxPlot/examples/ChartBoxPlot.md @@ -224,7 +224,7 @@ class EmbeddedHtml extends React.Component { super(props); this.baseStyles = { color: '#f0f0f0', - fontFamily: 'RedHatText, Overpass, overpass, helvetica, arial, sans-serif', + fontFamily: '"Red Hat Text", "RedHatText", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans JP", "Noto Sans KR", "Noto Sans Malayalam", "Noto Sans SC", "Noto Sans TC", "Noto Sans Thai", Helvetica, Arial, sans-serif', fontSize: '14px' }; this.leftColumn = { diff --git a/packages/react-charts/src/victory/components/ChartBullet/__snapshots__/ChartBullet.test.tsx.snap b/packages/react-charts/src/victory/components/ChartBullet/__snapshots__/ChartBullet.test.tsx.snap index 35959e4a231..9bd4b9b3e52 100644 --- a/packages/react-charts/src/victory/components/ChartBullet/__snapshots__/ChartBullet.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartBullet/__snapshots__/ChartBullet.test.tsx.snap @@ -49,7 +49,7 @@ exports[`ChartBulletQualitativeRange 1`] = ` @@ -134,7 +134,7 @@ exports[`ChartBulletQualitativeRange 2`] = ` @@ -231,7 +231,7 @@ exports[`renders component data 1`] = ` @@ -262,7 +262,7 @@ exports[`renders component data 1`] = ` @@ -293,7 +293,7 @@ exports[`renders component data 1`] = ` @@ -324,7 +324,7 @@ exports[`renders component data 1`] = ` @@ -355,7 +355,7 @@ exports[`renders component data 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap b/packages/react-charts/src/victory/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap index 98534af88aa..aa3d2e741aa 100644 --- a/packages/react-charts/src/victory/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap @@ -98,7 +98,7 @@ exports[`renders container via ChartLegend 1`] = ` @@ -115,7 +115,7 @@ exports[`renders container via ChartLegend 1`] = ` @@ -132,7 +132,7 @@ exports[`renders container via ChartLegend 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap b/packages/react-charts/src/victory/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap index 52ecc575645..b63520fdaf6 100644 --- a/packages/react-charts/src/victory/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap @@ -53,7 +53,7 @@ exports[`ChartLegend 1`] = ` @@ -70,7 +70,7 @@ exports[`ChartLegend 1`] = ` @@ -145,7 +145,7 @@ exports[`ChartLegend 2`] = ` @@ -162,7 +162,7 @@ exports[`ChartLegend 2`] = ` @@ -237,7 +237,7 @@ exports[`renders component data 1`] = ` @@ -254,7 +254,7 @@ exports[`renders component data 1`] = ` @@ -271,7 +271,7 @@ exports[`renders component data 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap b/packages/react-charts/src/victory/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap index 97be52c4df5..1a7a1fe9973 100644 --- a/packages/react-charts/src/victory/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap @@ -59,7 +59,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -90,7 +90,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -121,7 +121,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -152,7 +152,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -207,7 +207,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -248,7 +248,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -289,7 +289,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -467,7 +467,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -484,7 +484,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -501,7 +501,7 @@ exports[`allows tooltip via container component 1`] = ` @@ -518,7 +518,7 @@ exports[`allows tooltip via container component 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartLine/__snapshots__/ChartLine.test.tsx.snap b/packages/react-charts/src/victory/components/ChartLine/__snapshots__/ChartLine.test.tsx.snap index cdd3838d42b..e85594e6893 100644 --- a/packages/react-charts/src/victory/components/ChartLine/__snapshots__/ChartLine.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartLine/__snapshots__/ChartLine.test.tsx.snap @@ -251,7 +251,7 @@ exports[`renders component data 1`] = ` @@ -282,7 +282,7 @@ exports[`renders component data 1`] = ` @@ -313,7 +313,7 @@ exports[`renders component data 1`] = ` @@ -344,7 +344,7 @@ exports[`renders component data 1`] = ` @@ -375,7 +375,7 @@ exports[`renders component data 1`] = ` @@ -406,7 +406,7 @@ exports[`renders component data 1`] = ` @@ -437,7 +437,7 @@ exports[`renders component data 1`] = ` @@ -482,7 +482,7 @@ exports[`renders component data 1`] = ` @@ -513,7 +513,7 @@ exports[`renders component data 1`] = ` @@ -544,7 +544,7 @@ exports[`renders component data 1`] = ` @@ -575,7 +575,7 @@ exports[`renders component data 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap b/packages/react-charts/src/victory/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap index 406bb853093..11bf469294c 100644 --- a/packages/react-charts/src/victory/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap @@ -53,7 +53,7 @@ exports[`ChartPoint 1`] = ` @@ -70,7 +70,7 @@ exports[`ChartPoint 1`] = ` @@ -145,7 +145,7 @@ exports[`ChartPoint 2`] = ` @@ -162,7 +162,7 @@ exports[`ChartPoint 2`] = ` @@ -247,7 +247,7 @@ exports[`renders component data 1`] = ` @@ -264,7 +264,7 @@ exports[`renders component data 1`] = ` @@ -281,7 +281,7 @@ exports[`renders component data 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartScatter/__snapshots__/ChartScatter.test.tsx.snap b/packages/react-charts/src/victory/components/ChartScatter/__snapshots__/ChartScatter.test.tsx.snap index df3cb5869c0..97c857766e8 100644 --- a/packages/react-charts/src/victory/components/ChartScatter/__snapshots__/ChartScatter.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartScatter/__snapshots__/ChartScatter.test.tsx.snap @@ -1181,7 +1181,7 @@ exports[`renders component data 1`] = ` @@ -1212,7 +1212,7 @@ exports[`renders component data 1`] = ` @@ -1243,7 +1243,7 @@ exports[`renders component data 1`] = ` @@ -1274,7 +1274,7 @@ exports[`renders component data 1`] = ` @@ -1305,7 +1305,7 @@ exports[`renders component data 1`] = ` @@ -1336,7 +1336,7 @@ exports[`renders component data 1`] = ` @@ -1367,7 +1367,7 @@ exports[`renders component data 1`] = ` @@ -1412,7 +1412,7 @@ exports[`renders component data 1`] = ` @@ -1443,7 +1443,7 @@ exports[`renders component data 1`] = ` @@ -1474,7 +1474,7 @@ exports[`renders component data 1`] = ` @@ -1505,7 +1505,7 @@ exports[`renders component data 1`] = ` @@ -1536,7 +1536,7 @@ exports[`renders component data 1`] = ` @@ -1567,7 +1567,7 @@ exports[`renders component data 1`] = ` @@ -1598,7 +1598,7 @@ exports[`renders component data 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartStack/__snapshots__/ChartStack.test.tsx.snap b/packages/react-charts/src/victory/components/ChartStack/__snapshots__/ChartStack.test.tsx.snap index 2f3bc5c5008..e78ea341416 100644 --- a/packages/react-charts/src/victory/components/ChartStack/__snapshots__/ChartStack.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartStack/__snapshots__/ChartStack.test.tsx.snap @@ -361,7 +361,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 @@ -392,7 +392,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 @@ -423,7 +423,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 @@ -454,7 +454,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 @@ -499,7 +499,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 @@ -530,7 +530,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 @@ -561,7 +561,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 @@ -592,7 +592,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 @@ -623,7 +623,7 @@ A 0 0 0 0 1, 229.99999999999997, 150 diff --git a/packages/react-charts/src/victory/components/ChartTheme/themes/base-theme.ts b/packages/react-charts/src/victory/components/ChartTheme/themes/base-theme.ts index 03f1615522f..0190f902453 100644 --- a/packages/react-charts/src/victory/components/ChartTheme/themes/base-theme.ts +++ b/packages/react-charts/src/victory/components/ChartTheme/themes/base-theme.ts @@ -125,8 +125,8 @@ import { ChartComponentThemeDefinition, ChartThemeDefinition } from '../ChartThe // Typography // // Note: Victory's approximateTextSize function uses specific character widths and does not work with font variables -// See https://github.com/patternfly/patternfly-react/issues/5300 -const TYPOGRAPHY_FONT_FAMILY = chart_global_FontFamily.value.replace(/ /g, ''); +// See https://github.com/patternfly/patternfly-react/issues/5300 and https://github.com/patternfly/patternfly-react/pull/5301 +const TYPOGRAPHY_FONT_FAMILY = chart_global_FontFamily.value; const TYPOGRAPHY_LETTER_SPACING = chart_global_letter_spacing.value; const TYPOGRAPHY_FONT_SIZE = chart_global_FontSize_sm.value; diff --git a/packages/react-charts/src/victory/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap b/packages/react-charts/src/victory/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap index b5c5bc8fa33..9d4b72ac769 100644 --- a/packages/react-charts/src/victory/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap +++ b/packages/react-charts/src/victory/components/ChartThreshold/__snapshots__/ChartThreshold.test.tsx.snap @@ -179,7 +179,7 @@ exports[`renders component data 1`] = ` @@ -210,7 +210,7 @@ exports[`renders component data 1`] = ` @@ -241,7 +241,7 @@ exports[`renders component data 1`] = ` @@ -272,7 +272,7 @@ exports[`renders component data 1`] = ` @@ -303,7 +303,7 @@ exports[`renders component data 1`] = ` @@ -348,7 +348,7 @@ exports[`renders component data 1`] = ` @@ -379,7 +379,7 @@ exports[`renders component data 1`] = ` @@ -410,7 +410,7 @@ exports[`renders component data 1`] = ` @@ -441,7 +441,7 @@ exports[`renders component data 1`] = ` @@ -472,7 +472,7 @@ exports[`renders component data 1`] = ` @@ -503,7 +503,7 @@ exports[`renders component data 1`] = ` diff --git a/packages/react-charts/src/victory/components/ChartTooltip/examples/ChartTooltip.md b/packages/react-charts/src/victory/components/ChartTooltip/examples/ChartTooltip.md index eceab742288..a36a1ee6c24 100644 --- a/packages/react-charts/src/victory/components/ChartTooltip/examples/ChartTooltip.md +++ b/packages/react-charts/src/victory/components/ChartTooltip/examples/ChartTooltip.md @@ -303,7 +303,7 @@ class EmbeddedHtml extends React.Component { super(props); this.baseStyles = { color: '#f0f0f0', - fontFamily: 'RedHatText, Overpass, overpass, helvetica, arial, sans-serif', + fontFamily: '"Red Hat Text", "RedHatText", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans JP", "Noto Sans KR", "Noto Sans Malayalam", "Noto Sans SC", "Noto Sans TC", "Noto Sans Thai", Helvetica, Arial, sans-serif', fontSize: '14px' }; }