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] Convert our public_url route to config_data and collect initialAppData (#75616) #75667

Merged
merged 1 commit into from
Aug 21, 2020

Conversation

cee-chen
Copy link
Contributor

Backports the following commits to 7.x:

…nd collect initialAppData (elastic#75616)

* [Setup] DRY out stripTrailingSlash helper

- DRYs out repeated code
- This will be used by an upcoming server/ endpoint change, hence why it's in common

* [Setup] DRY out initial app data types to common/types

- In preparation for upcoming server logic that will need to reuse these types
+ DRY out and clean up workplace_search types
  - remove unused supportEligible
  - remove currentUser - unneeded in Kibana

* Update callEnterpriseSearchConfigAPI to parse and fetch new expected data

* Remove /public_url API for /config_data

* Remove getPublicUrl in favor of directly calling the new /config_data API from public/plugin

+ set returned initialData in this.data

* Set up product apps to be passed initial data as props

* Fix for Kea/redux state not resetting between AS<->WS nav

- resetContext at the top level only gets called once total on first plugin load and never after, causing navigating between WS and AS to crash when both have Kea - this fixes the issue

- moves redux Provider to top level app as well

* Add very basic Kea logic file to App Search

* Finish AppSearchConfigured tests & set up kea+useEffect mocks

* [Cleanup] DRY out repeated mock initialAppData to a reusable defaults constant
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
enterpriseSearch 197 +1 196

async chunks size

id value diff baseline
enterpriseSearch 342.0KB -16.9KB 359.0KB

page load bundle size

id value diff baseline
enterpriseSearch 21.8KB +561.0B 21.2KB

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

@cee-chen cee-chen merged commit acf5ad6 into elastic:7.x Aug 21, 2020
@cee-chen cee-chen deleted the backport/7.x/pr-75616 branch August 21, 2020 17:49
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