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] Migrate shared components used in Workplace Search Groups (#76345) #76817

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

scottybollinger
Copy link
Contributor

Backports the following commits to 7.x:

…h Groups (elastic#76345)

* Add shared images and export file

* Migrate SourceIcon component

* Add util to format routes

We need a way to format routes using parametrized routes in Workplace Search. We used to the `react-router-named-routes` library, but it is 5 years old has has no typings. I extracted the function we needed into a util.

* Update recent_activity to use formatRoute

For the 7.9 Kibana MVP, we used a temporary function to generate this route. Aligning this component to use the helper other parts of the app will use after migration.

* Add types and constants

Various types and constants migrated for use in groups component

* Migrate SourceRow component

Also adds a mock for contentSources. For now the array only has one item needed for this test, but in future tests, more sources will be added to that array.

* Migrate SourcesTable component

* Migrate TablePaginationBar component

* Migrate UserIcon component

* Migrate UserRow component

* Refactor format_route

Uses Object.entries instead of for…in. This is more modern and allows for 100% test coverage.

Also removed `toString()` as `encodeURIComponent()` seems to automatically cast to string

* Remove unused import

* Use forEach instead of map

We’re not returning anything so map is not needed

* Minify images

* Remove formatRoute in favor of generatePath

Unike formatRoute, generatePath adds the trailing slash automatically

* Stop renaming methods

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
enterpriseSearch 372.0KB +150.0B 371.9KB

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

@scottybollinger scottybollinger merged commit 0bbfd00 into elastic:7.x Sep 4, 2020
@scottybollinger scottybollinger deleted the backport/7.x/pr-76345 branch September 4, 2020 21:16
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