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

Stretch goal: Mentor/TA Dashboard - STARs sorting and pagination #91

Open
droud-dev opened this issue Mar 4, 2023 · 0 comments
Open

Comments

@droud-dev
Copy link
Collaborator

droud-dev commented Mar 4, 2023

Since there's potential that there could be a LOT of STARs on the platform, the Mentors/TAs can end up having to scroll for a long time if the list is exceptionally long.

Requirements:

  • Have two Sort buttons - By date and By name
    • Default SORT BY should be date
  • Upon clicking of the Sort button, the user will be redirected to a new URL - it's the Dashboard URL + sort={option} with the {option} being either date or name
  • If the sort key exists in the URL, the DB query changes its SORT BY value
  • At the top, between the two Sort buttons there should be a list of pages IF the number of pages is more than 1
  • Similarly to the Sort buttons, upon clicking on a page the URL updates with page={x} where {x} is the number of the page
  • If the page key exists in the URL, the DB query changes its LIMIT and OFFSET values (read more docs here)
    • LIMIT is the same - 100, which is a good balance between page length and usability
    • OFFSET is 100 x page, so on page number 3, the value for OFFSET is 300

Note:
When using API side pagination you CANNOT do Search in the frontend. It has to go through the DB, since the FE would not have the STARs from the other pages.

@droud-dev droud-dev converted this from a draft issue Mar 4, 2023
@droud-dev droud-dev changed the title Mentor/TA Dashboard - STARs pagination Mentor/TA Dashboard - STARs sorting and pagination Mar 4, 2023
@droud-dev droud-dev moved this to Backlog in Tech-panda STAR Mar 4, 2023
@droud-dev droud-dev changed the title Mentor/TA Dashboard - STARs sorting and pagination Stretch goal: Mentor/TA Dashboard - STARs sorting and pagination Mar 4, 2023
@droud-dev droud-dev moved this from Backlog to Todo in Tech-panda STAR Mar 8, 2023
@droud-dev droud-dev moved this from Todo to Backlog in Tech-panda STAR Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant