Skip to content

Conversation

@atiratree
Copy link
Member

@atiratree atiratree commented Jul 3, 2019

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 3, 2019
@atiratree atiratree force-pushed the kubevirt.addDetailActions branch from f11ac82 to e5bb40d Compare July 8, 2019 12:22
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 9, 2019
@atiratree atiratree force-pushed the kubevirt.addDetailActions branch from e5bb40d to 940c4e2 Compare July 9, 2019 17:49
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 9, 2019
@atiratree atiratree force-pushed the kubevirt.addDetailActions branch from 940c4e2 to 236f561 Compare July 9, 2019 18:16
Copy link
Contributor

Choose a reason for hiding this comment

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

Why aren't we using e.g. React.FC type here?

Also, using the props destructuring form is much cleaner:

const Foo: React.FC<FooProps> = ({ name, namespace }) => {};

If you need direct access to props, simply use an alias when destructuring:

const Foo: React.FC<FooProps> = (props: { name, namespace }) => {};

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, it was not updated.

But the props still have to be there because they are passed down to the DetailsPage

Copy link
Contributor

Choose a reason for hiding this comment

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

Please avoid too many acronyms in module names.

I'd suggest to name this directory selectors/vmi-migrations (either plural or singular) instead.

"VMI" is a quite common acronym, but "VMIM" isn't.

Copy link
Member Author

Choose a reason for hiding this comment

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

you are right; changed to vmi-migration

@atiratree atiratree force-pushed the kubevirt.addDetailActions branch from 236f561 to 87baf5c Compare July 15, 2019 09:09
@atiratree
Copy link
Member Author

/test e2e-aws-console-olm

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to export both menuActions and menuActionsCreator?

It seems that menuActionsCreator is the one who is supposed to interpret (execute) menuActions.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes we do. The use cases differ:

  • vm list: the row already has status, etc computed so it just passes it to menuActions
  • vm detail: Once we get detail page resources we compute the status, etc and pass it to all the actions (which is the only way how to pass logic to execute after loading resources before rendering actions)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should add type annotations, e.g. migrations is treated as an array but the signature doesn't reflect this fact.

I'm OK doing this in a follow-up. When adding new code, always try to make use of proper TypeScript.

Copy link
Member Author

Choose a reason for hiding this comment

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

added the types. Although K8sResourceKind instead of a Migration because we don't have the type yet (waits for type generation PR)

@atiratree atiratree force-pushed the kubevirt.addDetailActions branch from 87baf5c to 87190b8 Compare July 15, 2019 19:13
@atiratree
Copy link
Member Author

/test frontend

@atiratree atiratree force-pushed the kubevirt.addDetailActions branch from 87190b8 to c4f3153 Compare July 16, 2019 11:22
@atiratree
Copy link
Member Author

/test e2e-aws

@vojtechszocs
Copy link
Contributor

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: suomiy, vojtechszocs

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

The pull request process is described here

Details 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2019
@atiratree
Copy link
Member Author

/test e2e-aws
/test e2e-aws-console
/test e2e-aws-console-olm

@openshift-merge-robot openshift-merge-robot merged commit b2d8f62 into openshift:master Jul 16, 2019
@spadgett spadgett added this to the v4.2 milestone Jul 17, 2019
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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants