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

Vis public UI LESS to SASS #25333

Merged
merged 25 commits into from
Nov 19, 2018
Merged

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Nov 7, 2018

This PR removes the LESS files in ui/public/vis, visLib, visualize and replaces them with Sass.

Process taken

  1. The ui/public/_index.scss file was updated include a _index.scss file from each of the folders.
  2. All Less files were replaced with sass counterparts.
    • The sass files now live with separated _index.scss and _component_names.scss files next to the components or views they live next to (or close to it).
    • Some files were even moved across folders to be closer to their actual component counterparts
    • The Less files that are no longer being used were deleted entirely.
    • The new sass files use EUI variables whenever possible. The most important being color and sizing variables.
    • The selectors were all mostly changed to match EUI's BEM formatting. This means the html/js templating was touched as well.
    • Additionally, a three-letter prefixes vis was added to all selectors to namespace them and avoid conflicts.

Notes

Darkmode

.. is still a bit hacky and re-imports the individual _index.scss files that are appropriate for .tab-dashboard.theme-dark so you will see duplicate non-color styles in dark dashboard mode until we can finalize theming.

Errors

I couldn't figure out how to get every type of error to show up inside the visualizations. If you can, please double-check that these are ok too.

Fixes

This fixes #22597, in the SASS way. There is currently a PR #23806 to fix it in the LESS files. If this fix needs a back port to before 6.6, I'd suggest merging that one in first.

Checklist

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

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

@cchaos cchaos added Feature:Vislib Vislib chart implementation chore Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v7.0.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.6.0 labels Nov 7, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-design

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cchaos
Copy link
Contributor Author

cchaos commented Nov 7, 2018

It looks unrelated.... trying again JIC.

Jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

- Legend back to hard-coded width
- Tooltip breaks-all on value
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cchaos cchaos requested a review from snide November 8, 2018 20:22
@cchaos
Copy link
Contributor Author

cchaos commented Nov 8, 2018

Another ES error
jenkins, test this


@elastic/kibana-app team, I think this is ready for review. The CI failures are inconsistent and all 3 have passed at some point...

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a code review. Looks good. Likely should have someone from the viz team do a functionality pass.

src/ui/public/agg_response/hierarchical/_tooltip.html Outdated Show resolved Hide resolved
src/ui/public/agg_response/hierarchical/_tooltip.html Outdated Show resolved Hide resolved
src/ui/public/agg_response/hierarchical/_tooltip.html Outdated Show resolved Hide resolved
src/ui/public/vis/components/tooltip/_tooltip.scss Outdated Show resolved Hide resolved
src/ui/public/vis/vis_types/_vislib_vis_legend.scss Outdated Show resolved Hide resolved
…ess-to-sass

# Conflicts:
#	src/core_plugins/kibana/public/dashboard/_index.scss
#	x-pack/plugins/ml/public/explorer/_explorer.scss
@cchaos
Copy link
Contributor Author

cchaos commented Nov 15, 2018

@elastic/kibana-app or @elastic/kibana-visualizations teams, can you do a review please?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@markov00 markov00 self-requested a review November 19, 2018 08:26
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked the main functionality of vis.
Everything looks good (and absolutely more clean to me ❤️) except for the following points to fix before merging:

  • legend doesn't correctly shows tooltip when the title is a long text

on 6.5:
legend-6 5

on this PR:
legend-master

  • top horizontal legend with long text shows cutted tooltip

screenshot 2018-11-19 at 10 35 31

  • tooltip values/headers on chart elements are displayed in a tabular format but aligned at the bottom of each cell: it's better to align all the cell values at the top

tooltip-master

  • some tooltip text goes to a new line without taking care of words, displaying partial words and values.

screenshot 2018-11-19 at 10 38 25

  • missing the background of partial data areas: when displaying partial data (when the current selected time windows is smaller cut partially the date histogram interval at the beginning of end of a chart) we display a grayed zone with a tooltip that define that in this interval there is some partial data. Now this zone is no more shown.

screenshot 2018-11-19 at 10 25 47

screenshot 2018-11-19 at 10 26 34

and how it's displayed in 6.5
screenshot 2018-11-19 at 11 05 19

I've also merged this #23806

@cchaos
Copy link
Contributor Author

cchaos commented Nov 19, 2018

Thank you @markov00 for your thoroughness. I've addressed most of the issues you mentioned except for a few:


  1. legend doesn't correctly shows tooltip when the title is a long text

I'm not getting that issue. Can you supply more info on your setup?
This PR on Chrome:
screen shot 2018-11-19 at 09 57 15 am


  1. top horizontal legend with long text shows cutted tooltip

I removed the max-width on the item itself so this doesn't happen in top and bottom legend locations (and goes back to the way it works in master). But this is technically not caused by this PR, but has to do with tooltips not being in a portal and so is cutoff by overflow properties.

On master:
screen shot 2018-11-19 at 11 23 58 am


  1. tooltip values/headers on chart elements are displayed in a tabular format but aligned at the bottom of each cell: it's better to align all the cell values at the top

Fixed


  1. some tooltip text goes to a new line without taking care of words, displaying partial words and values.

Fixed


  1. missing the background of partial data areas

Fixed: I accidentally had both a low opacity and low rgba alpha value that was causing it to be very light.

@markov00
Copy link
Member

@cchaos

  1. legend doesn't correctly shows tooltip when the title is a long text
    I was no more able to reproduce the first issue. Maybe it was a wrong cache or wrong build.
  1. top horizontal legend with long text shows cutted tooltip

I've seen that also having the legend on the left shows an overflowing tooltip. Do you think it's possible to increase the tooltip z-index ?

screenshot 2018-11-19 at 18 07 47

@markov00
Copy link
Member

I found the answer my self about the tooltip: no...
I will open an issue when you merge this PR

@cchaos
Copy link
Contributor Author

cchaos commented Nov 19, 2018

Yeah, I tried looking into it before and there didn't seem to be an easy way because of the way the components were separated. Thanks.

So is that an approval? :)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cchaos cchaos merged commit a5076b5 into elastic:master Nov 19, 2018
cchaos added a commit to cchaos/kibana that referenced this pull request Nov 19, 2018
cchaos added a commit that referenced this pull request Nov 19, 2018
@cchaos cchaos deleted the vis-public-ui-less-to-sass branch March 7, 2019 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Vislib Vislib chart implementation Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.6.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vertical scroll scrolls the entire visualization instead of just the legend.
4 participants