Skip to content

[Workplace Search] Split out logic between Source and AddSource#85658

Merged
scottybollinger merged 8 commits intoelastic:masterfrom
scottybollinger:scottybollinger/refactor-add-source-logic
Dec 15, 2020
Merged

[Workplace Search] Split out logic between Source and AddSource#85658
scottybollinger merged 8 commits intoelastic:masterfrom
scottybollinger:scottybollinger/refactor-add-source-logic

Conversation

@scottybollinger
Copy link
Copy Markdown
Contributor

Summary

Currently we have a 650-line SourceLogic file that has all the logic for viewing a source and also adding a source. This PR splits out the logic for adding a source into its own file. This will allow for easier testing and better maintainability.

NOTE: Both AddSource and SourceSettings use a getSourceConfigData method to fetch config data. I toyed with using one of these to provide for the other and decided to just duplicate the method because of all the loading states in each tree that rely on this method.

This commit merely copies SourceLogic and renames it to AddSourceLogic with the name of the component and interfaces changed. This will make reviewing the changes easier later
@scottybollinger scottybollinger added Feature:Plugins v8.0.0 release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Dec 10, 2020
@scottybollinger scottybollinger requested a review from a team December 10, 2020 22:20
@scottybollinger
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@yakhinvadim yakhinvadim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's much better now! Thank you for such an easy to review history.

@scottybollinger
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@scottybollinger
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@scottybollinger
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 1012 1013 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 1.7MB 1.7MB +3.4KB

Distributable file count

id before after diff
default 47241 48001 +760

History

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

@scottybollinger scottybollinger merged commit 15876f8 into elastic:master Dec 15, 2020
@scottybollinger scottybollinger deleted the scottybollinger/refactor-add-source-logic branch December 15, 2020 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants