From d9162e1b0e6f2c839a3a09574c9614216936489b Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Tue, 9 Jan 2018 16:35:05 -0500 Subject: [PATCH 1/2] Set viewBox for icons that have not set it This sets the viewBox for SVG files that did not already have it set, which was stopping them from being resized properly in Chrome. --- src/components/icon/assets/asterisk.svg | 2 +- src/components/icon/assets/calendar.svg | 2 +- src/components/icon/assets/checkInCircleFilled.svg | 2 +- src/components/icon/assets/exit.svg | 2 +- src/components/icon/assets/expand.svg | 2 +- src/components/icon/assets/faceNeutral.svg | 2 +- src/components/icon/assets/iInCircle.svg | 2 +- src/components/icon/assets/number.svg | 2 +- src/components/icon/assets/pause.svg | 2 +- src/components/icon/assets/play.svg | 2 +- src/components/icon/assets/popout.svg | 2 +- src/components/icon/assets/refresh.svg | 2 +- src/components/icon/assets/scale.svg | 2 +- src/components/icon/assets/share.svg | 2 +- src/components/icon/assets/sortLeft.svg | 2 +- src/components/icon/assets/sortRight.svg | 2 +- src/components/icon/assets/starPlusFilled.svg | 2 +- src/components/icon/assets/string.svg | 2 +- src/components/icon/assets/tableOfContents.svg | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/components/icon/assets/asterisk.svg b/src/components/icon/assets/asterisk.svg index 2af0db19e6e..9f3360e9ad6 100644 --- a/src/components/icon/assets/asterisk.svg +++ b/src/components/icon/assets/asterisk.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/calendar.svg b/src/components/icon/assets/calendar.svg index 9ddc7c5ca32..7d4c1a52219 100644 --- a/src/components/icon/assets/calendar.svg +++ b/src/components/icon/assets/calendar.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/checkInCircleFilled.svg b/src/components/icon/assets/checkInCircleFilled.svg index 8d4d72bfcb3..05687866e4c 100644 --- a/src/components/icon/assets/checkInCircleFilled.svg +++ b/src/components/icon/assets/checkInCircleFilled.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/exit.svg b/src/components/icon/assets/exit.svg index df20dbf0aeb..1da9276e67b 100644 --- a/src/components/icon/assets/exit.svg +++ b/src/components/icon/assets/exit.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/expand.svg b/src/components/icon/assets/expand.svg index c2238433725..9afe352aee4 100644 --- a/src/components/icon/assets/expand.svg +++ b/src/components/icon/assets/expand.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/faceNeutral.svg b/src/components/icon/assets/faceNeutral.svg index a97b048d450..bac3b919082 100644 --- a/src/components/icon/assets/faceNeutral.svg +++ b/src/components/icon/assets/faceNeutral.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/iInCircle.svg b/src/components/icon/assets/iInCircle.svg index 3425dfd279b..81b0b64698b 100644 --- a/src/components/icon/assets/iInCircle.svg +++ b/src/components/icon/assets/iInCircle.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/number.svg b/src/components/icon/assets/number.svg index fce4ffd26d3..2f90f9c685f 100644 --- a/src/components/icon/assets/number.svg +++ b/src/components/icon/assets/number.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/pause.svg b/src/components/icon/assets/pause.svg index 0a3821003dd..d157e748a56 100644 --- a/src/components/icon/assets/pause.svg +++ b/src/components/icon/assets/pause.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/play.svg b/src/components/icon/assets/play.svg index 75e356b641c..632477c5f68 100644 --- a/src/components/icon/assets/play.svg +++ b/src/components/icon/assets/play.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/popout.svg b/src/components/icon/assets/popout.svg index 3ccaeddcbb2..8dc9be4f69a 100644 --- a/src/components/icon/assets/popout.svg +++ b/src/components/icon/assets/popout.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/refresh.svg b/src/components/icon/assets/refresh.svg index 60de7dac974..51cd5ca68ac 100644 --- a/src/components/icon/assets/refresh.svg +++ b/src/components/icon/assets/refresh.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/scale.svg b/src/components/icon/assets/scale.svg index b6347d821e2..e61136a089b 100644 --- a/src/components/icon/assets/scale.svg +++ b/src/components/icon/assets/scale.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/share.svg b/src/components/icon/assets/share.svg index 3b8ef95f1d7..a8fda26a9af 100644 --- a/src/components/icon/assets/share.svg +++ b/src/components/icon/assets/share.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/sortLeft.svg b/src/components/icon/assets/sortLeft.svg index f402d9bb2e1..e99b050bf9b 100644 --- a/src/components/icon/assets/sortLeft.svg +++ b/src/components/icon/assets/sortLeft.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/sortRight.svg b/src/components/icon/assets/sortRight.svg index 7314b6fa9de..eceaf076d70 100644 --- a/src/components/icon/assets/sortRight.svg +++ b/src/components/icon/assets/sortRight.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/starPlusFilled.svg b/src/components/icon/assets/starPlusFilled.svg index 2d83ea27d05..0e9c5b0ad50 100644 --- a/src/components/icon/assets/starPlusFilled.svg +++ b/src/components/icon/assets/starPlusFilled.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/string.svg b/src/components/icon/assets/string.svg index 017b09f3bfd..db8066c1133 100644 --- a/src/components/icon/assets/string.svg +++ b/src/components/icon/assets/string.svg @@ -1,3 +1,3 @@ - + diff --git a/src/components/icon/assets/tableOfContents.svg b/src/components/icon/assets/tableOfContents.svg index 1098a979eaa..9f4ccf374d6 100644 --- a/src/components/icon/assets/tableOfContents.svg +++ b/src/components/icon/assets/tableOfContents.svg @@ -1,3 +1,3 @@ - + From 8e2cafd7e13a7ed8b2e55b003b66407923f96a89 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Wed, 10 Jan 2018 12:45:00 -0500 Subject: [PATCH 2/2] Update test snapshots with viewBox --- .../__snapshots__/_code_block.test.js.snap | 3 +++ .../__snapshots__/code_block.test.js.snap | 1 + .../icon/__snapshots__/icon.test.js.snap | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/src/components/code/__snapshots__/_code_block.test.js.snap b/src/components/code/__snapshots__/_code_block.test.js.snap index 8e0867adb39..97d3b97b850 100644 --- a/src/components/code/__snapshots__/_code_block.test.js.snap +++ b/src/components/code/__snapshots__/_code_block.test.js.snap @@ -20,6 +20,7 @@ exports[`EuiCodeBlockImpl block highlights javascript code, adding "js" class 1` aria-hidden="true" class="euiIcon euiButtonIcon__icon euiIcon--medium" height="16" + viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" > @@ -57,6 +58,7 @@ console.log(some); aria-hidden="true" class="euiIcon euiButtonIcon__icon euiIcon--medium" height="16" + viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" > @@ -89,6 +91,7 @@ exports[`EuiCodeBlockImpl block renders with transparent background 1`] = ` aria-hidden="true" class="euiIcon euiButtonIcon__icon euiIcon--medium" height="16" + viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" > diff --git a/src/components/code/__snapshots__/code_block.test.js.snap b/src/components/code/__snapshots__/code_block.test.js.snap index b8b4f5c3623..dbfa7a3b826 100644 --- a/src/components/code/__snapshots__/code_block.test.js.snap +++ b/src/components/code/__snapshots__/code_block.test.js.snap @@ -25,6 +25,7 @@ console.log(some); aria-hidden="true" class="euiIcon euiButtonIcon__icon euiIcon--medium" height="16" + viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" > diff --git a/src/components/icon/__snapshots__/icon.test.js.snap b/src/components/icon/__snapshots__/icon.test.js.snap index 685ebcf8308..a6e7d330a70 100644 --- a/src/components/icon/__snapshots__/icon.test.js.snap +++ b/src/components/icon/__snapshots__/icon.test.js.snap @@ -454,6 +454,7 @@ exports[`EuiIcon renders type asterisk 1`] = ` @@ -572,6 +573,7 @@ exports[`EuiIcon renders type calendar 1`] = ` @@ -607,6 +609,7 @@ exports[`EuiIcon renders type checkInCircleFilled 1`] = ` @@ -963,6 +966,7 @@ exports[`EuiIcon renders type exit 1`] = ` @@ -977,6 +981,7 @@ exports[`EuiIcon renders type expand 1`] = ` @@ -1005,6 +1010,7 @@ exports[`EuiIcon renders type faceNeutral 1`] = ` @@ -1170,6 +1176,7 @@ exports[`EuiIcon renders type iInCircle 1`] = ` @@ -2117,6 +2124,7 @@ exports[`EuiIcon renders type number 1`] = ` @@ -2131,6 +2139,7 @@ exports[`EuiIcon renders type pause 1`] = ` @@ -2239,6 +2248,7 @@ exports[`EuiIcon renders type play 1`] = ` @@ -2273,6 +2283,7 @@ exports[`EuiIcon renders type popout 1`] = ` @@ -2304,6 +2315,7 @@ exports[`EuiIcon renders type refresh 1`] = ` @@ -2394,6 +2406,7 @@ exports[`EuiIcon renders type scale 1`] = ` @@ -2496,6 +2509,7 @@ exports[`EuiIcon renders type share 1`] = ` @@ -2532,6 +2546,7 @@ exports[`EuiIcon renders type sortLeft 1`] = ` @@ -2545,6 +2560,7 @@ exports[`EuiIcon renders type sortRight 1`] = ` @@ -2601,6 +2617,7 @@ exports[`EuiIcon renders type starPlusFilled 1`] = ` @@ -2615,6 +2632,7 @@ exports[`EuiIcon renders type string 1`] = ` @@ -2629,6 +2647,7 @@ exports[`EuiIcon renders type tableOfContents 1`] = `