feat(quantic): add quantic-load-more-results component #1 - #8135
Draft
mmitiche wants to merge 3 commits into
Draft
feat(quantic): add quantic-load-more-results component #1#8135mmitiche wants to merge 3 commits into
mmitiche wants to merge 3 commits into
Conversation
Adds a new Quantic LWC component that lets end users load additional results into the current result list without navigating to a new page, working identically for Search and Insight Panel interfaces via the existing getHeadlessBundle/registerComponentForInit/ initializeWithHeadless pattern (no engine branching). - Composes the ResultList and QuerySummary headless controllers - Renders a 'Load more results' button, a 'Showing X of Y results' summary, and an SLDS progress bar - Announces via aria-live when the last batch of results has been loaded (moreResultsAvailable true -> false within the same search response) - Renders nothing when there are no results - Adds Jest unit tests covering button visibility, click/append behavior, the aria-live transition, empty state, and both engines - Adds a Playwright e2e harness mirroring quantic-pager's structure - Adds new quantic_LoadMoreResults, quantic_ShowingResultsOfLoadMore (+ _plural/_zero), and quantic_AllResultsLoaded labels with FR/ES translations - Adds an example-community wrapper component and route/view entries - Documents the quantic-pager alternative relationship in the component's class-level JSDoc, since Quantic has no separate narrative-doc mechanism outside JSDoc-generated reference docs Refs SFINT-6878
Extend the click test for quantic-load-more-results to simulate a second subscribe callback invocation with an appended results array, and assert the rendered summary/progress reflect the new count. Also remove the dead .slds-progress-bar__value CSS rule, which is fully superseded by the inline style binding driven by progressBarStyle. Addresses non-blocking findings from PR review (S7).
🦋 Changeset detectedLatest commit: 9f2649d 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.
Summary
Adds a new
quantic-load-more-resultsLWC component as an alternative toquantic-pagerfor incrementally loading additional results. Composes the existingResultListandQuerySummaryheadless controllers (Search and Insight engines identically) via the standardgetHeadlessBundle/registerComponentForInit/initializeWithHeadlesspattern — no engine-specific branching.Resolves SFINT-6878.
What's included
quanticLoadMoreResultscomponent (js/html/js-meta.xml) composing theResultListandQuerySummaryheadless controllersmoreResultsAvailableisfalse), a "Showing X of Y results" summary, and an SLDS progress bararia-liveexactly once when the last batch of results has just been loaded (moreResultsAvailabletransitionstrue→falsewithin the samesearchResponseId, not on unrelated re-renders or a fresh search)__tests__/quanticLoadMoreResults.test.js) covering AC1, AC3, AC4, AC5, AC6, AC7: button visibility, click/append behavior, the aria-live transition (with negative cases), empty state, error state, and both enginese2e/fixture.ts,e2e/pageObject.ts,e2e/quanticLoadMoreResults.e2e.ts) mirroringquantic-pager's e2e structurequantic_LoadMoreResults,quantic_ShowingResultsOfLoadMore(+_plural/_zero),quantic_AllResultsLoaded, with FR/ES translationsexampleQuanticLoadMoreResultsplus additive route/view JSON entries and a home-page link@coveo/quanticminor (new public component/public surface)Out of scope (unchanged, per ticket)
No changes to
quantic-pageror to the underlying HeadlessResultList/QuerySummary/ResultsPerPagecontrollers. No infinite-scroll/no-button loading mode.Testing
pnpm run lint:fix: cleanpnpm turbo test --filter=@coveo/quantic: 88/88 suites, 1210/1210 tests passpnpm turbo run @coveo/quantic#build --force: succeeds, incl.build:docpnpm run validate:types(tsc): cleanpnpm changeset status: confirms@coveo/quanticqueued for a minor bumppnpm turbo run @coveo/quantic#e2e): not run in this environment — requires a deployed Salesforce scratch-org community. Harness included, mirrorsquantic-pager/quantic-results-per-pagestructure; should run in CI before merge.Review history
First pass (S7): APPROVED with 1 suggestion + 2 nitpicks (non-blocking). Fix-up pass applied per user request before opening this PR:
subscribeemission with a longer results array (previously trivially passing under a no-op mock)._zerosummary label in place per reviewer's original "no action required."Second pass (S7): APPROVED, zero findings, all three items independently re-verified against code.