mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
6.81k stars 700 forks source link

fix: Shopping list labels reordering dialog #3540

Closed p0lycarpio closed 5 months ago

p0lycarpio commented 5 months ago

What type of PR is this?

(REQUIRED)

What this PR does / why we need it:

(REQUIRED)

This PR fixes the modal allowing you to reorganize the labels of a shopping list. As mentioned in #3426, a "Save" button has been added to call the API with the new labels order. The cancel button closes the modal and reactivates the API polling.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #3426

Special notes for your reviewer:

If we change the order of the labels and cancel, the local state is still modified (this can be seen if we re-edit the order quickly). The next API poll (every 5 seconds) returns the original order. It was chosen not to call refresh() when canceling or saving to limit requests.

Testing

Manually tested on the frontend

p0lycarpio commented 5 months ago

Thanks for your feedback! Indeed, it looks better this way. What do you think now?