Skip to content

[7.x] [Enterprise Search] Add solution-level side navigation (#74705)#74882

Merged
cee-chen merged 1 commit intoelastic:7.xfrom
cee-chen:backport/7.x/pr-74705
Aug 12, 2020
Merged

[7.x] [Enterprise Search] Add solution-level side navigation (#74705)#74882
cee-chen merged 1 commit intoelastic:7.xfrom
cee-chen:backport/7.x/pr-74705

Conversation

@cee-chen
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.x:

* Add basic layout/sidebar blocking

- note: we should *not* set left: 0 / top: 0 etc., as this can interfere with Kibana's existing UI (e.g. docked navigation, telemetry callout)

* Add sidebar styles + static links

* Refactor SideNav to be a reusable component

- So that Workplace Search can reuse the same layout but pass in their own custom nav
+ Refactor AppSearch to use Layout in router

* Refactor all views to account for in-router Layout

* Fix root redirects not working as expected

- If enterpriseSearchUrl hasn't been set, all pages should redirect to SetupGuide, not just root
- The engines redirect simply wasn't working at all - it would always show a blank page when '/' was clicked in the Kibana breadcrumbs. Not sure if this is a Kibana issue - had to change to a component load to fix
+ Simplify index.test.tsx (probably unreasonable and not super helpful to add assertions for each new route)

* Implement active styling for links

* Fix failing location tests

- By adding a new useLocation mock
+ add SideNavLink active class test

TODO: I should probably rename react_router_history.mock to just react_router.mock

* Add responsive toggle + styling

* Add navigation accessibility attributes/controls

* [Feedback] Update mobile UX to close menu on link click/navigation

- This requires updating our EUI/React Router components to accept and run custom onClick events
- Also requires adding a new ReactContext to pass down closeNavigation, but that's not too onerous thanks to useContext
@cee-chen cee-chen added the backport This PR is a backport of another PR label Aug 12, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
enterpriseSearch 191 +24 167

async chunks size

id value diff baseline
enterpriseSearch 307.7KB +40.6KB 267.1KB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@cee-chen cee-chen merged commit a9771ab into elastic:7.x Aug 12, 2020
@cee-chen cee-chen deleted the backport/7.x/pr-74705 branch August 12, 2020 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants