Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
23 stars 12 forks source link

[Bug] Paginator not working as expected on org profile page #1530

Closed vpchung closed 1 year ago

vpchung commented 1 year ago

Is there an existing issue for this?

What projects are you seeing the problem on?

OpenChallenges

Current behavior

In the Challenges tab of an organization profile page, all challenge cards are displayed rather than the default 12. If we were to adjust the number of results returned, then the correct number of cards will display:

https://github.com/Sage-Bionetworks/sage-monorepo/assets/9377970/10d7eb62-774c-4e48-a7e2-f8a09528bd88

Expected behavior

By default, the paginator selects "12" as the number of cards to display, so I would expect only 12 cards should be shown, not all of them.

Anything else?

No response

Commit ID

No response

Are you developing inside the dev container?

Code of Conduct

tschaffter commented 1 year ago

@vpchung Didn't the default page size use to be different (20, 50 and maybe one more)? I have to admit that it kind of bugged me to reach the bottom and see a partial row of results. But if the number of results displayed per row is variable, multiple or 12 (or actually 3) would not be suitable.

tschaffter commented 1 year ago

Is the blue for the menu item darker than the blue of the navbar, or am I this an optical illusion? Are the navbar, menu item and Go to Website button colors part of the same palette?

vpchung commented 1 year ago

Didn't the default page size use to be different (20, 50 and maybe one more)?

i don't think I was present for this conversation for using [20, 50, 100]. I recall suggesting showing items in multiples of 12 instead, since that was the common product between 2, 3, and 4 (which coincide with the number of cards per row depending on screen size). I'm guessing this 12 is the legacy code from that.

Is there a reason why you don't think 12 is suitable?

vpchung commented 1 year ago

Is the blue for the menu item darker than the blue of the navbar

It's the darker blue used in the footer.

vpchung commented 1 year ago

Update

I was not able to figure out the issue from the frontend side, so I will be unassigning myself for now.

tschaffter commented 1 year ago

This is actually not a bug: we need to complete first the PR opened that will enable to filter challenges by organizations. Then we can update the org profile page to only show the challenges organized by a given organization.

vpchung commented 1 year ago

Ahh, okay, that makes a lot of sense. ~Return to Backlog?~ Change to Blocked?

tschaffter commented 1 year ago

@rrchai Actually there is probably an issue with the paginator because independently of the filters applied, the page should not show more than N challenges where N is defined by the paginator.

rrchai commented 1 year ago

I can reproduce the behavior - looking into it soon.