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] Adopt multi-package strategy - ExitFullScreenButton #130355

Merged

Conversation

clintandrewhall
Copy link
Contributor

Summary

A lot of detail is contained in the README.mdx file in /packages/shared-ux.

As we've begun adding components, we've run into a few issues with our package-based architecture, particularly with bundle size and build times. To reduce/remove the "dependency bottleneck", Shared UX is going to take a step further and adopt a "package-per-concern" approach. This means each component or "subject" of components will be packaged separately.

This PR is a sanity-checked first attempt at what these separate packages will look like.

What this PR does

  • creates a package for ExitFullScreenButton that demonstrates how this divided approach will work.
  • decouples the ExitFullScreenButton from our abstracted services architecture.

What this PR does not do, (that future PRs will do)

this list is in order of priority

  • move every component to a new package
  • provide a means of combining Providers into a single Provider instance
  • move our utility package to this new directory
  • move our storybook config to this new directory

@clintandrewhall clintandrewhall added review loe:large Large 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 Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.3.0 labels Apr 15, 2022
@clintandrewhall clintandrewhall requested review from spalger and a team April 15, 2022 03:20
@clintandrewhall clintandrewhall requested review from a team as code owners April 15, 2022 03:20
Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for working with us on this

@spalger
Copy link
Contributor

spalger commented Apr 15, 2022

#130390 will fix the TypeScript error you're seeing.

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Moved scss file.

@spalger
Copy link
Contributor

spalger commented Apr 15, 2022

@clintandrewhall #130403 will fix the jest config check error

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataViewEditor 177 169 -8
maps 887 796 -91
spaces 288 280 -8
total -107

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-button-exit-full-screen - 2 +2

Async chunks

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

id before after diff
dataViewEditor 176.3KB 170.1KB -6.2KB
maps 2.7MB 2.6MB -127.9KB
spaces 290.9KB 284.5KB -6.4KB
total -140.5KB

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-button-exit-full-screen - 3 +3

Page load bundle

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

id before after diff
maps 70.1KB 70.0KB -106.0B
Unknown metric groups

API count

id before after diff
@kbn/shared-ux-button-exit-full-screen - 12 +12
@kbn/shared-ux-components 38 34 -4
total +8

async chunk count

id before after diff
dataViewEditor 8 7 -1
maps 17 12 -5
spaces 18 17 -1
total -7

miscellaneous assets size

id before after diff
maps 691.3KB 529.6KB -161.8KB

History

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

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

maps changes LGTM
code review

dmlemeshko pushed a commit to dmlemeshko/kibana that referenced this pull request May 5, 2022
…tic#130355)

* [Shared UX] Adopt multi-package strategy - ExitFullScreenButton

* Fixing checks errors

* Fix i18n

* Remove SharedUX deps from Maps

Co-authored-by: Spencer <spencer@elastic.co>
kertal pushed a commit to kertal/kibana that referenced this pull request May 24, 2022
…tic#130355)

* [Shared UX] Adopt multi-package strategy - ExitFullScreenButton

* Fixing checks errors

* Fix i18n

* Remove SharedUX deps from Maps

Co-authored-by: Spencer <spencer@elastic.co>
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:large Large 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.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants