Feature #1204

Better Action Feedback

Added by Pavan Rikhi about 2 years ago. Updated 12 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Pavan Rikhi% Done:

100%

Category:UISpent time:-
Target version:v1.00.00 - Deployment
Easy Pickings:

Description

Add a notification system, either w/ bootstrap alerts or notifications in the corner.

Eventually incorporate system notifications?

Associated revisions

Revision f5346893
Added by Pavan Rikhi 12 days ago

[#1204] Show Feedback Text When Adding To Cart

When a Customer clicks the "Add to Cart" button for a Product, track the
status of the API request & show feedback text while the request is
loading & when it returns an error or successful response.

After a response is received, hide the feedback text after 10 seconds.

Closes #1204

History

#1 Updated by Pavan Rikhi 12 months ago

  • Category changed from General to UI

#2 Updated by Pavan Rikhi 11 months ago

Bootstrap 4.2 adds support for "toast notifications" which we could use instead of a separate library. But it requires javascript, so maybe we'll program the interactive bits ourself?

https://getbootstrap.com/docs/4.2/components/toasts/

#3 Updated by Pavan Rikhi 4 months ago

Pavan Rikhi wrote:

But it requires javascript, so maybe we'll program the interactive bits ourself?

E.g., Toast module w/ type Toast, type alias ToastConfig, updateToasts : ToastConfig -> ToastMsg -> List Toast -> (List Toast, Cmd ToastMsg), & renderToasts : ToastConfig -> List Toast -> Html ToastMsg.

Config should have something like toastsPosition & toastsTimeout?

If made modular enough, publish as separate package.

#4 Updated by Pavan Rikhi 23 days ago

Start w just add to cart notifications and logout failure notofications.

#5 Updated by Pavan Rikhi 13 days ago

  • Target version changed from v1.00.00 - Deployment to v1.01.00 - Coupons Admin

#6 Updated by Pavan Rikhi 13 days ago

Modify the AddToCartForms to store the remotedata of the request.

In cartForm view, when NotAsked, show nothing. When loading show "Adding to Cart..." w/ spinner. When Failure, show error. When Success, show green text with checkmark.

On Failure & Success responses, start timer that resets status to NotAsked after a bit.

When sending API requests, include variant ID w/ return Msg so we can update the correct form.

#7 Updated by Pavan Rikhi 12 days ago

  • Target version changed from v1.01.00 - Coupons Admin to v1.00.00 - Deployment

#8 Updated by Pavan Rikhi 12 days ago

Put the logout error into separate issue, add to cart feedback is in.

#9 Updated by Pavan Rikhi 12 days ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Also available in: Atom PDF