Skip to content

feat(quantic): add quantic-load-more-results component #1 - #8135

Draft
mmitiche wants to merge 3 commits into
mainfrom
feat/SFINT-6878-load-more-results
Draft

feat(quantic): add quantic-load-more-results component #1#8135
mmitiche wants to merge 3 commits into
mainfrom
feat/SFINT-6878-load-more-results

Conversation

@mmitiche

@mmitiche mmitiche commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new quantic-load-more-results LWC component as an alternative to quantic-pager for incrementally loading additional results. Composes the existing ResultList and QuerySummary headless controllers (Search and Insight engines identically) via the standard getHeadlessBundle / registerComponentForInit / initializeWithHeadless pattern — no engine-specific branching.

Resolves SFINT-6878.

What's included

  • quanticLoadMoreResults component (js/html/js-meta.xml) composing the ResultList and QuerySummary headless controllers
    • Renders a "Load more results" button (hidden when moreResultsAvailable is false), a "Showing X of Y results" summary, and an SLDS progress bar
    • Announces via aria-live exactly once when the last batch of results has just been loaded (moreResultsAvailable transitions truefalse within the same searchResponseId, not on unrelated re-renders or a fresh search)
    • Renders nothing when there are no results
  • Jest unit tests (__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 engines
  • Playwright e2e harness (e2e/fixture.ts, e2e/pageObject.ts, e2e/quanticLoadMoreResults.e2e.ts) mirroring quantic-pager's e2e structure
  • New labels quantic_LoadMoreResults, quantic_ShowingResultsOfLoadMore (+ _plural/_zero), quantic_AllResultsLoaded, with FR/ES translations
  • Example-community wrapper component exampleQuanticLoadMoreResults plus additive route/view JSON entries and a home-page link
  • AC8 documentation (the quantic-pager-alternative note) recorded in the component's class-level JSDoc — Quantic has no separate narrative-doc mechanism outside JSDoc-generated reference docs
  • Changeset: @coveo/quantic minor (new public component/public surface)

Out of scope (unchanged, per ticket)

No changes to quantic-pager or to the underlying Headless ResultList/QuerySummary/ResultsPerPage controllers. No infinite-scroll/no-button loading mode.

Testing

  • pnpm run lint:fix: clean
  • pnpm turbo test --filter=@coveo/quantic: 88/88 suites, 1210/1210 tests pass
  • pnpm turbo run @coveo/quantic#build --force: succeeds, incl. build:doc
  • pnpm run validate:types (tsc): clean
  • pnpm changeset status: confirms @coveo/quantic queued for a minor bump
  • E2E (pnpm turbo run @coveo/quantic#e2e): not run in this environment — requires a deployed Salesforce scratch-org community. Harness included, mirrors quantic-pager/quantic-results-per-page structure; 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:

  • Strengthened the AC3 append test to simulate a real second subscribe emission with a longer results array (previously trivially passing under a no-op mock).
  • Removed a dead CSS rule superseded by the inline progress-bar width binding.
  • Left the _zero summary label in place per reviewer's original "no action required."

Second pass (S7): APPROVED, zero findings, all three items independently re-verified against code.

mmitiche added 3 commits July 28, 2026 16:00
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-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9f2649d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@coveo/quantic Minor

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

@svcsnykcoveo

svcsnykcoveo commented Jul 31, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@pkg-pr-new

pkg-pr-new Bot commented Jul 31, 2026

Copy link
Copy Markdown
@coveo/atomic

npm i https://pkg.pr.new/@coveo/atomic@8135

@coveo/atomic-hosted-page

npm i https://pkg.pr.new/@coveo/atomic-hosted-page@8135

@coveo/atomic-legacy

npm i https://pkg.pr.new/@coveo/atomic-legacy@8135

@coveo/atomic-react

npm i https://pkg.pr.new/@coveo/atomic-react@8135

@coveo/auth

npm i https://pkg.pr.new/@coveo/auth@8135

@coveo/bueno

npm i https://pkg.pr.new/@coveo/bueno@8135

@coveo/create-atomic

npm i https://pkg.pr.new/@coveo/create-atomic@8135

@coveo/create-atomic-component

npm i https://pkg.pr.new/@coveo/create-atomic-component@8135

@coveo/create-atomic-component-project

npm i https://pkg.pr.new/@coveo/create-atomic-component-project@8135

@coveo/create-atomic-result-component

npm i https://pkg.pr.new/@coveo/create-atomic-result-component@8135

@coveo/create-atomic-rollup-plugin

npm i https://pkg.pr.new/@coveo/create-atomic-rollup-plugin@8135

@coveo/create-ui

npm i https://pkg.pr.new/@coveo/create-ui@8135

@coveo/headless

npm i https://pkg.pr.new/@coveo/headless@8135

@coveo/headless-react

npm i https://pkg.pr.new/@coveo/headless-react@8135

@coveo/relay

npm i https://pkg.pr.new/@coveo/relay@8135

@coveo/shopify

npm i https://pkg.pr.new/@coveo/shopify@8135

commit: 9f2649d

@github-actions

Copy link
Copy Markdown
Contributor

🔗 Scratch Orgs ready to test this PR:

@mmitiche mmitiche changed the title feat(quantic): add quantic-load-more-results component feat(quantic): add quantic-load-more-results component #1 Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants