feat(quantic): add quantic-load-more-results component - #8163
Draft
mmitiche wants to merge 2 commits into
Draft
Conversation
Adds the quantic-load-more-results component, an alternative to quantic-pager, that lets users load additional results by clicking a button. It shows a running summary (X of Y results), a progress bar, and announces via aria-live when the last batch has been loaded. - New production component quanticLoadMoreResults, built on the existing headless ResultList/QuerySummary controllers (no per-engine branching needed for Search vs Insight). - New example-community wrapper for E2E coverage and manual testing. - New labels (EN/FR/ES) for the button, running summary, and aria-live announcement. - JSDoc cross-reference added to quantic-pager documenting the two components are alternatives, not to be combined. - Adds SearchObject.mockSearchWithLoadMoreSequence(), a small e2e test helper needed to simulate a load-more response sequence.
…results Fixes PR review findings on the quantic-load-more-results feature: - mockSearchWithLoadMoreSequence now returns a distinct batch of result uniqueIds per response instead of repeating the same results array, matching how a real load-more response differs from the initial page. This avoids duplicate for:each keys in quanticResultList (searchResponseId + uniqueId), which previously masked whether the e2e append/aria-live assertions were exercising real behavior. - Removed the unreachable _zero variant of the quantic_ShowingResultsOfLoadMore label (and its fr/es translations): the summary block only renders when querySummaryState.hasResults is true, which is false whenever lastResult is 0, so the _zero string could never be shown. - Added a trailing newline to quanticLoadMoreResults.js-meta.xml to match sibling generated meta.xml files.
🦋 Changeset detectedLatest commit: 9b040ec The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
@coveo/atomic
@coveo/atomic-hosted-page
@coveo/atomic-legacy
@coveo/atomic-react
@coveo/auth
@coveo/bueno
@coveo/create-atomic
@coveo/create-atomic-component
@coveo/create-atomic-component-project
@coveo/create-atomic-result-component
@coveo/create-atomic-rollup-plugin
@coveo/create-ui
@coveo/headless
@coveo/headless-react
@coveo/relay
@coveo/shopify
commit: |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira
SFINT-6883
What
Adds
quantic-load-more-results, a new production LWC (plus its example-community wrapper for E2E coverage) that lets users append the next batch of search/insight results on click, as an alternative toquantic-pager.Where to look
quanticLoadMoreResults.js/.html/.css— the component itself: buildsresultList+querySummaryoff the existing headless bundle, computes the running "showing X of Y" summary and progress bar, and announces viaAriaLiveRegionwhen the last batch has just loaded (guarded bysearchResponseIdstaying constant across the load-more fetch, per headless's actual reducer behavior).exampleQuanticLoadMoreResults— example-community wrapper used purely to give Playwright a real page to drive the component against.playwright/page-object/searchObject.ts(mockSearchWithLoadMoreSequence) — the E2E mock backing the append/aria-live assertions; returns a distinct result batch (and thus distinct render keys) per response while keepingsearchUidconstant, mirroring real load-more semantics.Note
E2E suite (fixture, page object, spec) is authored and type-checks cleanly but has not been executed against a live Salesforce scratch org in the environment this was built in — recommend running it once before merge.