Skip to content

Add pending learning object search results after applying filters - #2222

Merged
curlyLasagna merged 1 commit into
mainfrom
feature/sc-39343/modify-browse-page-sticky-filter-popup-to-get-a
Jun 11, 2026
Merged

curlyLasagna merged 1 commit into
mainfrom
feature/sc-39343/modify-browse-page-sticky-filter-popup-to-get-a

Conversation

@curlyLasagna

@curlyLasagna curlyLasagna commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

This pull request enhances the filter modal in the BrowseComponent by adding a live preview of the number of matching learning objects as users adjust filters, without affecting the main results until filters are applied. It introduces logic to fetch and display a preview count, ensures the preview is accurate even with rapid filter changes, and improves the user experience on mobile devices.

Filter modal preview improvements:

  • Added a new property totalLearningObjectsPreview to track and display the preview count in the filter modal, updating the UI to use this value instead of the main totalLearningObjects. (src/app/cube/browse/browse.component.html, src/app/cube/browse/browse.component.ts) [1] [2]
  • Implemented the fetchTotalLearningObjectsPreview method to asynchronously fetch the count of matching objects based on pending filter changes, using a request ID to prevent race conditions. (src/app/cube/browse/browse.component.ts) [1] [2]
  • Added getQueryWithPendingFilters to build a query reflecting both applied and pending modal filter changes for accurate preview counts. (src/app/cube/browse/browse.component.ts)

User experience improvements:

  • On mobile, the preview count is fetched when filters change, so users see updated results before applying filters. (src/app/cube/browse/browse.component.ts)
  • Modified the backdrop click handler to apply pending filters before closing the modal, making its behavior consistent with the "Show Results" button. (src/app/cube/browse/browse.component.ts)

Data consistency:

  • Updated the logic in fetchLearningObjects to keep totalLearningObjectsPreview in sync with the main result count when a new search is performed. (src/app/cube/browse/browse.component.ts) [1] [2]
Screen.Recording.2026-06-04.at.1.42.39.PM.mov

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@curlyLasagna

Copy link
Copy Markdown
Contributor Author

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

image

@dsoto18
dsoto18 requested a review from Low-Key-N June 8, 2026 14:58

@Low-Key-N Low-Key-N left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good!

@curlyLasagna
curlyLasagna merged commit fd61254 into main Jun 11, 2026
2 of 3 checks passed
@curlyLasagna
curlyLasagna deleted the feature/sc-39343/modify-browse-page-sticky-filter-popup-to-get-a branch June 11, 2026 16:30
@dsoto18 dsoto18 mentioned this pull request Jun 17, 2026
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.

5 participants