Conventions for Error Feedback to Users

I’m working on an app and I’ve been scouring the development guides and I’ve been trying out apps to see how they report errors back to users and I’m at a loss as to what the proper way to do this is.

I’ve seen the following ways errors / warnings are reported back to users:

  • a black bar at the top with small white text
  • a new page with the error message in theme colors (usually after Cancel/Accept Dialog)
  • a notification
  • a variety of other ways

but no single one really stands out as the most used one… maybe the white on black bar at the top, which I don’t really like since it’s easy to miss.

Can I get some opinions on this? (And example code would be welcome as well.)

My preference would be a rectangle centered on the screen floating over the current page, but that would yet be one more different way and I do not even know if it is possible in QML.

1 Like

I don’t believe there’s a standard way to do this, and no doubt different errors have different requirements (e.g. some require user interaction, whereas others are better presented in a more passive way).

There’s some discussion about presenting errors in this thread. In that case it’s about errors during sync, where it’s better to intrude on the user as little as possible.

Some other alternatives:

  1. Here’s the Notifications API reference.
  2. harbour-tidings does it using this Notification component called here.
  3. Piepmatz uses a “toast-like” component (a rounded rectangle that appears in the centre of the screen). Here’s the AppNotification and AppNotificationItem it’s made up of.

Personally, I’d always say it’s better to use the standard notifications over something bespoke, if they fit what you need.

1 Like

Thanks. A notification might be the best first attempt at this since it provides familiarity and persistence. Nothing more annoying than an error message that disappears before one could read it.

Still, it feels a bit like a hack.

I also already was in the same situation and searched for a native component to display in-app notifications, unfortunatelly SFOS does not offer such a component.
Therefore every developer has to implement its own idea of an in-app notification banner what causes a plenty not unified ways of notifying the user.

I would love to see an official component for in-app notifications.