Skip to content

fix: resolved “Load more comments” button not rendering issue#261

Merged
Alam-2U merged 1 commit into
release-ulmofrom
COSMO2-889
May 4, 2026
Merged

fix: resolved “Load more comments” button not rendering issue#261
Alam-2U merged 1 commit into
release-ulmofrom
COSMO2-889

Conversation

@Alam-2U
Copy link
Copy Markdown

@Alam-2U Alam-2U commented May 4, 2026

Description

This PR fixes an issue where the “Load more comments” button was not rendering in discussion threads, preventing users from viewing additional comments beyond the initial set.

Root Cause

The rendering logic for the pagination control was not being triggered correctly, causing the “Load more comments” button to not appear even when more comments were available

Ticket

COSMO2-889

Copilot AI review requested due to automatic review settings May 4, 2026 10:20
@Alam-2U Alam-2U changed the title fix: resolved “Load more comments” button was not rendering issue fix: resolved “Load more comments” button not rendering issue May 4, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a pagination metadata bug in the discussions REST API that prevented the UI from rendering the “Load more comments” control for response child-comments by ensuring num_pages is calculated from the full child-comment set rather than just the current page.

Changes:

  • Compute pagination num_pages using the total number of child comments (len(response_comments)) instead of the page slice length.
  • Pass the total child-comment count into DiscussionAPIPagination so pagination metadata can reflect additional available pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lms/djangoapps/discussion/rest_api/api.py
Comment thread lms/djangoapps/discussion/rest_api/api.py
@Alam-2U Alam-2U merged commit 1f596eb into release-ulmo May 4, 2026
68 checks passed
@Alam-2U Alam-2U deleted the COSMO2-889 branch May 4, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants