-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[InfraUI] Infrastructure navigation changes #32892
Conversation
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
Pinging @elastic/infrastructure-ui |
💔 Build Failed |
💔 Build Failed |
There was a problem hiding this 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 😉):
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):
That is probably not caused by this PR, so we could just as well fix that separately.
/> | ||
</EuiKeyPadMenuItemButton> | ||
</EuiKeyPadMenu> | ||
<EuiButtonGroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
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.
There was a problem hiding this comment.
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/components/waffle/waffle_node_type_switcher.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/public/components/waffle/waffle_node_type_switcher.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/public/components/navigation/routed_tabs.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/public/components/navigation/routed_tabs.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/infra/public/components/waffle/waffle_node_type_switcher.tsx
Show resolved
Hide resolved
@weltenwort Thanks for the review 😄
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.
Oops, this was indeed caused by this PR and making improvements in that component. This is fixed now. |
@weltenwort I've responded to all feedback now. There are two things I couldn't fully resolve, regarding EUI components. |
💔 Build Failed |
💚 Build Succeeded |
There was a problem hiding this 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?
x-pack/plugins/infra/public/components/navigation/routed_tabs.tsx
Outdated
Show resolved
Hide resolved
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. |
💚 Build Succeeded |
There was a problem hiding this 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. 😉
x-pack/plugins/infra/public/components/navigation/routed_tabs.tsx
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
* 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
* 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
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:
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 thepreviousTitle
).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
nodeType
.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] Documentation was added for features that require explanation or tutorials[ ] Unit or functional tests were updated or added to match the most common scenarios