Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update EUI and add autoprefixer #267

Merged
merged 2 commits into from
Jul 30, 2019
Merged

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Jul 17, 2019

Summary

This PR updates EUI to the latest version 12.3.1 fixing the legend shadow problem described in #249

before
Screenshot 2019-07-17 at 15 13 12

after
Screenshot 2019-07-17 at 15 10 52

Test
Change the playground background color of #root to a different color than white on the index.html file. Add a set of lines series to have a scrolling legend to notice the effect:

{
  new Array(60).fill(0).map((d,i) => <LineSeries
    id={getSpecId('dataset ' + i)}
    key={i}
    xScaleType={ScaleType.Time}
    yScaleType={ScaleType.Linear}
    data={KIBANA_METRICS.metrics.kibana_os_load[1].data.slice(0, 15)}
    xAccessor={0}
    yAccessors={[1]}
    stackAccessors={[0]}
  />)
}

Minor issue unsolved:
The PR add the missing autoprefixer plugin for postcss to enable prefixing css styles like mask-image. It works correctly on the playground and on built bundle (I've checked the compiled css code and seems that all the required styles are correctly prefixed). The missing task is to add the autoprefixer on storybook: @nickofthyme @emmacunningham or @chandlerprall do you have any idea on what I'm doing wrong here?

fix #249

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

  • [ ] Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • This was checked for cross-browser compatibility, including a check against IE11
    note: mask-image used on the legend shadow is not available in IE11. it gracefully fallback to a legend without that shadow
  • [ ] Proper documentation or storybook story was added for features that require explanation or tutorials
  • [ ] Unit tests were updated or added to match the most common scenarios
  • Each commit follows the convention

@codecov-io
Copy link

codecov-io commented Jul 17, 2019

Codecov Report

Merging #267 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #267   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files          37       37           
  Lines        2671     2671           
  Branches      613      628   +15     
=======================================
  Hits         2619     2619           
  Misses         47       47           
  Partials        5        5
Impacted Files Coverage Δ
src/specs/settings.tsx 96.34% <ø> (ø) ⬆️
src/chart_types/xy_chart/store/chart_state.ts 97.44% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ebe600...4a5b45a. Read the comment docs.

@nickofthyme
Copy link
Collaborator

It looks to me like the autoprefixer is working in storybook. 🤔

I changed .storybook/styles.scss to...

#root {
  background-color: blanchedalmond;
+  transition: transform 1s;
}

and the .out bundle output with the plugin was...

#root {
  background-color: blanchedalmond;
  -webkit-transition: -webkit-transform 1s;
  transition: -webkit-transform 1s;
  transition: transform 1s;
  transition: transform 1s, -webkit-transform 1s;
}

and without the plugin the output is...

#root {
  background-color: blanchedalmond;
  transition: transform 1s;
}

Is there something specific that you noticed that it isn't working?

@markov00
Copy link
Member Author

@nickofthyme so if you open storybook and look a chart with a legend, inspect the legend and find the .echLegendListContainer class. You will see that the mask-image style is not autoprefixed with -webkit. On the playground instead if works correctly

@markov00 markov00 added the chore label Jul 25, 2019
@nickofthyme
Copy link
Collaborator

See markov00#3

@markov00 markov00 merged commit f70e084 into elastic:master Jul 30, 2019
markov00 pushed a commit that referenced this pull request Jul 30, 2019
## [8.1.3](v8.1.2...v8.1.3) (2019-07-30)

### Bug Fixes

* update EUI, storybook and add autoprefixer ([#267](#267)) ([f70e084](f70e084)), closes [#249](#249)
@markov00
Copy link
Member Author

🎉 This PR is included in version 8.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Jul 30, 2019
@markov00 markov00 deleted the update_eui branch November 25, 2020 11:45
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elastic-charts on non-white backgrounds
3 participants