Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Prevent Shopping Lists From Rendering If Redirecting #3768

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

(REQUIRED)

With #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
Copy link
Collaborator

@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?

Copy link
Collaborator

@boc-the-git boc-the-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy for you to merge btw, if you're confident in your decision/testing re my prior question. Still keen to hear an answer though :)

@michael-genson
Copy link
Collaborator Author

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:

  • You're currently viewing all lists (of which there is more than one)
  • You only have one list
  • If you toggle to show only your lists (which is one list) you'd get redirected immediately

The override fixes this

@michael-genson michael-genson enabled auto-merge (squash) June 25, 2024 13:34
@michael-genson michael-genson merged commit 5572e51 into mealie-recipes:mealie-next Jun 25, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants