-
Notifications
You must be signed in to change notification settings - Fork 1
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
Show recent records on the home page #70
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @damianmarti , now the ones that show first, are the ones that don't have a Date: |
Thanks @carletex Now I'm filtering the records with date not null. |
Hey @damianmarti thanks for this! I see one «problem» when filtering out the ones without a date: the This is off because of it: (total count still gets ALL the records) Not sure if this is a big deal, but just mentioning it here. I remember tweaking the What do you think? |
Thanks!! I thought it was not used in another place. Let me check for a better solution. |
@carletex please take a look now. I created a new backend endpoint for the home records, so we can do whatever we want to the records shown on the home page and not affect the rest of the site. Thanks and sorry for the previous issues! |
This still has the same problem on the /records page, since we are filtering out the records with no dates (and pagination is off because off it too) Let me try to come up with a solution! |
This reverts commit 5ac931b.
@damianmarti so I added this: 80fcb74 It's a raw query so we can order elements with no date at the end and everything keeps working the same.
Let me know what you think. Thanks!! |
@carletex Oh, no, sorry! I forgot to push the changes to records.ts, to leave it at it was before, so the change only affects the home page! Your change looks good, I was trying to avoid using raw SQL to keep it simple. We can go with your change or we can add again the backend endpoint for the home page, but keeping the records endpoint as it was before. Please let me know what you prefer. Thanks!! |
The only PRO I see of doing the raw SQL is that we are also sorting by date DESC correctly on the Let's ask @amy-jung !! Amy, do we want to sort by date DESC the Thanks all! <3 |
Sorry what is DESC? Ideally we would just have both! (Assuming when you search, the default is by closest to search, then by date) |
It means the most recent record first. We can show the most recent records on the home page and with the same ordering on the records page too. Is it ok for you? |
closes #68