openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.1k stars 714 forks source link

[Customer][Order->Edit] Inconsistent table format on (editable) order confirmation page #10261

Open filipefurtad0 opened 1 year ago

filipefurtad0 commented 1 year ago

Description

For editable orders - i.e., orders which can be cancelled or line items amount changed by the customer, while the OC is open - the table in the order confirmation page shows an inconsistent format.

Expected Behavior

Table format should be consistent.

Actual Behaviour

Table formatting is inconsistent (blank space is visible).

Steps to Reproduce

  1. As an admin: Set up a hub to accept order edits - Under Shop Preferences toggle "Customers can change / cancel orders while order cycle is open"
  2. As a customer: Place an order on that Hub
  3. As a customer: Edit that order - visit /account#/orders and click Edit for that order -> Notice the blank space on the table.

(This affects only order confirmation page while the OC is open:

  1. As an admin: Close the order cycle
  2. As a customer: Edit that order -> notice the formatting is correct)

OR:

Skip all steps and visit: https://staging.openfoodnetwork.org.uk/orders/R632653401?order_token=a629d72866356506

Animated Gif/Screenshot

image

Workaround

Does not affect functionality.

Severity

bug-s5: we can live with it, only a few users impacted

Your Environment

Possible Fix

drummer83 commented 1 year ago

Maybe introduced when we added 'Back to Website' button (not visible on your screenshot)?

filipefurtad0 commented 1 year ago

No, I had checked that PR at the time, it was fine - it's broken now: image

This could just be a browser issue (updated the issue). Not sure.

jibees commented 1 year ago

I'm not sure to know how to reproduce this one... by As a customer: Edit that order, what do you mean? This is what I get:

Capture d’écran 2023-01-12 à 09 26 35
filipefurtad0 commented 1 year ago

Hey @jibees ,

Sorry, I guess I should have been more explicit :see_no_evil: I've edited above. If the enterprise is set accordingly (step 1) and the order cycle is still open then, the customers can edit orders. Do to so, log in as a customer and visit /account#/orders and click Edit for that order:

image

This will lead the user to the order confirmation screen.

jibees commented 1 year ago

Found it. This is due to https://github.com/openfoodfoundation/openfoodnetwork/pull/10103 and that particular line #14:

https://github.com/openfoodfoundation/openfoodnetwork/blob/fd446970cafdaf311844b46a3299fb1de3141715/app/webpacker/css/darkswarm/cart-page.scss#L12-L14

the <table /> is therefore display: block; instead of its inherit display which is display: table;

RachL commented 1 year ago

FYI this is reproductible on order confirmation page as well. I've just tested on production:

image

filipefurtad0 commented 1 year ago

FYI this is reproductible on order confirmation page as well. I've just tested on production:

Yes, I can see it too in order confirmation pages (either editing or after checkout), but only for editable orders. Is that the case, on that pic @RachL ?

RachL commented 1 year ago

Yep!

ashwini-seshadri commented 1 month ago

Hello, is this issue still open? If so, I would love to work on this! :) Thank you!

sigmundpetersen commented 1 month ago

Sure, thank you @ashwini-seshadri 👍

drummer83 commented 1 month ago

Thank you @ashwini-seshadri! I have just checked. The problem is still there, but it's smaller now - at least on my device and browser (Firefox).

Here is a screenshot: image