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

Fix issue with voting overview page where the number of votings are limited to 20 #353

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

elpoelma
Copy link
Contributor

@elpoelma elpoelma commented Nov 2, 2022

This PR includes two fixes:

  • For a specific treatment of an agendapoint, all votings are fetched and not only the first 20.
  • The positions of the votings are fixed automatically when a voting is removed in the middle of the list.

This PR is to be used in combination with: lblod/app-gelinkt-notuleren#118 and solves https://binnenland.atlassian.net/jira/software/c/projects/GN/boards/4?modal=detail&selectedIssue=GN-3798

@elpoelma elpoelma added the bug Something isn't working label Nov 2, 2022
Copy link
Contributor

@lagartoverde lagartoverde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but it seems it should be easier to do

'filter[behandeling-van-agendapunt][:id:]': this.args.behandeling.id,
sort: 'position',
page: {
size: pageSize,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be easier to fetch with an absurd pageSize? like 999

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm still hesitating what the best approach is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be interesting to abstract out this logic, seems useful to have a generic "get all" for paginated endpoints
We could probably get away with increasing the pagesize here since even 30 votings is already exceptional, but it's good to be diligent.
Actually we just need a serious solution for pagination, which can handle all cases

@elpoelma elpoelma requested a review from abeforgit November 4, 2022 13:57
'filter[behandeling-van-agendapunt][:id:]': this.args.behandeling.id,
sort: 'position',
page: {
size: pageSize,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be interesting to abstract out this logic, seems useful to have a generic "get all" for paginated endpoints
We could probably get away with increasing the pagesize here since even 30 votings is already exceptional, but it's good to be diligent.
Actually we just need a serious solution for pagination, which can handle all cases

@abeforgit abeforgit merged commit 27d0956 into master Nov 7, 2022
@abeforgit abeforgit deleted the fix/voting-overview-limited-to-20 branch November 7, 2022 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants