Conversation
- Moves styles closer to their actual components in `public/vis/…` (agg stuff did not get naming updates) - Also fixes responsive layout to actually show the visualization - Updated to `<icon/>` EUI usage where possible
|
@cchaos, about your caveat. Are you saying that all custom visualization plugins will now throw a console warning? |
|
@trevan Only if you are supplying the |
💔 Build Failed |
|
FYI: I found an issue with reporting, I am looking into it. |
|
🤞 That last commit should fix reporting and x-pack tests |
💔 Build Failed |
|
@cchaos, I just went through all of the "known plugins" and the majority of them use the "fa-icon". So it looks like this error will be very common for users that have custom plugins. |
|
cc @walterra I also tagged you as a reviewer, since it touches some ML code |
| // SASSTODO: Is this even an element anymore, or should it be .visualize? | ||
| /* 1. Without setting this to 0 you will run into a bug where the filter bar modal is hidden under | ||
| a tilemap in an iframe: https://github.com/elastic/kibana/issues/16457 */ | ||
| > visualize { |
There was a problem hiding this comment.
As you mentioned above, this should actually be .visualize and got broken in some of the Angular refactoring. I will already fix this on master so we can pull the fix in 6.4.[1|2].
|
I would suggest a different solution for the old icon classes. Let's introduce a Edit: I opened a PR against your repo to introduce that setting. |
# Conflicts: # src/core_plugins/kibana/public/visualize/editor/styles/_editor.less
Introduce legacyIcon
💔 Build Failed |
💔 Build Failed |
snide
left a comment
There was a problem hiding this comment.
I did a code run through of this on Tuesday night and everything looks pretty good to me. I haven't had time to do a full browser test, but as long as Viz has that covered this looks good.
| /** | ||
| * 1. Hack in some padding for these panels. | ||
| */ | ||
| .visWizard__list--paginated--selectable, |
There was a problem hiding this comment.
would this just be --paginatedSelectable?
There was a problem hiding this comment.
I did it like this because they wording makes them seem like separate modifiers. It's 'paginate' and it's 'selectable'.
|
@timroes Any thoughts on that second question about the |
# Conflicts: # src/core_plugins/input_control_vis/public/register_vis.js
💔 Build Failed |
|
It looks like this PR is regularly hitting what was otherwise a rare flaky test. Is this by any chance adding (more) animation to the display of the report printing pane? That's the source of the bug. Nathan's getting rid of the report printing pane altogether and instead going with a flyout, so the bug should disappear. @cchaos if you want, I can Zoom today, and we can fix this failing test (by introducing a delay to our test), and then we can make a note to rip the hacky fix out once Nathan's PR is merged. |
|
Thanks @chrisdavies for keeping up with this. I did not introduce more or longer animations. I'd love your help if you have time. |
|
Looking at the difference between the baseline, master's session, and my local session pdf's, we determined that the baseline is currently wrong and that I altered the styles just slightly enough (probably some padding pixel value somewhere) that my version was just passed the allowed variance threshold while master's didn't. So this PR now also updates the baseline PDF for the "Visualize" reporting test. |
💚 Build Succeeded |
|
Tests are passing!! @elastic/kibana-visualizations, can I get a review, please :)? |
| list-property="attributes.title" | ||
| user-make-url="withIndexPatternUrl" | ||
| class="wizard-row visualizeWizardPaginatedSelectableList kuiVerticalRhythm" | ||
| class="wizard-row visWizard__paginatedSelectableList kuiVerticalRhythm" |
There was a problem hiding this comment.
Checked this in browser and it's not picking up any styles, is this supposed to be visWizard__list--paginated--selectable? (On the other hand, the visWizard__savedObjectFinder further down correctly picks up padding: 8px;)
There was a problem hiding this comment.
Ahh yeah, it looks like I renamed it twice and the second time it didn't change in ML. Really good catch, thanks! I'll update that classname.
💚 Build Succeeded |
|
@cchaos Sorry I was out a couple of days, and haven't seen the 2nd question the first time. I think that is unneeded and dead code. I created a PR to remove it: #23180 so we don't need to mix this into this PR. I try to get this merged quickly, so you can rebase on it, and don't need to worry about any nesting-indicator LESS/SASS anymore. |
|
@cchaos Latest ML changes LGTM! |
|
@cchaos Merged the PR, you can now merge with master. |
# Conflicts: # src/core_plugins/kibana/public/visualize/editor/styles/_editor.less # src/ui/public/styles/variables/for-theme.less
💚 Build Succeeded |
💔 Build Failed |
This PR removes the LESS files inside
/src/core_plugins/kibana/public/visualizeand replaces them with Sass.Process taken
/src/core_plugins/kibana/public/visualizefolder now includes a manifest_index.scsswhich is imported bysrc/core_plugins/kibana/public/index.scss.styling_constants.scssis imported in the mainpublic/index.scssfile, it has access to all the functions, mixins and variables from EUI._index.scssand_component_names.scssfiles next to the components or views they live next to.viswas added to all selectors to namespace them and avoid conflicts./src/core_plugins/kibana/public/visualizeactually had their html counterparts in/src/ui/public/visso they were moved there.src/ui/public/vis/editors/default/_agg.scssalone, to be updated when the rest of the folder does.visualize/_indexfile to start. (cc @snide)Enhancements
1. Fixed the responsive layout to actually show the visualization on small screens
By changing the flex-direction, the chart now shows below the editing panel (sidebar).
2. Updated the chart type images to use the newly created EUI icons
I only saw to places where these were displayed:
a. Chart type selector in the wizard
b. Listing of all saved charts
Let me know if there are other known places, and I'll be sure to update the
<icon/>implementation.Quick caveat
It uses the
<icon />angular implementation for EuiIcon, but I didn't remove theng-classfor backwards compatibility for plugins. This means, however, that thetypeandng-classcan be supplied for non-EuiIcon allowed strings and therefore, the old way will now throw a console warning aboutEuiIconnot being supplied a validtype.My thoughts are that this is ok, and possibly a very rare case.
Questions
<visualize />element anywhere, though there are CSS selectors for it. Is this an outdated selector?nesting-indicatorwhich is also targeted via tests, but can't find where/how/if it's actually implemented@elastic/kibana-visualizations Please add a team member to do a review.
Dev Docs
Visualization icons
The
iconproperty when registering a visualization type that accepts a class name (e.g. to set a font awesome icon) has been renamed tolegacyIconand will be removed in 7.0.0.The
iconproperty now expects a valid EUI icon type. Alternatively to using an EUI icon, you can use theimageproperty instead, which will be set to thesrcattribute of animg. Thus you can also use theimageproperty to set any image as a data URI (e.g. by importing it via Webpack).