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
5.59k stars 608 forks source link

feat: Prevent Shopping Lists From Rendering If Redirecting #3768

Closed michael-genson closed 3 days ago

michael-genson commented 1 week ago

What type of PR is this?

(REQUIRED)

What this PR does / why we need it:

(REQUIRED)

With https://github.com/mealie-recipes/mealie/pull/3764, if the user is redirected to their sole list, you'll see the shopping list page for a brief moment before redirecting. This PR removes that so it looks more seamless.

Which issue(s) this PR fixes:

(REQUIRED)

N/A

Testing

(fill-in or delete this section)

Tested all scenarios I can think of

boc-the-git commented 4 days ago

@michael-genson can you please explain the specific intention with overrideDisableRedirect? I feel I might be missing something obvious. Was there an issue without it, in terms of struggling to load that a user wanted to "view all lists", before determining there was only one to view?

michael-genson commented 3 days ago

Moving the redirect to a watcher sped up the redirect a bit, but as a consequence it's checking every time the choices list changes. There was an edgecase where:

The override fixes this