Better Action Feedback
|Assignee:||Pavan Rikhi||% Done:|
|Target version:||v1.00.00 - Deployment|
Add a notification system, either w/ bootstrap alerts or notifications in the corner.
Eventually incorporate system notifications?
[#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.
#2 Updated by Pavan Rikhi 11 months ago
#3 Updated by Pavan Rikhi 4 months ago
Pavan Rikhi wrote:
Toast module w/
type alias ToastConfig,
updateToasts : ToastConfig -> ToastMsg -> List Toast -> (List Toast, Cmd ToastMsg), &
renderToasts : ToastConfig -> List Toast -> Html ToastMsg.
Config should have something like
If made modular enough, publish as separate package.
#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.