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

[BUG] - Sorting by "Last Made" Places "Never Made" Recipes Incorrectly #4937

Open
6 tasks done
PancakeZik opened this issue Jan 23, 2025 · 1 comment
Open
6 tasks done
Labels
bug: confirmed bug Something isn't working

Comments

@PancakeZik
Copy link

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

When sorting recipes by the "Last Made" date, recipes that have never been made are currently positioned at the end of the list. This behaviour is counterintuitive because the concept of "Last Made" is intended to highlight recipes based on how recently they were made. Recipes that have "never been made" are the ones I would most likely want to revisit first, as they are essentially the ones that haven't been given a chance yet.

Currently, the sorting order looks like this:

Recipe made in 2022
Recipe made in 2023
Recipe never made
Instead, the expected behaviour should position "never made" recipes before the earliest made recipe, treating them as if they were made the longest time ago. The expected sorting order would look like this:

Recipe never made
Recipe made in 2022
Recipe made in 2023
This approach makes sense because the purpose of sorting by "Last Made" is to allow users to quickly find recipes they haven’t tried yet, as well as revisit older ones. By placing "never made" recipes at the start of the list, users can more easily identify recipes they might wish to try.

Steps to Reproduce

Add recipes to Mealie with "Last Made" dates, including some with no "Last Made" date at all.
Sort the recipes by "Last Made."
Observe that recipes with no "Last Made" date are placed at the end of the list.

Please provide relevant logs

Mealie Version

Nightly

Deployment

Docker (Synology)

Additional Deployment Details

Expected Behaviour:
Recipes with no "Last Made" date should appear before the earliest made recipe when sorting by "Last Made," as they represent the recipes that have never been made and are likely to be of higher interest in this context.

@PancakeZik PancakeZik added bug Something isn't working triage labels Jan 23, 2025
@michael-genson
Copy link
Collaborator

Our null handling in the frontend is pretty ill-defined. The backend supports specifying null ordering, but we don't really use it in the app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants