Skip to content

Conversation

@cchaos
Copy link
Contributor

@cchaos cchaos commented Aug 27, 2019

Follow up from #39140

Design pass on the Saved Queries Management popover

With help from @andreadelrio we've tidied up the look of the popover. Here are the main points:

1. Using BEM naming scheme for classes

Example: .saved-query-list-wrapper --> kbnSavedQueryManagement__listWrapper

Also, using the correct file structure for SASS files: using _index.scss for manifest and imports two files adjacent to the components they target.

Screen Shot 2019-08-27 at 19 03 40 PM

2. Better empty state

Changed the text to be smaller and using EuiPopoverFooters for better division of content vs buttons.

3. Using EuiListGroup and EuiListGroupItem for the actual list

This gives us better selected states, delete icon on hover only and truncation.

4. Fixes the height/max-height

The popover was setting a fixed height at all times causing it to be tall needlessly. This PR uses max-height, instead.

And the overflow still works

Screen Shot 2019-08-27 at 18 31 04 PM

Even in IE

Screen Shot 2019-08-27 at 18 42 05 PM

5. Adds a checkmark to selected items

... to make it more apparent that it's "selected".

Note: The above screenshots are a bit out of date, instead of replacing them all the following is what selected looks like.

Screen Shot 2019-08-27 at 19 41 50 PM

Checklist

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

For maintainers

@cchaos cchaos requested a review from a team as a code owner August 27, 2019 23:21
@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@andreadelrio andreadelrio left a comment

Choose a reason for hiding this comment

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

Thanks for all these improvements @cchaos

Note to the other reviewers: We've added the checkmark icon next to the selected query to help differentiate it from the rest of the list items (especially when the other items get hovered). This is the result:

Screen Shot 2019-08-27 at 19 41 50 PM

@cchaos cchaos added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.4.0 v8.0.0 labels Aug 28, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@cchaos cchaos added release_note:skip Skip the PR/issue when compiling release notes Feature:Filters and removed Feature:Filters labels Aug 28, 2019
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.

Need a focus state for the items in the list. Currently only the trash icon shows. Rest of the code looks good.

@cchaos
Copy link
Contributor Author

cchaos commented Aug 28, 2019

@snide Yeah, that's an issue with EuiListGroupItem, already created a ticket: elastic/eui#2266

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.

OK. Focus state isn't the end of the world (we can follow up) and it's a nice change. Looks much better. Nice work @cchaos and @andreadelrio

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cchaos cchaos force-pushed the saved-queries-design-cleanup branch from 335ac30 to ce6be7f Compare August 28, 2019 16:20
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cchaos
Copy link
Contributor Author

cchaos commented Aug 28, 2019

Jenkins, test this , pretty please 💛

@cchaos
Copy link
Contributor Author

cchaos commented Aug 28, 2019

Jenkins, test this

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

The UI looks great but there's a privilege related problem with the cleanup:

When in read-only mode, the delete icon shouldn't appear. It is at the moment, so a read-only user can delete a saved query when then shouldn't be able to. We use showWriteOperations here to determine if a user has privileges to delete, modify and save. This is no longer being used.

Read-only-user-shows-delete-icon

This is failing the security functional tests (X-pack Chrome Functional tests/Group5 and Group3)(read-only mode) in Discover, Dashboard and Visualize. I checked those tests locally and see the failures.

@cchaos
Copy link
Contributor Author

cchaos commented Aug 28, 2019

Thanks @TinaHeiligers I believe I fixed those in ce6be7f Can you make sure you have the latest?

@TinaHeiligers
Copy link
Contributor

@cchaos I'll check again with the latest.

@cchaos
Copy link
Contributor Author

cchaos commented Aug 28, 2019

retest

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

UI looks great!
The security tests for saved queries also pass locally now.
LGTM

Copy link
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

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

LGTM once tests pass

@elasticmachine
Copy link
Contributor

💔 Build Failed

@snide
Copy link
Contributor

snide commented Aug 28, 2019

retest

@TinaHeiligers
Copy link
Contributor

@cchaos you might need to ping @spalger for insight into why you can't get Jenkins to run on this PR again. It could have been a result of too many jobs queuing up due to FF.

@cchaos cchaos force-pushed the saved-queries-design-cleanup branch from ce6be7f to cf5d21d Compare August 29, 2019 01:16
@cchaos
Copy link
Contributor Author

cchaos commented Aug 29, 2019

Retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cchaos cchaos merged commit fbc1be5 into elastic:master Aug 29, 2019
timroes pushed a commit that referenced this pull request Aug 29, 2019
@cchaos cchaos deleted the saved-queries-design-cleanup branch August 29, 2019 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.4.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants