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 error message components #11360

Closed
Tracked by #10732
mlqn opened this issue Oct 12, 2023 · 7 comments · Fixed by #13237
Closed
Tracked by #10732

Cleanup error message components #11360

mlqn opened this issue Oct 12, 2023 · 7 comments · Fixed by #13237
Assignees
Labels
kind/chore status/triage text/content used for issues that need som text improvements, often by ux ux UX help needed

Comments

@mlqn
Copy link
Contributor

mlqn commented Oct 12, 2023

We currently use different components to show error messages when an error occurs while fetching data, which leads to some visual inconsistencies.
I suggest creating one generic component based on Alert component from designsystem.

Dashboard

dashboard

UI Editor

ui-editor

Prosess

prosess

Error boundary

273153504-9a870d63-ff8e-4b23-b3f7-de6f9d3a742c
@mlqn mlqn changed the title Cleanup useQuery messages Cleanup error message components Jun 21, 2024
@nkylstad nkylstad added the ux UX help needed label Jun 26, 2024
@nkylstad
Copy link
Member

nkylstad commented Jun 26, 2024

Create a StudioComponent -> "PageError" or something similar.
Use this component across when there is an error on a page.
Could find relevant places to use the new component by checking for isError from useQuery.

@nkylstad nkylstad added the text/content used for issues that need som text improvements, often by ux label Jun 26, 2024
@Annikenkbrathen
Copy link

Annikenkbrathen commented Jul 11, 2024

I suggest we use the alert from the design system when creating the component "Page-error".
We should be consistent with the placement as well.

(OBS the warning component has new design and should be updated)
Image

I suggest placing the component center-aligned at the top, with some space between the header and the component, to make it stand out more and draw attention
Image

@JamalAlabdullah JamalAlabdullah self-assigned this Jul 22, 2024
@JamalAlabdullah JamalAlabdullah linked a pull request Jul 26, 2024 that will close this issue
4 tasks
@JamalAlabdullah JamalAlabdullah removed their assignment Jul 26, 2024
@mlqn
Copy link
Contributor Author

mlqn commented Jul 29, 2024

The ErrorBoundary alert can't be tested as it stopped working after upgrading react-router-dom (see #13248). I will update the alert when I fix the issue.

@mlqn
Copy link
Contributor Author

mlqn commented Aug 8, 2024

I noticed that error messages of the overview do not exactly have the same visual as one uses an Alert from Designsystem while the other uses the new StudioPageError component.

overview-errors

I don't think the error in the News section should use the StudioPageSpinner component, as it does not need margins or a title.

We might consider doing as we did with the spinner (StudioPageSpinner, StudioSpinner) and dividing the StudioPageError component into two components:

  • StudioPageError for page-level errors that need margins and possibly a title as well
  • StudioError for simple errors like those in the screenshot above 🤷‍♂️

@mlqn
Copy link
Contributor Author

mlqn commented Aug 8, 2024

I also noticed an error in a title of the UX editor errors:

Screenshot 2024-08-08 at 11 28 08

@mlqn mlqn assigned JamalAlabdullah and unassigned mlqn Aug 8, 2024
@mlqn mlqn assigned mlqn and unassigned mlqn Aug 8, 2024
@framitdavid
Copy link
Collaborator

I also noticed an error in a title of the UX editor errors:

Screenshot 2024-08-08 at 11 28 08

I think my PR which is about Error Boundary would change this. Since within my PR I let the router handle the page errors. #13304

@JamalAlabdullah
Copy link
Contributor

I created this new issue to create a new component StudioError and use it instead of alerts with severity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/chore status/triage text/content used for issues that need som text improvements, often by ux ux UX help needed
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants