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

[InfraUI] Infrastructure navigation changes #32892

Merged
merged 16 commits into from
Mar 18, 2019

Conversation

Kerry350
Copy link
Contributor

@Kerry350 Kerry350 commented Mar 11, 2019

Summary

Implements the outstanding work on #27916 (Change primary navigation, and add sub navigation and Move node type filter navigation to query/filter element).

This is how the changes look:

Screenshot 2019-03-11 14 00 46

Uses a standard nested pattern whereby /infrastructure mounts the index page, and then nested routes mount.

Also some very small changes to <DocumentTitle /> to better support nesting (specifically accessing the previousTitle).

I've left the Metrics explorer tab in for now as it helps with testing, and will be implemented for real in #28027. Prior to merging I can either just comment that tab out until it's worked on, or remove it.

Testing

  • Try clicking the primary navigation tabs, ensure the correct page renders.
  • Try clicking the hosts / Kubernetes / Docker sub-navigation, ensure this filters by the correct nodeType.

Checklist

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

Add routed_tabs component

Amend routing (use an index and nested routes) and reorganise directory structure

Shift hosts / kubernetes / docker selection to subnavigation

Change path

Amend existing URLs

Use proper types

Amend document_title component

Reorganise title / source config button / info text

Maintain compatibility with old URLs
@Kerry350 Kerry350 added review 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.2.0 labels Mar 11, 2019
@Kerry350 Kerry350 self-assigned this Mar 11, 2019
@Kerry350 Kerry350 requested review from skh and weltenwort March 11, 2019 14:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/infrastructure-ui

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@weltenwort weltenwort removed the request for review from skh March 11, 2019 16:09
Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

Looks really good, I like it!

Especially the Route usage in RoutedTabs looks very elegant to me, good job 👍

Aside from that I left a few comments inline and also noticed the following:

There seems to be some z-index problems with the auto-completion popup (again 😉):

grafik

Not sure if that is related to the styles of the popup itself being broken. Maybe that undid previous z-index fixes. We'll have to check if 7.0 is affected too.

I also happened to notice, that the DocumentTitle component doesn't seem to correctly deal with the title prop being updated, which leads to incorrect titles parts of it are loaded asynchronously (as is the case one the node details page):

grafik

That is probably not caused by this PR, so we could just as well fix that separately.

/>
</EuiKeyPadMenuItemButton>
</EuiKeyPadMenu>
<EuiButtonGroup
Copy link
Member

Choose a reason for hiding this comment

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

I know the EUI docs recommend the small button size for groups, but how about setting buttonSize="m" on this one? To my eye the heights and spacing in

grafik

look a lot more harmonious than with the default size s

grafik

Copy link
Contributor Author

@Kerry350 Kerry350 Mar 12, 2019

Choose a reason for hiding this comment

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

Yep, I agree. I have changed this, but there is a little bit of an issue with the EUI typings for this component.

Screenshot 2019-03-12 14 25 26

The <EuiButtonGroup /> component allows "m" for buttonSize. But, that component in it's tree renders a <EuiButton /> which only allows "s" and "l". There is a mismatch here; I can either leave the change in, we ignore the console warning for now, and I file a ticket against EUI. Or don't make the change so we don't have an error, file against EUI, change it once the EUI side is changed.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, I hadn't noticed that. I would say we should file an issue in EUI (or a PR, given the simplicity of the change) and leave it in for now.

x-pack/plugins/infra/public/pages/infrastructure/index.tsx Outdated Show resolved Hide resolved
@Kerry350
Copy link
Contributor Author

@weltenwort Thanks for the review 😄

There seems to be some z-index problems with the auto-completion popup (again 😉):

This is fixed now (good spot!). The original fix boosted the toolbar in it's entirety to a higher z-index than the page content, which worked for the original issue. Here, because of the layout changes, we have two rows so that fix isn't sufficient. I've added the same z-index boost to the suggestions panel to ensure it doesn't interfere with the secondary row.

I also happened to notice, that the DocumentTitle component doesn't seem to correctly deal with the title prop being updated ... That is probably not caused by this PR, so we could just as well fix that separately.

Oops, this was indeed caused by this PR and making improvements in that component. This is fixed now.

@Kerry350
Copy link
Contributor Author

@weltenwort I've responded to all feedback now. There are two things I couldn't fully resolve, regarding EUI components.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

Nice fixes, we're almost there. As to the "Metrics Explorer" tab, I guess we should hide it (comment it out) for now before merging?

@Kerry350
Copy link
Contributor Author

@weltenwort

I only now noticed there might be an accessibility issue with nesting the inside of the

Very good point. I've changed this 👍

This should be good to go now (the metrics-explorer tab is commented out for now). I'll handle the two EUI bits in followup PRs as agreed.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

Very nice work! One last suggestion below, but I think this is definitely a great improvement. I'd love to imitate some of that on logs page. 😉

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@Kerry350 Kerry350 merged commit 4b2c2bd into elastic:master Mar 18, 2019
Kerry350 added a commit to Kerry350/kibana that referenced this pull request Mar 18, 2019
* Reorganise primary and sub navigation of Infrastructure

Add routed_tabs component

Amend routing (use an index and nested routes) and reorganise directory structure

Shift hosts / kubernetes / docker selection to subnavigation

Change path

Amend existing URLs

Use proper types

Amend document_title component

Reorganise title / source config button / info text

Maintain compatibility with old URLs

* Remove dead code

* Bump z-index on suggestions panel

* Ensure documentTitle responds to updates

* Use the same noop function and remove disabled option

* Use buttonSize="m" and add "Hosts" translation back

* Remove all "Home" wording

* Remove unused translations with script

* Don't nest <Link /> within a tab

* Comment out metrics-explorer tab until needed

* Don't create duplicate History entries
Kerry350 added a commit that referenced this pull request Mar 18, 2019
* Reorganise primary and sub navigation of Infrastructure

Add routed_tabs component

Amend routing (use an index and nested routes) and reorganise directory structure

Shift hosts / kubernetes / docker selection to subnavigation

Change path

Amend existing URLs

Use proper types

Amend document_title component

Reorganise title / source config button / info text

Maintain compatibility with old URLs

* Remove dead code

* Bump z-index on suggestions panel

* Ensure documentTitle responds to updates

* Use the same noop function and remove disabled option

* Use buttonSize="m" and add "Hosts" translation back

* Remove all "Home" wording

* Remove unused translations with script

* Don't nest <Link /> within a tab

* Comment out metrics-explorer tab until needed

* Don't create duplicate History entries
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 review Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants