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

[shared-ux][packages] 4. Create Components Package #127551

Merged

Conversation

clintandrewhall
Copy link
Contributor

Summary

This is a subset of the work in #127419 for ease of review and commit history.

Depends on #127546
Depends on #127548
Depends on #127549

This PR completes the migration of stateless Shared UX code to packages by moving the components.

Why?

With only a few components, we've run into issues with circular dependencies. Our plugin is consuming code and types from other plugins, and once we do, those plugins can't use our plugin or its components. To mitigate this, we need to keep Shared UX as stateless and dependency free as possible.

Talking with ops, it became clear our assets don't actually need a plugin lifecycle to operate. This PR is one step in decoupling our components, services and utilities to packages.

TODO

  • Complete .mdx documentation.
  • File an issue to track TS unknown types, pending dependent teams moving their types to packages.
    • @elastic/kibana-app-services - DataView from src/plugins/data_views

@clintandrewhall clintandrewhall added review loe:medium Medium Level of Effort release_note:skip Skip the PR/issue when compiling release notes impact:critical This issue should be addressed immediately due to a critical level of impact on the product. backport:skip This commit does not require backporting v8.2.0 Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Mar 11, 2022
@clintandrewhall clintandrewhall requested a review from a team March 11, 2022 22:36
@clintandrewhall clintandrewhall requested a review from a team as a code owner March 11, 2022 22:36
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Default CI Group #2 / Reporting APIs Network Policy should fail job when page voilates the network policy

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
sharedUX 56 22 -34

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/shared-ux-components - 1 +1

Async chunks

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

id before after diff
sharedUX 100.7KB 0.0B -100.7KB

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
@kbn/shared-ux-components - 1 +1
sharedUX 1 0 -1
total -0

Page load bundle

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

id before after diff
sharedUX 5.1KB 2.2KB -2.9KB
Unknown metric groups

API count

id before after diff
@kbn/shared-ux-components - 12 +12
sharedUX 14 6 -8
total +4

async chunk count

id before after diff
sharedUX 4 0 -4

ESLint disabled line counts

id before after diff
@kbn/shared-ux-components - 1 +1
sharedUX 1 0 -1
total -0

Total ESLint disabled count

id before after diff
@kbn/shared-ux-components - 1 +1
sharedUX 3 2 -1
total -0

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

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

I'll give a quick 👍 for Kibana-design based on moving the .scss file to a new location.

@cchaos cchaos requested a review from a team March 14, 2022 19:04
import { NoDataViews as NoDataViewsComponent } from './no_data_views.component';

export interface Props {
onDataViewCreated: (dataView: DataView) => void;
onDataViewCreated: (dataView: unknown) => void;
Copy link
Contributor

Choose a reason for hiding this comment

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

😬

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I know. I'm filing a follow-up issue for this, so we can resolve it. I'll add the comment I made in #127546

@clintandrewhall clintandrewhall merged commit e4d0e79 into shared_ux/packages/utility Mar 14, 2022
@clintandrewhall clintandrewhall deleted the shared_ux/packages/components branch March 14, 2022 21:18
clintandrewhall added a commit that referenced this pull request Mar 14, 2022
* [shared-ux][packages] 3. Create Utility Package

* [shared-ux][packages] 4. Create Components Package (#127551)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
clintandrewhall added a commit that referenced this pull request Mar 14, 2022
* [shared-ux][packages] 2. Create Storybook Package

* [shared-ux][packages] 3. Create Utility Package (#127549)

* [shared-ux][packages] 3. Create Utility Package

* [shared-ux][packages] 4. Create Components Package (#127551)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
clintandrewhall added a commit that referenced this pull request Mar 16, 2022
* [shared-ux][packages] 1. Create Services Package

* Address review feedback

* [shared-ux][packages] 2. Create Storybook Package (#127548)

* [shared-ux][packages] 2. Create Storybook Package

* [shared-ux][packages] 3. Create Utility Package (#127549)

* [shared-ux][packages] 3. Create Utility Package

* [shared-ux][packages] 4. Create Components Package (#127551)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Merging

* Adding docs

* A few fixes

* Fix TS types

* Fix TS types

* Fix i18n

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
maksimkovalev pushed a commit to maksimkovalev/kibana that referenced this pull request Mar 18, 2022
* [shared-ux][packages] 1. Create Services Package

* Address review feedback

* [shared-ux][packages] 2. Create Storybook Package (elastic#127548)

* [shared-ux][packages] 2. Create Storybook Package

* [shared-ux][packages] 3. Create Utility Package (elastic#127549)

* [shared-ux][packages] 3. Create Utility Package

* [shared-ux][packages] 4. Create Components Package (elastic#127551)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Merging

* Adding docs

* A few fixes

* Fix TS types

* Fix TS types

* Fix i18n

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:medium Medium Level of Effort release_note:skip Skip the PR/issue when compiling release notes review Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants