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

Page loader for DR policy list page and create policy page #937

Merged

Conversation

GowthamShanmugam
Copy link
Contributor

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2023

@GowthamShanmugam: This pull request references Bugzilla bug 2212931, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @PrasadDesala

In response to this:

Bug 2212931: Page loader for delay in fetching cluster names or DRPolicy related details

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
Copy link
Contributor

openshift-ci bot commented Jul 26, 2023

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: PrasadDesala.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@GowthamShanmugam: This pull request references Bugzilla bug 2212931, which is valid.

No validations were run on this bug

Requesting review from QA contact:
/cc @PrasadDesala

In response to this:

Bug 2212931: Page loader for delay in fetching cluster names or DRPolicy related details

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.

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.

@GowthamShanmugam
Copy link
Contributor Author

GowthamShanmugam commented Jul 26, 2023

Screencast.from.2023-07-26.15-42-33.webm

@GowthamShanmugam
Copy link
Contributor Author

Screencast.from.2023-07-26.15-41-17.webm

<EmptyPage
title={t('No disaster recovery policies yet')}
buttonText={t('Create DRPolicy')}
canAccess={!drPoliciesLoadError && drPoliciesLoaded}
t={t}
isLoaded={drPoliciesLoaded || !!drPoliciesLoadError}
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't u mean this ?? or in case of any error u are assuming it to be as loaded ??

Suggested change
isLoaded={drPoliciesLoaded || !!drPoliciesLoadError}
isLoaded={drPoliciesLoaded && !drPoliciesLoadError}

Copy link
Collaborator

Choose a reason for hiding this comment

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

in case of any error u are assuming it to be as loaded ?? >> if so, then what will happen in case of any error, what will appear on screen ??

Copy link
Contributor Author

@GowthamShanmugam GowthamShanmugam Jul 27, 2023

Choose a reason for hiding this comment

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

drPoliciesLoadError
Yes, I think both conditions are similar, But I will change to drPoliciesLoaded && !drPoliciesLoadError.
In case of an error, Just like ACM pages, The Empty page will disable the create DRPolicy button and display a default permission denied message over the button.
Screenshot from 2023-07-27 14-29-47

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested, drPoliciesLoaded && !drPoliciesLoadError won't work when any user comes with DRPolicy read permission, it leads to keep loading. In that case, drPoliciesLoaded is always false and drPoliciesLoadError has permission-related errors.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ack... can u plz add a comment for the reason of doing this...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@GowthamShanmugam
Copy link
Contributor Author

/hold adding unit testing

@GowthamShanmugam
Copy link
Contributor Author

/hold cancel

@GowthamShanmugam GowthamShanmugam changed the title Bug 2212931: Page loader for delay in fetching cluster names or DRPolicy related details Bug 2212931: Page loader DR policy list page and create policy page Aug 3, 2023
@GowthamShanmugam GowthamShanmugam changed the title Bug 2212931: Page loader DR policy list page and create policy page Bug 2212931: Page loader DR for policy list page and create policy page Aug 3, 2023
@GowthamShanmugam GowthamShanmugam changed the title Bug 2212931: Page loader DR for policy list page and create policy page Bug 2212931: Page loader for DR policy list page and create policy page Aug 3, 2023
@@ -43,13 +49,15 @@ const EmptyPage: React.FC<EmptyPageProps> = (props) => {
}
trigger={!canAccess ? 'mouseenter' : 'manual'}
data-test="authorization-tooltip"
aria-label="Not Authorized"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
aria-label="Not Authorized"
aria-label=t('Not Authorized')

Copy link
Contributor Author

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 translate aria-label?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, it looks like most of the places in odf-console is translating aria-label

return !isLoaded ? (
<div
className="loading-skeleton--table mco-empty-page__skeleton"
aria-label="Loading Empty Page"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
aria-label="Loading Empty Page"
aria-label=t('Loading Empty Page')

>
{
<Button
variant="primary"
onClick={onClick}
isAriaDisabled={!canAccess}
data-test="create-button"
aria-label="Create DRPolicy"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
aria-label="Create DRPolicy"
aria-label=t('Create DRPolicy')

@SanjalKatiyar
Copy link
Collaborator

minor comments @GowthamShanmugam... LGTM...

@GowthamShanmugam GowthamShanmugam changed the title Bug 2212931: Page loader for DR policy list page and create policy page Page loader for DR policy list page and create policy page Aug 8, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 8, 2023

@GowthamShanmugam: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

Page loader for DR policy list page and create policy page

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.

@GowthamShanmugam
Copy link
Contributor Author

/cherry-pick release-4.14

@openshift-cherrypick-robot

@GowthamShanmugam: once the present PR merges, I will cherry-pick it on top of release-4.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.14

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.

@GowthamShanmugam
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 8, 2023

@GowthamShanmugam: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

/bugzilla refresh

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.

@GowthamShanmugam
Copy link
Contributor Author

/cherry-pick release-4.14-compatibility

@openshift-cherrypick-robot

@GowthamShanmugam: once the present PR merges, I will cherry-pick it on top of release-4.14-compatibility in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.14-compatibility

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.

@GowthamShanmugam
Copy link
Contributor Author

@SanjalKatiyar Changes done

@SanjalKatiyar
Copy link
Collaborator

/approve
/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 9, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GowthamShanmugam, SanjalKatiyar

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

@openshift-ci openshift-ci bot added the approved label Aug 9, 2023
@openshift-merge-robot openshift-merge-robot merged commit 1d4675d into red-hat-storage:master Aug 9, 2023
3 checks passed
@openshift-cherrypick-robot

@GowthamShanmugam: new pull request created: #960

In response to this:

/cherry-pick release-4.14

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-cherrypick-robot

@GowthamShanmugam: new pull request created: #961

In response to this:

/cherry-pick release-4.14-compatibility

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants