Skip to content

[7.x] [Workplace Search] Add Account Settings page imported from Security plugin (#99791)#101930

Merged
kibanamachine merged 2 commits intoelastic:7.xfrom
kibanamachine:backport/7.x/pr-99791
Jun 10, 2021
Merged

[7.x] [Workplace Search] Add Account Settings page imported from Security plugin (#99791)#101930
kibanamachine merged 2 commits intoelastic:7.xfrom
kibanamachine:backport/7.x/pr-99791

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backports the following commits to 7.x:

…lugin (elastic#99791)

* Copy lazy_wrapper and suspense_error_boundary from Spaces plugin

These components are needed to enable async loading of Security components into Enterprise Search.

The components are copied without any changes except for i18n ids, so it's easier to DRY out in the future if needed.

* Create async versions of personal_info and change_password components

* Create ui_api that allows to load Security components asuncronously

The patterns were mostly copied from Spaces plugin

* Make ui_api available through Security components's lifecycle methods

* Import Security plugin into Enterprise Search

* Add Security plugin and Notifications service to Kibana Logic file

* Export the required components from the Security plugin and
use them in the new AccountSettings component

* Update link to the Account Settings page

* Move getUiApi call to security start and pass core instead of getStartServices

* Simplify import of change_password_async component by providing...
... `notifications` and `userAPIClient` props in the security plugin

* Remove UserAPIClient from ui_api

It's not needed anymore since the components are initiated with this prop already passed

* Export ChangePasswordProps and PersonalInfoProps from account_management/index.ts

This makes it easier to import these props from outside the account_management folder

* Remove notifications service from kibana_logic

It is not needed anymore since we're initializing security components with notifications already provided

* Add UiApi to SecurityPluginStart interface

* Utilize index files for exporting Props types

* Replace Pick<...> with two separate interfaces as it doesn't work well with our docs

* Add a comment explaining why we're not loading async components through index file
@yakhinvadim
Copy link
Copy Markdown
Contributor

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor Author

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 1415 1417 +2
security 475 482 +7
total +9

Async chunks

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

id before after diff
enterpriseSearch 2.1MB 2.1MB +1.7KB
security 766.7KB 782.3KB +15.6KB
total +17.3KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
security 5 6 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
security 82.5KB 85.3KB +2.8KB
Unknown metric groups

API count

id before after diff
security 109 110 +1

async chunk count

id before after diff
security 21 23 +2

History

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

cc @yakhinvadim

@kibanamachine kibanamachine merged commit d0188d6 into elastic:7.x Jun 10, 2021
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