hot
hot copied to clipboard
Display user submission and votes by Week
- [ ] Remove the layout toggle
- [ ] Update the API to include submissions by week
Hey @bdougie this might be a better issue on the API repo, but:
- should submissions "by week" mean submissions in the last seven days (rather than time boxed Saturday-Sunday for example)?
- does this mean that submissions probably need to be tracked in a separate table? I ask because I don't think we're keeping track of how repos actually made their way into the list (stars vs contributions vs submissions)
Hey @mtfoley
If I didn't guess wrong, the sorting "by week" can be achieved by simply ordering using the current date-time and the "created_at" field of the repo entity. I think sorting "by week" probably won't be implemented by filtering out by the submission date of a user, rather it will be considered by the date when the "repo submission request" is accepted and the repo is added to the main database table.
"Votes" can also be another factor to be added for ordering.
So, a new table is also required to store the submitted request from the user, from where an admin can review the submission request and approve it to be added to the main database table.
With the list now being filter by "recent," we can group it by "created_at" which is the submission date (not the repo creation date).
https://api.opensauced.pizza/v1/repos/list?page=1&limit=10&orderBy=created_at
With the list now being filter by "recent," we can group it by "created_at" which is the submission date (not the repo creation date).
https://api.opensauced.pizza/v1/repos/list?page=1&limit=10&orderBy=created_at
This will be truly possible with filters, we can make a synthetic view going back in time every 7 days, or last 7 days = This week, between 7 and 31 days = This month, or similar gradual increase, until we can specifically say "where created_at is less than the last 7 days"! π
:tada: This issue has been resolved in version 2.27.0-beta.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 2.27.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: