Skip to content

feat(vendor): integrate vendor results and banners into query previews - #2149

Merged
AdrianArenal merged 4 commits into
mainfrom
ENG-1503-vendor-query-previews
Aug 4, 2026
Merged

feat(vendor): integrate vendor results and banners into query previews#2149
AdrianArenal merged 4 commits into
mainfrom
ENG-1503-vendor-query-previews

Conversation

@AdrianArenal

Copy link
Copy Markdown
Contributor

In order to fulfill all customers requirements about vendor results and banners, we need to include them also on query previews:
Screenshot 2026-08-03 at 16 04 33

A data-query-preview-hash is now exposed on each query preview DOM element so anyone can inspect the DOM and search for the hash id of the query preview. Then, they just have to emit events with info like:

const { on, emit } = useXBus()
on('VendorQueryChanged', true).subscribe(() => {
  console.log('VendorQueryChanged')
  setTimeout(() => {
    emit('QueryPreviewVendorResultsChanged', {
      queryPreviewHash: '0bae37eafbdb6a5a3216daeb1c153822', <-- you can find this ID on the DOM
      results: [
        {
          id: 'vendor-1',
          name: 'Vendor Result at Position 2',
          url: 'https://dtcralphlauren.scene7.com/is/image/PoloGSI/s7-AI290P16049001_alternate10',
          position: 1,
        },
      ],
    })

    emit('QueryPreviewVendorBannersChanged', {
      queryPreviewHash: '0bae37eafbdb6a5a3216daeb1c153822',
      banners: [
        {
          id: 'vendor-1',
          title: 'Vendor Banner at Position 2',
          image:
            'https://backdropsource.es/cdn/shop/files/image_5b50002d-6e37-41f8-9087-3c69d936377a.png?v=1744114854',
          position: 2,
        },
      ],
    })
  }, 3000)
})

Pull request template

Describe the purpose of the change, the specific changes done in detail, and the issue you have fixed.

Motivation and context

  • Dependencies. If any, specify:
  • Open issue. If applicable, link:

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

Tests performed according to testing guidelines:

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@AdrianArenal
AdrianArenal requested a review from a team as a code owner August 3, 2026 14:10
victorcg88
victorcg88 previously approved these changes Aug 4, 2026
@AdrianArenal
AdrianArenal merged commit 807f384 into main Aug 4, 2026
1 check passed
@AdrianArenal
AdrianArenal deleted the ENG-1503-vendor-query-previews branch August 4, 2026 10:01
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.

2 participants