[SharedUx] Chrome/Navigation package#152510
Conversation
2d2c3ad to
dbb0f8b
Compare
|
Love this...! A great start. 🎉 🚀 |
58520eb to
c2aa5b3
Compare
bb0f50f to
9dad5ac
Compare
182ef95 to
bd50859
Compare
203a178 to
2a34e45
Compare
2f33215 to
3ceafe5
Compare
d90ee02 to
417252a
Compare
1e5aa3d to
6f409e7
Compare
22c4cf5 to
ead32d6
Compare
…bana into shared-ux/chrome/navigation
|
@tsullivan what kind of feedback are you looking for on this PR? I see that the API is subject to change, so not sure how deep we should go into that. I see a couple of visual bugs but as this is a first iteration those are probably not critical either? |
Hi @dgieselaar! Yes, the API for the link definition is subject to change. This PR provides linking functionality and structure that will give you a starting point for side nav in your project. e're just using Meanwhile, my team will ask for your feedback and try address it for our future iterations. We are thinking of a different navigation model that separates nav structure from presentation of each nav item - this will allow reuse of the structure without reusing the presentation. We realized we need that approach to give solution teams the option to have a highly customized side nav, and allow our breadcrumb component to "just work." |
| getActiveNavItemId$: () => Observable<string | undefined>; | ||
| getProjectNavIsOpen$: () => Observable<boolean>; | ||
| recentlyAccessed: { get$: () => Observable<RecentItem[]> }; | ||
| registerNavItemClick: (id: string) => void; |
There was a problem hiding this comment.
This includes extensions that are currently not provided by the ChromeStart service. These extensions were used to work out active link highlighting, but we are planning to change the API so that active link highlighting and breadcrumbs can work based on something more structured in the link definition. I will remove this to make a clean PR that will work with minimal changes needed in ChromeStart.
For determining if the side nav is open or collapsed, there will be a local storage setting that consumers can use, or we can make a service for it in the chrome package.
ryankeairns
left a comment
There was a problem hiding this comment.
We'll make some UI polish passes post-merge / in the coming weeks.
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Public APIs missing exports
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @tsullivan |
|
Since the first reviews of this, there have only been removals of ChromeStart integrations that are currently going through redesign. |
| basePath, | ||
| loadingCount, | ||
| navigateToUrl, | ||
| navIsOpen: true, |
There was a problem hiding this comment.
In the next few iterations, we'll refine how the nav is aware of it's open/closed status, and it will use a local storage setting.
The API for the link definition is subject to change. This PR provides linking functionality and structure that will give solution devs a starting point for side nav in their projects. The API uses simple hrefs for now, because it's the easiest thing to start with. Planning forward, we are thinking of a different navigation model that separates nav structure from presentation of each nav item - this will allow reuse of the structure without reusing the presentation.
Isolated dependencies
In order for this component to be usable in
main, a bit further work is currently required in the ChromeStart service and the Serverless plugin. These links are examples of a usable implementation that link to a POC branch:Summary
Introduces a component to host the side navigation in Kibana. Solution teams can insert their own content, and have other small options to customize the presentation: see the storybook demos for more.
Closes #154479
Closes #154484
Closes #154485
Closes #154489Closes #154481
Closes #154480
Closes #154486
Closes #154487
Developer documentation
See the Storybook demos:
yarn storybook shared_uxChrome > Navigationsection in the Storybook appChecklist
Delete any items that are not applicable to this PR.
Platform links are not shown if the underlying plugin is disabledhrefonly