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

[7.x] [Enterprise Search] Move header actions menu to be rendered after the main app + share its store (#78691) #78866

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

cee-chen
Copy link
Member

Backports the following commits to 7.x:

… main app + share its store (elastic#78691)

* [Setup] Refactor renderApp tests

- This is anticipation of upcoming renderHeaderActions changes which will require these helpers (particularly the unmount portion, for some reason renderHeaderAction tests fail if apps are not unmounted properly)

- Add mount/unmount helper (but leave first test the same so that devs can see the normal/expected usage)
- Add missing EnterpriseSearch app test
- Add mockContainer var for brevity, pull out MockApp in anticipation of future usage

* Store renderHeaderActions in KibanaLogic

- a light wrapper/helper around params.setHeaderActionMenu

+ update renderHeaderActions - move to main renderApp block to reflect that its relationship with renderApp ('child'/should be called within renderApp/shares dependencies).

* Update WorkplaceSearch to render its header actions from app, not plugin.ts

* Update WorkplaceSearch tests (+ bonus refactor)

- We need to update WS tests to setMockValues so that it doesn't override the renderHeaderActions mock
+ bonus - add setMockActions as well because since we're already here
+ bonus - update App Search index tests as well to match
+ ?? - for some reason tests were failing beceause react router wasn't mocked properly - requireActual seems to fix that

* 🔥 Remove temporary externalUrl workaround

- set in elastic@9d993d8

- WorkplaceSearchHeaderActions should now still have the correct URL - and also now be able to access all Kea logic set up by the main app :)
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id value diff baseline
enterpriseSearch 429.6KB -46.7KB 476.3KB

distributable file count

id value diff baseline
default 47512 -3 47515

page load bundle size

id value diff baseline
enterpriseSearch 20.0KB -1.7KB 21.7KB

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

@cee-chen cee-chen merged commit 4cdfd2b into elastic:7.x Sep 29, 2020
@cee-chen cee-chen deleted the backport/7.x/pr-78691 branch September 29, 2020 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants