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 total conversation count when paginated #111

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

etanttila
Copy link
Contributor

@etanttila etanttila commented Jul 22, 2024

Previously the total conversation count still was only the number of conversations on the displayed page. Change the total_conversation_count to actually have all of the filtered conversations (not just the ones on the page.)

Description

What?

Previously the total conversation count still was only the number of conversations on the displayed page. Change the total_conversation_count to actually have all of the filtered conversations (not just the ones on the page.)

Why?

#103 didn't actually solve the total conversation count issue.

How?

Changing where the total_conversation_count variable is calculated (to PaginationMixin) and changing that it calcluates the total count using all of the messages, not just the ones provided in the context.

Fixes #94

Testing

Remember to add or update unit tests for new features and changes.

What type of test did you run?

  • Accessibility test using the WAVE extension.
  • Django unit tests.
  • Selenium tests.
  • Other test. (Add a description below)
  • Manual testing.

Tested that works with different paginate_by values with different message and conversations counts were above 60, 90 and 120.

Did you test the changes in

  • Chrome
  • Firefox
  • This pull request cannot be tested in the browser.

Think of what is affected by these changes and could become broken

Translation

Programming style

  • Did you follow our style guides?
  • Did you use Python type hinting in all functions that you added or edited? (type hints for function parameters and return values)

Have you updated the README or other relevant documentation?

  • documents inside the doc directory.
  • README.md.
  • Aplus Manual.
  • Other documentation (mention below which documentation).

Is it Done?

  • Reviewer has finished the code review
  • After the review, the developer has made changes accordingly
  • Customer/Teacher has accepted the implementation of the feature

Clean up your git commit history before submitting the pull request!

@etanttila etanttila requested a review from ihalaij1 July 22, 2024 13:51
Copy link
Contributor

@ihalaij1 ihalaij1 left a comment

Choose a reason for hiding this comment

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

Nice!

@ihalaij1 ihalaij1 self-assigned this Jul 23, 2024
Previously the total conversation count still was only the number of
conversations on the displayed page. Change the total_conversation_count
to actually have all of the filtered conversations (not just the ones
on the page.)

Fixup commit to cf39a47.
Fixes apluslms#94
@ihalaij1 ihalaij1 force-pushed the fix-pagination-text branch from 20bc1b4 to 9ad0a81 Compare July 23, 2024 06:22
@ihalaij1 ihalaij1 merged commit c3068fa into apluslms:master Jul 23, 2024
@etanttila etanttila deleted the fix-pagination-text branch July 24, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Number-of-messages-found UI string should include all results/pages and the wording is a bit awkward
2 participants