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

Convert button group to toggle. Refactor code structure for scalability. #47083

Merged
merged 6 commits into from
Oct 15, 2019

Conversation

phillipb
Copy link
Contributor

@phillipb phillipb commented Oct 1, 2019

Summary

This PR restructures the inventory page's UI, and the app's structure to support more types of inventory.

For the UI:

  • Change the view type switcher from a ButtonGroup to a PopOver menu.

For the Code

  • Move each type of toolbar (host, container, pod) to a separate file.

Fixes: #45924.

Before

Screen Shot 2019-10-02 at 7 53 22 AM

After

Screen Shot 2019-10-02 at 7 48 57 AM

Screen Shot 2019-10-02 at 7 48 49 AM

Checklist

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

For maintainers

@phillipb phillipb added release_note:enhancement Feature:Metrics UI Metrics UI feature v8.0.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.5.0 labels Oct 1, 2019
@phillipb phillipb requested a review from a team as a code owner October 1, 2019 21:58
@phillipb phillipb self-assigned this Oct 1, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-logs-ui (Team:infra-logs-ui)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link

@sgrodzicki sgrodzicki left a comment

Choose a reason for hiding this comment

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

@phillipb would you mind adding some screenshots (before/after), so it's easier to understand the scope of this? :)

@Kerry350 Kerry350 self-requested a review October 2, 2019 20:23
Copy link
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

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

Looks good, really like the change visually 👍 I've left some comments r.e. possibly cutting out some duplication.

@Titch990
Copy link
Contributor

Titch990 commented Oct 7, 2019

I'm slightly concerned that Docker, Kubernetes etc are now rather well hidden below what looks like a "Hosts" dropdown. Users may think that clicking that dropdown allows them to select a single host, rather than allow them to select a different view of their inventory.

I wonder if it would be better to adopt the approach used by other the dropdowns here, and prefix the text with the kind of thing the dropdown relates to (for example, "Metrics: CPU Usage"), so the dropdown tells you both the kind of thing you are selecting, and the selection you have made.

So perhaps something like "View: Hosts"? Although perhaps there may be a better word than "View" as we also use "View" below in "Table view" and "Map view"? But I think some kind of informational prefix on the dropdown is needed to avoid confusion. Is there a general term we use elsewhere to refer to the collection of things like "Hosts", "Docker", "Kubernetes" etc . . . . ?

PS, typo in Kubernetes too, in your screenshot.

@simianhacker simianhacker self-requested a review October 7, 2019 19:45
Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

I made some commments inline about reducing some of the boiler plate in the toolbars. I think we should also take this opportunity to change the styles so they look more consistent. Here is what they should look like

image

This is a screen shot from 8721a2d based on design provided by @hbharding. The "view" drop down should be positioned like you have in this PR but the "Metric" and "Group By" drop downs should look like the image above.

@phillipb phillipb requested a review from simianhacker October 8, 2019 16:21
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM

phillipb added a commit to phillipb/kibana that referenced this pull request Oct 16, 2019
…ty. (elastic#47083)

* Convert button group to toggle. Refactor code structure for scalability.

* Remove duplicated code and reduce boilerplate

* Properly internationalize invotory label

* Reduce more boilerplate
phillipb added a commit that referenced this pull request Oct 16, 2019
…ty. (#47083) (#48311)

* Convert button group to toggle. Refactor code structure for scalability.

* Remove duplicated code and reduce boilerplate

* Properly internationalize invotory label

* Reduce more boilerplate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature release_note:enhancement Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Infra UI] Change node switcher to multi-level contextual menu
7 participants