msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
20 stars 12 forks source link

Layout bug with multi-item filters #4233

Open CarlosNZ opened 4 weeks ago

CarlosNZ commented 4 weeks ago

What went wrong? 😲

I think this is only a problem with multi-element filters (like Date range).

If you add a single filter after a "Range" filter (like Date), the order gets messed up when you change focus.

For example, the "Code or Name" filter jumps to the beginning after clicking in one of the Date filters:

2024-06-21 15 55 10

Expected behaviour 🤔

Filter order should persist during interaction.

How to Reproduce 🔨

  1. On "View Stock" list page, add an "Expiry" filter
  2. Add a "Code or Name" filter -- it should appear after the two date inputs
  3. Click in one of the Date inputs. Then click elsewhere on the page
  4. the "Code or Name" filter jumps to the start of the filter line. 😢

Your environment 🌱

CarlosNZ commented 4 weeks ago

I suspect that the multi-item filter is sometimes getting treated as a single array element (it's nested as a single item in Filter Definitions), and other times as two elements, which causes a discrepancy.

CarlosNZ commented 3 weeks ago

Not high priority, but also should be a fairly easy fix.

mark-prins commented 3 weeks ago

Here's another instance, from @marthakeezy

https://github.com/msupply-foundation/open-msupply/assets/9192912/465e9656-321f-41c4-83cd-e91401131130

andreievg commented 3 weeks ago

Triage, normal priority, doesn't break workflow, but needs looking into at some stage