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

Display better error messages using in-app notification banners #121

Open
kevinaboos opened this issue Aug 20, 2024 · 0 comments
Open

Display better error messages using in-app notification banners #121

kevinaboos opened this issue Aug 20, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Looking for help from anyone!

Comments

@kevinaboos
Copy link
Member

Current state

Currently, Robrix can only show errors, warnings, and other non-content information by updating the Status label in the rooms_list. This is okay for early errors like login failures, but it doesn't work at all when any rooms at all are shown, as the status label will be pushed to the very bottom and replaced by a count of joined rooms found so far.

Clearly, the existing "solution" of abusing the Status label for this purpose is inadequate.

Desired solution

Instead, we should utilize some sort of pop-up banner to notify the user of any relevant info. This can be either a banner along the top or bottom, or a "toast"-like notification that auto-disappears after several seconds, or any other common notification paradigm.

In the future, this same mechanism could also be used for in-app notifications about actual Matrix content, such as informing the user of new messages that arrived in a hidden/background room that the user should be aware of.

While this mechanism doesn't yet exist in upstream Makepad, the Moxin app has implemented something very similar to notify the user that a download has completed. Here's what Moxin's in-app popup modal looks like when it is shown in the top-right corner of the app:
image

Note that the link button that will navigate to a specific part of the app should be optional, depending on the nature of the error message or other info that is included in the notification.

To implement this, we can copy the code for Moxin's PopupDialog widget and modify it to suit our needs: https://github.com/moxin-org/moxin/blob/5b21144ced0b8161c4565cba241ae0e3fd8ddf3a/src/shared/download_notification_popup.rs#L1

@kevinaboos kevinaboos added enhancement New feature or request good first issue Good for newcomers help wanted Looking for help from anyone! labels Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Looking for help from anyone!
Projects
Status: Ready
Development

No branches or pull requests

1 participant