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

Don't use AsyncComponent PF3 Switch #2383

Merged

Conversation

spadgett
Copy link
Member

This creates a separate bundle with all of PF3 and breaks tree-shaking.
Removing the AsyncComponent doesn't increase the main vendor bundle size.

Here is the PF3 chunk that this change removes:

Screen Shot 2019-08-17 at 10 12 30 AM

Credit to @redallen for tracking this down!

/cc @alecmerdler @redallen

@openshift-ci-robot
Copy link
Contributor

@spadgett: GitHub didn't allow me to request PR reviews from the following users: redallen.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

This creates a separate bundle with all of PF3 and breaks tree-shaking.
Removing the AsyncComponent doesn't increase the main vendor bundle size.

Here is the PF3 chunk that this change removes:

Screen Shot 2019-08-17 at 10 12 30 AM

Credit to @redallen for tracking this down!

/cc @alecmerdler @redallen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. component/core Related to console core functionality component/metal3 Related to metal3-plugin component/olm Related to OLM approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 17, 2019
@spadgett spadgett mentioned this pull request Aug 17, 2019
@spadgett spadgett added this to the v4.2 milestone Aug 18, 2019
Copy link
Contributor

@alecmerdler alecmerdler left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 19, 2019
@spadgett
Copy link
Member Author

/retest

@spadgett
Copy link
Member Author

/hold

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 19, 2019
@spadgett
Copy link
Member Author

I didn't mean to change the metal3 import. @alecmerdler another look?

/hold cancel

@@ -6,6 +6,7 @@ import { safeDump } from 'js-yaml';
import * as _ from 'lodash-es';
import { PropertyPath } from 'lodash';
import * as classNames from 'classnames';
import { Switch } from 'patternfly-react';
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to prefer importing from patternfly-react, rather than @patternfly/react-core(already imported in this file)?

Copy link
Member Author

Choose a reason for hiding this comment

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

One is PF3. The other is PF4. We should eventually migrate to the PF4 component, but it’s not a drop in replacement

Copy link
Member

Choose a reason for hiding this comment

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

👍 Thanks for the explanation

This creates a separate bundle with all of PF3 and breaks tree-shaking.
Removing the AsyncComponent doesn't increase the main vendor bundle size.
@spadgett
Copy link
Member Author

Rebased

@spadgett
Copy link
Member Author

@alecmerdler ptal

Copy link
Contributor

@alecmerdler alecmerdler left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 27, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alecmerdler, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@spadgett
Copy link
Member Author

/retest

1 similar comment
@spadgett
Copy link
Member Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit d01a719 into openshift:master Aug 27, 2019
@spadgett spadgett deleted the remove-async-switch branch August 28, 2019 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/metal3 Related to metal3-plugin component/olm Related to OLM lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants