-
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
Add side navigation component for serverless search #156465
Add side navigation component for serverless search #156465
Conversation
e62acc5
to
d7da5f0
Compare
d7da5f0
to
0493ffb
Compare
name: '', | ||
id: 'root', | ||
items: [ | ||
{ id: 'overview', name: 'Overview', href: '/app/enterprise_search/overview' }, |
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.
NOTE: These links were copied from the serverless Search nav from an earlier POC: 89bd09c#diff-a3106909413d188596dc1162e4fc5d4f884f4fd9b3a4eca6c03666bb5d35dbb9R24-R45
icon: 'logoEnterpriseSearch', | ||
}, | ||
]} | ||
activeNavItemId="search_project_nav.root.overview" |
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.
Question: is this hardcoded string needed for now? Shouldn't we leave it empty until we receive this state from the Chrome service?
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.
I left code in to set the activeNavItemId to search_project_nav.root
. This allows the main "Search" bucket to be pre-expanded when the page is first loaded. Also, I added a comment stating how it's a temporary set-up.
}, | ||
]} | ||
activeNavItemId="search_project_nav.root.overview" | ||
platformConfig={{}} |
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.
nit: Shouldn't we set platformConfig
as optional if it requires an empty object?
…n/kibana into serverless/nav-component/search
Pinging @elastic/appex-sharedux (Team:SharedUX) |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Module Count
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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.
Code looks good (with some comments about i18n).
Tested locally and found a few UI glitches
- When switching page the loading and icon are not in the same place and occupying the same space. This makes our Elastic logo jump around 😊 It'd be nice to set a fix width on the logo and lock its space. The loading should just swap in the same area and the logo should not move.
- When navigating to some management > stack some links didn't point to the app and stayed on the welcome page. For example ILM (but there are more)
- It seems that there is some issue with the page background color and the app background color. The following don't seem correct
title: '', | ||
id: 'root', | ||
items: [ | ||
{ id: 'overview', title: 'Overview', href: '/app/enterprise_search/overview' }, |
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.
I think we want to translate those title
{ | ||
id: 'search_project_nav', | ||
items: navItems, | ||
title: 'Search', |
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.
Here too title
should be translated
}, | ||
]; | ||
|
||
export const createServerlessSearchSideNavComponent = (core: CoreStart) => () => { |
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.
We are inside the serverless_search
plugin. I think we can simply call this createSideNavComponent
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.
lgtm,
in my opinion, the polishment from Seb's comment #156465 (review) could be done separately later and some of them are not for @elastic/appex-sharedux
_startDeps: ServerlessSearchPluginStartDependencies | ||
): ServerlessSearchPluginStart { | ||
core.chrome.project.setSideNavComponent(createComponent(core)); |
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.
I wonder if we should still set it through the serverless plugin as it was in the POC. not sure if there is a benefit to it
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.
See: #156600 (comment)
I think we should bring it back
@Dosant Links that don't work are not polishment IMO 😊 Is it due to our shared component, our navigation system? If we know the bug at least we should open an issue to fix it. |
We (as in: the Enterprise Search frontend team) will be reworking and iterating on all of these link over the coming weeks. Putting significant effort into getting them working in this PR is likely to be wasted effort. In fact, keeping this PR from merging over those links will actually end up slowing down the effort to get them fixed, as we can't really get to them before this is merged :) |
I will open separate issues for the UI glitches and non-working Platform links. Thanks for bringing those up! |
Summary
This PR implements a side navigation tree for Serverless Enterprise Search in a way that uses the earliest deliverables from the AppEx Shared UX team.
Technical doc for Side Nav: https://docs.google.com/document/d/1ew8KYl6ROs_V7jeIXgeP_C9YgkYK2IPtuceo6KVF_jE/edit#
Screenshots
Before
After
Known issues
Checklist
Delete any items that are not applicable to this PR.