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

Dashboard design updates #29896

Merged
merged 17 commits into from
Feb 5, 2019
Merged

Dashboard design updates #29896

merged 17 commits into from
Feb 5, 2019

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Feb 2, 2019

This PR attempts to clean up the visuals (including spacing) of the dashboard (and some vis's)

1. States

a. Loading

I replaced the Loading... text with EUI's loading bar chart. However, I could only do this at the dashboard panel level and couldn't find a way to add it to the empty .visChart component which loads shows empty for a long while.

b. Visual changes to edit mode

Panel's now have a permanent dashed border and hovering over areas that are used for moving and resizing (react-layout stuff), they highlight in yellow.

c. Switching between edit and view modes fixed

There is a "bug" where the individual dashboard panel's wouldn't get the edit/view state update until a hard refresh. The panel's visual state was based on this "bug" so when you switched between from edit to view mode, it still looked like you were in edit mode. I was able to fix this by using the layout class .dshLayout--editing instead as this did get updated correctly.

2. Panel titles

a. Panels no longer take up space if they don't exist.

It used to be that the space alloted for panel titles would still be present even if the title wasn't. Now, the content correctly shifts instead.

screen shot 2019-02-01 at 20 37 58 pm

b. Titles also now use a EUI title style which are darker and bolder.

screen shot 2019-02-01 at 19 40 15 pm

3. Errors

I've tried to consolidate the variety of error messages across the different vis types (excluding vega cuz that's just built weird). They should all be a small icon with a small subdued text description. With tag cloud, I moved the message into a tooltip and just display a warning icon.

image

screen shot 2019-02-01 at 19 50 18 pm

4. Legend toggle

a. One location

The legend toggle was a tricky one. As a design team, we decided that we'd like to keep the legend toggle in one location and change the icon to represent 'legend' not a direction (arrow). This way when a user is searching for the legend, the toggle is always in the same place, even though the legend may appear in different locations.

screen shot 2019-02-01 at 20 32 38 pm

b. Toggle states

We decided that the legend toggle just added noise to the dashboard when not interacting with it. So for view mode of the dashboard, we've hidden the toggle until hovering of the panel (similar to the way we handle the panel options menu).

Also, the button has an on/off state – currently just a background color in the on state.

This also means that the toggle has been moved in Visualize, but it's always visible.

screen shot 2019-02-01 at 20 39 03 pm

Note: TSVB's legend wasn't touched. Though it could probably just use an icon update.

5. Bonus: Mobile

Our dashboard are completely unusable/unviewable on small device screens. I've implemented just a vertically stacked view on these small devices by overriding react-grid's layout styles and just display: blocking them.

Editing is completely broken when viewing in this stacked manner, so it only does this in view mode.

6. Other

a. I also had some adjustments to do in Visualize regarding the new font sizes.

b. I adjusted the controls vis a bit to allow for better wrapping of components and rearranged the button order and styles

screen shot 2019-02-01 at 20 45 40 pm

c. I noticed that one of the error types was spitting out Markdown, so I tried to use markdown-it to parse it, but I think it needs some extra sanitizing or something because it just spits out the html as a string. Needs some help here


Checklist

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

For maintainers

@cchaos cchaos added Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. Feature:Dashboard Dashboard related features v7.0.0 labels Feb 2, 2019
@cchaos cchaos requested a review from a team as a code owner February 2, 2019 02:07
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-design

@cchaos cchaos added the WIP Work in progress label Feb 2, 2019
@snide
Copy link
Contributor

snide commented Feb 2, 2019

Fantastic work. I'll do a more thorough review quickly since I know we're coming down to the wire. cc @elastic/kibana-app team to be aware we're working on this and it would be nice to have some eyes on it early next week.

Because these changes can cause rendering changes in dashboards, our thought is to target this only at 7 only and consider it a (easily addressable) breaking change for existing dashboards. This means our own prebuilt dashboards in our data data tutorials. The "fix" will be to simply resize panels if they've shifted because of the new padding / title / font shifts. This likely was already happening due to the font changes in 7 anyway. I most cases this should be extremely minor.

Also @asawariS, @alexfrancoeur and @AlonaNadler should check out these changes. My guess is that the read only mobile view is something worth broadcasting in some way as we ramp up our launch. Along with our new nav, more and more of Kibana will be available (but maybe not optimized from a payload perspective) for smaller screens. One thought there @cchaos, we might want to just hide the edit button in mobile using one of our wrappers or utility classes.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cchaos cchaos force-pushed the dashboard-updates-2 branch from 70d9c70 to 7736d17 Compare February 3, 2019 22:08
@cchaos
Copy link
Contributor Author

cchaos commented Feb 3, 2019

7. Empty state

I had forgotten to also update the Dashboard empty state. That has been pushed, however, it's kind of hacky because the component is still angular. But it now behaves as so:

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cchaos cchaos changed the title [WIP] Dashboard design updates Dashboard design updates Feb 3, 2019
@cchaos cchaos removed the WIP Work in progress label Feb 3, 2019
@cchaos cchaos requested a review from a team February 3, 2019 22:49
@cchaos
Copy link
Contributor Author

cchaos commented Feb 3, 2019

CI Passed, so no longer WIP.

@snide I'd love to hide that edit button, but I think there are some implications with that and we'd have to do some hacky stuff with adding the label as an append to the classname of all menu items which isn't great because of any multi-word labels.

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.

Minor comments below.

I did a more general scan of this visually tonight. I think it touches on all the stuff we jammed on and seems good to me. As an amendment to my previous comment I also think it likely will likely have very minimal effects on existing dashboards (because in almost all places you've made things smaller), at least when looking at all the sample ones, so that makes it much less scary.

The only thing I'm guessing will be controversial with others is the legend toggling. Personally, I think this is a much cleaner way to handle it and would always optimize towards the read view of things rather than the edit views (since it will likely be seen many more times than edited). But we should at least give some PM / app team feedback here before merging. I think it is less obvious in the visualization app itself, which a trade-off I think we should be comfortable with.

The other additions are all fantastic and this cleans up dashboards considerably.

Small IE issue I noticed, but otherwise IE looks fine. Checked all other browsers for ya and they were fine.

image

@snide
Copy link
Contributor

snide commented Feb 4, 2019

Another small one. We should switch the table display to use euiScrollbar

image

@cchaos cchaos force-pushed the dashboard-updates-2 branch from 7736d17 to 8e50c88 Compare February 4, 2019 15:23
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@timroes
Copy link
Contributor

timroes commented Feb 4, 2019

@markov00 @emmacunningham Caroline changed the design of the legend toggle button a bit (see "4. Legend toggle" above). I think we should look on aligning design in elastic-charts for that or similar. Maybe worth syncing up on that with @cchaos

@alexfrancoeur
Copy link

Great work!! Some comments and feedback below. I didn't have a chance to read through the comments, so apologies for any duplicate info.

  • Loading looks good. It'll be especially helpful for visualizations not updated using _msearch (TSVB, vega, etc.).
  • I absolutely love that a panel gets resized now if there is no title. Certainly been missing this feature. The new bolding titles and styling work as well.
  • Visual changes to the editing process look good, but drag and drop seem to be lagging a bit on occasion (probably no different than before). I've noticed that it seems easier to drag and drop a panel from the top of the dashboard to the bottom and vice versa.
  • ❤️ the new errors, wrapping of controls, legend title and MOBILE. Awesome work. Just talked to marketing about Mobile view.
  • I'm sure this is a result of the angularness of it, but the empty state looks off. I'd expect it to look like the empty management view for example and not have the two tone. Is it just dark mode?

image

@snide
Copy link
Contributor

snide commented Feb 4, 2019

@alexfrancoeur two tone will get fixed with elastic/eui#1513 when it makes its way over (with a kb pr as well)

@cchaos
Copy link
Contributor Author

cchaos commented Feb 4, 2019

Thanks @alexfrancoeur !

drag and drop seem to be lagging a bit on occasion

Yeah, nothing I did should have interfered with that. Most likely still a symptom of the dependency.

but the empty state looks off

Yeah, what @snide said. I've got some follow-ups that will fix all those.

Copy link
Contributor

@timroes timroes left a comment

Choose a reason for hiding this comment

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

I have a couple of minor things noted in the code, and one accessibility issue:

  • You can no longer see which Options button is focused in Edit mode. Earlier that was visible since only the focused button had a background color, now every button has, and there is no visual distinction for the focused button anymore. We need a visual difference for the focused button.

Also I want to point out a weird behavior in mobile mode. As soon as you click on Edit all panels are jumping to their original positions and you get the squeezed panel view. As soon as you leave edit mode everythings back to "responsive" design. I understand why it's behaving like that, since we can't properly reorder any panels in responsive mode, since their "grid position" are just not there, but I want to point this out to @AlonaNadler and @alexfrancoeur again, that this behavior might also confuse users, and just want to raise awareness for it, even though I am not really vetoing against it.

@alexfrancoeur
Copy link

Responding to @timroes comment, can we simply remove edit mode when viewing through mobile? Would that be an even more confusing experience? Would love to hear @AlonaNadler thoughts here as well

@cchaos
Copy link
Contributor Author

cchaos commented Feb 5, 2019

The best I can do right now is hide the Edit button via CSS in mobile screens so at least you can't toggle into edit mode. But it won't stop a user from being in edit mode then reducing their screen size. We can probably handle this better down the road, but I think the trade-off is huge for at least having read-only mobile view.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cchaos
Copy link
Contributor Author

cchaos commented Feb 5, 2019

Hopefully flaky...

Jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cchaos cchaos merged commit 0618134 into elastic:master Feb 5, 2019
@cchaos cchaos deleted the dashboard-updates-2 branch February 5, 2019 18:42
@AlonaNadler
Copy link

AlonaNadler commented Feb 5, 2019

Great improvements here, really exciting stuff, congrats!!
One thing I wanted to check, @cchaos has a screenshot of creating a new dashboard, can we imminently open the visualizations/saved search flyout when users create a new dashboard instead making them click add? I think it will help users who create their first dashboard instead of possibly wondering what should be the next step

@cchaos
Copy link
Contributor Author

cchaos commented Feb 5, 2019

@AlonaNadler Thanks for taking a look!

I think that makes sense, though out of scope of this PR as this mainly addresses visual updates. I would recommend creating an issue (if one doesn't already exist).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants