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

Cleanup useMutation messages #10827

Closed
Tracked by #10732
mlqn opened this issue Aug 17, 2023 · 1 comment · Fixed by #10896
Closed
Tracked by #10732

Cleanup useMutation messages #10827

mlqn opened this issue Aug 17, 2023 · 1 comment · Fixed by #10896
Assignees

Comments

@mlqn
Copy link
Contributor

mlqn commented Aug 17, 2023

We are currently using different components to display messages, which leads to some visual inconsistencies.
I suggest replacing them with the new toast component and removing error messages that are duplicates of the default error message.


Generating data model

  1. Go to Datamodell
  2. Add an empty object
  3. Click Generer modeller
  4. The Request failed with status code 500 error message should not be displayed
datamodel-error.mov
  1. Go toDatamodell
  2. Create a new data model
  3. Click Generer modeller
  4. The success message should be displayed as a toast to be consistent with the other success messages
datamodel-success.mov

Committing and pushing changes

  1. Add a new component into the layout
  2. Add a new file in Gitea
  3. Click Last opp dine endringer, add a commit message, and click Valider endringer
  4. The popover should not show a success message when an error occurs
commit-and-push-error.mov

Creating a new app

  1. Go to Dashboard
  2. Click Opprett ny applikasjon
  3. Write an app name that already exists
  4. Det har oppstått en feil error message should not be displayed
create-existing-app.mov
  1. Go to Dashboard
  2. Click Opprett ny applikasjon
  3. Block the /create-app endpoint using a tool like Requestly
  4. Noe gikk galt ved oppretting av appen should not be displayed as it is a duplicate of the default error message
create-app-error.mov

Deleting/Editing a text resource

  1. Go to Tekst
  2. Block the /text/keys endpoint using Requestly
  3. Delete or edit a text
  4. The javascript alert should not be displayed as it is a duplicate of the default error message
text-error.mov

Resetting changes

  1. Go to Oversikt
  2. Click Slett mine endringer
  3. Write the current application name and click Slett mine endringer
  4. The popover is buggy and should be replaced by toast for error and success messages
reset-changes-success.mov

Building an app

  1. Go to Deploy
  2. Block the /releases and /deployments endpoints using Requestly
  3. Write a version number, a description and click Bygg versjon
  4. This popover should not be displayed as it is a duplicate of the default error message
263197617-a547c0dd-3f0b-41ce-aa2b-9ce37aaa3fe7
@mlqn mlqn changed the title Remove duplicated error components (ErrorMessageComponent, Alert, ErrorMessage, ...) Cleanup useMutation error messages Aug 25, 2023
@mlqn mlqn linked a pull request Aug 25, 2023 that will close this issue
5 tasks
@mlqn mlqn self-assigned this Aug 25, 2023
@mlqn mlqn changed the title Cleanup useMutation error messages Cleanup useMutation messages Aug 25, 2023
@JamalAlabdullah
Copy link
Contributor

I tested, It works well 👍

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

Successfully merging a pull request may close this issue.

2 participants