SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
740 stars 385 forks source link

Buttons and Input Field in Cart not usable #6739

Closed Darius998 closed 4 years ago

Darius998 commented 4 years ago

This template is to be used for bug reports and small enhancements. For feature requests, please contact the project owner.

Note: For the bug to be accepted, it must be reproducible using the latest release of Spartacus. See our Contributor Documentation for more information.

Environment Details

Steps to Reproduce

Add something to shopping cart and try to modífy quantity, remove or save for later

Observed Results

All buttons are disabled chrome_T3Yf6JhJ72

Expected Results

Buttons should be usable and do their thing

Platonn commented 4 years ago

Conversation in public slack: https://spartacus-storefront.slack.com/archives/CD16V16FR/p1582881814073600

LTiger14 commented 4 years ago

This might be related to your backend version. @Darius998 what version of Commerce are you running?

LTiger14 commented 4 years ago

Regardless of if this is a version issue or not Spartacus should support 1905 as a whole. Certain feature might require a specific version (1905.11 for customer coupons) but the site should not break if the version does not support the feature.

We should handle gracefully these errors so that Spartacus is still usable.

psmul commented 4 years ago

The problem shows up for every situation where there is no response from the server. Nor Chrome or Firefox are returning any status when they lose connection to the internet, thus inputs/buttons stay blocked due to flag cartLoaded$ not returning/changing its state. The issue should be resolved application-wide, maybe with adding an additional interceptor for simple connection checks, which in the case will throw an observable error. Any thoughts @dunqan @tobi-or-not-tobi ?

tobi-or-not-tobi commented 4 years ago

@LTiger14 If there's no backend response, in this case for the cartLoaded$ state, I think it's correct to not enable the input, as otherwise you could post data without the context of the cart, which results in strange errors.

I agree to @psmul that we could have an application wide (x-times) retry. I wonder why the error handling doesn't kick in, in this specific case. Can you double check this?

psmul commented 4 years ago

QA steps:

Expected result:

(There is an issue that counter will still provide new value but it's only on view layer, no data on backend will be updated)

Matejk00 commented 4 years ago

QA done: