openfoodfoundation / openfoodnetwork

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

New reusable loading spinner: 3 cases needs to be checked #6795

Closed jibees closed 3 years ago

jibees commented 3 years ago

Description

From #2772 (and its PR: #6640), loading spinner is a "reusable" component. There are 3 cases that are missing. This aim of this issue is to complete these 3 missing cases, and finish the work.

Expected Behavior

In each 3 cases we must see the loading spinner.

Actual Behaviour

We cannot see the loading spinner:

Steps to Reproduce

Scenario 1: Bulk invoice printing

  1. Go to /admin/orders?q[s]=completed_at+desc
  2. Select orders and hit print invoices button

Scenario 2: Capturing or Shipping an order from orders page.

  1. Go to /admin/orders?q[s]=completed_at+desc Press on 106493945-18574800-64ba-11eb-9d10-21b85517dc06

  2. before the green check is displayed there was a spinner the button now looks like 106493839-f958b600-64b9-11eb-9726-e1a07301e1ae Pressing this one should have the same behavior (spinner before green check button)

Scenario 3: Use the image upload modal

  1. Go to the product list page: admin/products
  2. By clicking on image of a product, image upload modal opens
  3. Upload a new image. During the upload, there must be a loading spinner.

Scenario 4: Load all variants for incoming or outgoing product in a order cycle edition

  1. Go to /admin/order_cycles/[ORDER_CYCLE_ID]/incoming
  2. Click on a product that had a lot of variants
  3. Click on "Load all variants" to (not) see the spinner

Animated Gif/Screenshot

Scenario 1

106464541-116c0d80-6499-11eb-8ff5-738d6359ae07

Scenario 3

Capture d’écran 2021-02-02 à 11 25 00

Severity

bug-s4: it's annoying, but you can use it

Your Environment

jibees commented 3 years ago

Concerning files in app/assets/javascripts (like bulk_invoice.html.haml, image_upload.html.haml, exchange_products_panel_footer.html.haml)

Quote from @Matt-Yorkley:

Ah... the slightly weird files under assets/javascript/templates are loaded dynamically by Angular in some cases and don't really work like regular Rails views. They work via the angular-rails-templates gem. Hopefully some day that whole directory will be deleted 🙈 I'm not sure if rendering normal partials will work in those templates, so we might have to leave that for now...

context: https://github.com/openfoodfoundation/openfoodnetwork/pull/6640#issuecomment-758129824

All this files seems to lead to an unreachable svg. coopcircuits.fr: https://coopcircuits.fr/assets/spinning-circles.svg returns a 404 Not Found by nginx.

filipefurtad0 commented 3 years ago

Hey @jibees ,

I've found another occurrence, on order cycles, in the Incoming Products and Outgoing Products tabs:

Peek 2021-02-02 13-44