hot icon indicating copy to clipboard operation
hot copied to clipboard

Display user submission and votes by Week

Open bdougie opened this issue 1 year ago β€’ 2 comments

Image

  • [ ] Remove the layout toggle
  • [ ] Update the API to include submissions by week

bdougie avatar Jul 09 '22 01:07 bdougie

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)

mtfoley avatar Jul 12 '22 03:07 mtfoley

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.

shamimbinnur avatar Jul 12 '22 09:07 shamimbinnur

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

bdougie avatar Oct 22 '22 16:10 bdougie

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"! πŸ•

0-vortex avatar Oct 25 '22 22:10 0-vortex

: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:

github-actions[bot] avatar Nov 07 '22 19:11 github-actions[bot]

:tada: This issue has been resolved in version 2.27.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Nov 11 '22 15:11 github-actions[bot]