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

Inconsistent search results on the /shops page: Input box vs. address bar #9649

Open filipefurtad0 opened 2 years ago

filipefurtad0 commented 2 years ago

Description

Relates to https://github.com/openfoodfoundation/openfoodnetwork/issues/9643 Relates to https://github.com/openfoodfoundation/openfoodnetwork/issues/5467

On the /shops page, any string added will change the URL (it can be seen on the address bar during typing). However, the results of the query will depend on whether it was performed on the search box or via URL (perhaps not very used).

Expected Behavior

Both methods should yield the same result.

Actual Behaviour

If a query is performed on the:

Steps to Reproduce

  1. On a different session: Open your browser and visit /shops. Type qwertyuon the search box -> see the result (pic below, left)
  2. Open your browser and visit the home page. Add /shops#/?query=qwertyu to the address bar -> see the result (pic below, right)

Animated Gif/Screenshot

image

Workaround

Retry by typing the URL in the address bar. Restarting the browser may also help.

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

Possible Fix

filipefurtad0 commented 2 years ago

This seems to be a bit browser dependent :eyes: Behavior between chrome and firefox is not the same. I'll investigate and add to this comment.

Edited:

Left - Chrome; Right - Firefox

Chrome Version 105.0.5195.52 (Official Build) (64-bit)

Firefox 104.02 (64-bit)

Screencast from 09-09-2022 13:42:11.webm

The bug is verified in both, but the workaround only works on Firefox if one restarts the session :eyes: