-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: main
Are you sure you want to change the base?
Conversation
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): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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:

New alert style:

Benefits
More verbose alert messages for users improving the UX in case of errors or other incidents.
Applicable Issues
Related to #755