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

Part II: Unify fail alerts #1654

Merged
merged 5 commits into from
Mar 1, 2022

Conversation

ShaiahWren
Copy link
Contributor

Issue: https://issues.redhat.com/browse/AAH-1354

This pr works towards unifying fail alert notifications across the application. The effort will be broken into several prs.

Please reference this working document for a list of target notifications.

@@ -120,7 +120,7 @@ export class NamespaceForm extends React.Component<IProps, IState> {
formErrors: {
...this.state.formErrors,
groups: {
title: t`Error loading groups.`,
title: t`Groups list could not be displayed.`,
description: err,
Copy link
Collaborator

@himdel himdel Feb 28, 2022

Choose a reason for hiding this comment

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

so, err in ObjectPermissionField onError is the same as err?.message elsewhere .. should this therefore also use errorMessage?

(You'll also need to

--- a/src/components/permissions/obect-permission-field.tsx
+++ b/src/components/permissions/obect-permission-field.tsx
@@ -123,2 +123,2 @@ export class ObjectPermissionField extends React.Component<IProps, IState> {
-      .catch((e) => this.props.onError(e?.message));
+      .catch((e) => this.props.onError(e));

to make it work.)

@@ -176,7 +176,7 @@ export class NamespaceModal extends React.Component<IProps, IState> {
formErrors: {
...this.state.formErrors,
groups: {
title: t`Error loading groups.`,
title: t`Groups list could not be displayed.`,
description: err,
Copy link
Collaborator

Choose a reason for hiding this comment

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

this.setState({
formErrors: {
...this.state.formErrors,
groups: {
title: t`Error loading groups.`,
title: t`Groups list could not be displayed.`,
description: err,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

@himdel himdel left a comment

Choose a reason for hiding this comment

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

LGTM as well, just the 3 ObjectPermissionField changes :)

@ShaiahWren ShaiahWren force-pushed the unify-fail-alerts-part-II branch 2 times, most recently from 2708746 to 70c90cf Compare February 28, 2022 17:47
@ShaiahWren
Copy link
Contributor Author

ShaiahWren commented Feb 28, 2022

@himdel Done, though I had to change onError to take type any for it to work. Lmk if you accept!

Copy link
Member

@ZitaNemeckova ZitaNemeckova left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Cypress failures seem to be unrelated to the PR changes.

@ShaiahWren ShaiahWren merged commit f4dfdd7 into ansible:master Mar 1, 2022
@ShaiahWren ShaiahWren deleted the unify-fail-alerts-part-II branch March 1, 2022 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants