Skip to content

Conversation

@atiratree
Copy link
Member

needed for #2452

@openshift-ci-robot openshift-ci-robot added component/shared Related to console-shared size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 22, 2019
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 23, 2019
@atiratree atiratree changed the title shared: InfoStatus - support showing popover without header shared: InfoStatus - support active icon and showing popover without header Aug 23, 2019
@openshift-ci-robot openshift-ci-robot added component/core Related to console core functionality component/olm Related to OLM labels Sep 17, 2019
@atiratree atiratree changed the base branch from master to master-4.3 September 17, 2019 15:24
@atiratree atiratree changed the title shared: InfoStatus - support active icon and showing popover without header shared: PopoverStatus - support active icon and showing popover without header Sep 17, 2019
@atiratree
Copy link
Member Author

/retest

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we extract this into PopoverStatusProps to avoid complex in-line types?

Copy link
Contributor

Choose a reason for hiding this comment

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

If hideHeader is true we'll be passing headerContent={false} to the Popover component.

I think it's more correct to omit headerContent instead of passing headerContent={false} but since the type is React.ReactNode I think this code is OK.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use React.useCallback for function props, like onHide and onShow ?

@atiratree
Copy link
Member Author

fixed

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 extract these memoized callbacks into separate variables.

Also, any function used within these callbacks should be treated as their dependency.

const [isActive, setActive] = React.useState(false);
const onHide = React.useCallback(() => setActive(false), [setActive]);

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

@vojtechszocs
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 23, 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 Sep 23, 2019
@openshift-merge-robot openshift-merge-robot merged commit 1d45603 into openshift:master-4.3 Sep 23, 2019
@spadgett spadgett added this to the v4.3 milestone Sep 26, 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. component/core Related to console core functionality component/olm Related to OLM component/shared Related to console-shared lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants