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

Toast Notification position #3537

Open
antoniolodias opened this issue May 23, 2024 · 4 comments
Open

Toast Notification position #3537

antoniolodias opened this issue May 23, 2024 · 4 comments
Labels
🐛 Type: Bug Something isn't working

Comments

@antoniolodias
Copy link
Contributor

Describe the issue

Toast notification seems to be attached to page top instead of screen top, so if you scroll down and click something that gives some kind of notification, this won't be seen

To Reproduce

If you look before PR merge:
https://mc-16889.mc-preview.europe-west1.gcp.escemo.com/blt-nail/orders/new/order-details
otherwise:
https://mc.europe-west1.gcp.escemo.com/blt-nail/orders/new/order-details

  1. set a small screen
  2. Pick USD currency
  3. Pick customer [email protected]
  4. Search for SKU 1200109660
  5. Click “Add” to add product to cart
  6. Scroll all the way down
  7. Click “Next”
  8. On shipping method page, click "Next"
  9. Error: nothing happens
  10. Click a few more times and you will notice toast notifications coming from the top

Expected behaviour

Toast notification should be always visible regardless of your scroll position

recording

Screen.Recording.2024-05-23.at.09.28.21.mov
@antoniolodias antoniolodias added the 🐛 Type: Bug Something isn't working label May 23, 2024
@kark
Copy link
Contributor

kark commented May 23, 2024

Hi 👋,
Thank you for reporting this issue. To clarify, our notification system offers three types of notifications: global, page, and side notifications.

According to our documentation:

Notifications are grouped by so-called domains. A domain specifies where the notification should be displayed on the page (for instance page and side).

Therefore, this choice of positioning of the side-domain notifications container in the page (instead of fixed positioning against the viewport) appears to be intentional.

Please mind about the bits:

Be mindful of your users when dispatching notifications. Excessive and confusing notifications can lead to a poor user experience.
Generally, error notifications should be displayed in the page domain rather than the side domain.

I’m tagging @FilPob to see if we need to revisit any aspects of this.

@antoniolodias
Copy link
Contributor Author

Hi there @kark 👋
Thanks for looking into this!

The Global type might work, thank you for pointing that out, but at the same time I don't understand why would we want to trigger a side toast notification that is not visible.

@kark
Copy link
Contributor

kark commented May 24, 2024

Hey @antoniolodias 👋,

I don't understand why would we want to trigger a side toast notification that is not visible

Thanks for pointing that out, that's a fair point. We definitely don't want that to happen.
But we need to look into the tradeoffs of orienting side and page notifications against the viewport.
For instance, users with smaller viewports won't be able to see bottom notifications because they wouldn't have the option to scroll, unlike they are able to do now.
image

We'll investigate this further.

Thanks for bringing it up!

@antoniolodias
Copy link
Contributor Author

Thank you @kark

I thought the solution could be setting the notifications' container with position fixed instead of relative and allow scroll if needed. But I can be over simplifying it... The UIUX team might have some guidance as well.
Thank you again for looking into this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants