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

Alert messages with title and details #880

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

devmount
Copy link
Collaborator

Description of the Change

This change was more invasive than I first thought. I changed the alert message flow from simple string to an object providing title and optional details. This way, we are able to show collapsable error, info or warning alerts to the user, even if those are already created from the backend.

Old alert style:
appointment_notice_bar_old

New alert style:
image

Benefits

More verbose alert messages for users improving the UX in case of errors or other incidents.

Applicable Issues

Related to #755

@devmount devmount self-assigned this Feb 21, 2025
@devmount devmount marked this pull request as draft February 21, 2025 12:03
@devmount
Copy link
Collaborator Author

This is still missing some specific error messages (like Google CalDAV not being supported). But other than that, the groundwork for the new notifications / alert messages is done.


def __init__(self, **kwargs):
def __init__(self, reason: str|None = None, **kwargs):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Every API Exception can now have an option reason parameter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is still todo. I'll add some more error messages according to design.

@@ -24,7 +24,7 @@ interface Props {
dataList: TableDataRow[], // List of data to be displayed
filters?: TableFilter[], // List of filters to be displayed
loading: boolean, // Displays a loading spinner
showPagination: boolean;
showPagination?: boolean;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There was an issue with some components not having this attribute specified. Since it already had a default, I made it optional.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This component is now style-scoped and has no Tailwind classes anymore. It aligns with the style of the notification bar now. I approved, I can push this component to the Services UI repo.

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.

1 participant