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 component for errors and notifications #8933

Open
jldec opened this issue Mar 23, 2022 · 5 comments
Open

Alert component for errors and notifications #8933

jldec opened this issue Mar 23, 2022 · 5 comments
Labels
component: dashboard meta: never-stale This issue can never become stale team: webapp Issue belongs to the WebApp team type: improvement Improves an existing feature or existing code user experience

Comments

@jldec
Copy link
Contributor

jldec commented Mar 23, 2022

There are places where the dashboard client uses alert() or console.error().

  • console.error() messages obscure the error instead of alerting the user in a visble way in the UI.
  • alert() is blocking and not stylistically consistent with other dashboard UI.
  • Other scenario-specific notification mechanisms (like [dashboard] display warning for latest IDE versions #8783) are are not suitable for general purpose use.

It would be better to show notifications and errors in a simple, consistent way that does not demand interaction, but nevertheless makes it visible in a clear but non-surprising way.

GitHub uses a banner at the top of the page for notifications and errors. The banner can be dismissed but also disappears automatically after navigating. See also Bootstrap examples here.

Requirements

  • not modal - do not cover or block other interations
  • dismissable
  • allow multiple notifications (ok to overlay, and view one by one)
  • works across admin dashboard, regular dashboard, and start-workspace UI
  • loud (red?) notification for errors
  • less-loud (orange?) notifications for non-error alerts
  • visible on small screens (top of page, not bottom)

Typical use cases

@jldec jldec added the team: webapp Issue belongs to the WebApp team label Mar 23, 2022
@gtsiolis
Copy link
Contributor

Using an alert component on the top of the corresponsing page could sounds good. Do we have any concrete cases where this needs to be visible? For example, see #8831 (comment).

... now when the configuration is invalid we're blocking the users from starting a new workspace without any error or visual feedback as we did with when having the ability to trigger a prebuild ...

@geropl geropl changed the title Show client side errors to users in an unobtrusive way, instead of console.error() Show client side errors to users in an unobtrusive way, instead of alert() Apr 29, 2022
@geropl geropl added component: dashboard user experience type: improvement Improves an existing feature or existing code labels Apr 29, 2022
@geropl
Copy link
Member

geropl commented Apr 29, 2022

Cases I can think of:

  • (technical) websocket connection cannot be established: most common cause that triggers alert atm
    If we had an unobtrusive alert component/banner, there are a lot of opportunities to use it for product-related stuff:
  • (product) warn/notify of double subscriptions (team+personal): we had an issue for that, cannot find it
  • (product) limit warnings for hour-limited subscriptions
  • (?) (product) announce important product changes: slightly different usecase, not sure if that should be the same component/channel
  • (?) (ops) announce downtime ahead of time: we will have that at some point
  • ... (I feel that there are some more here)

@jldec jldec changed the title Show client side errors to users in an unobtrusive way, instead of alert() Alert component for errors and notifications May 14, 2022
@jldec
Copy link
Contributor Author

jldec commented May 15, 2022

See #8783 for example which was designed for workspace start screen only.

@stale
Copy link

stale bot commented Aug 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Aug 16, 2022
@jldec jldec added meta: never-stale This issue can never become stale and removed meta: stale This issue/PR is stale and will be closed soon labels Aug 27, 2022
@gtsiolis
Copy link
Contributor

Now with the AppNotifications in place from #11556, this could use a global alert component (error variant) to surface such errors, see also #12452 (comment). Cc @AlexTugarev @jldec @geropl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dashboard meta: never-stale This issue can never become stale team: webapp Issue belongs to the WebApp team type: improvement Improves an existing feature or existing code user experience
Projects
Status: No status
Development

No branches or pull requests

3 participants