Automattic / Automattic/jetpack

Instant Search: allow filtering the markup of the search results

Open
#36,719 0 comments 0 reactions 0 assignees View on GitHub
[Feature] Search [Package] Search [Plugin] Search [Pri] Low Customer Report [LEGACY] Enhancement Instant Search
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

It would be nice if one were able to customize some of the markup of the Instant Search result page.

> I'd like to add data-google-interstitial="false" to them to avoid triggering Google’s Interstitial ads when clicking these links. Can these link elements be somehow filtered? As a workaround, I thought about adding that attribute programmatically from a JS script, but I’m not sure if it would to the trick…
-- p1712141195010369-slack-CDLH4C1UZ

References:

- https://github.com/Automattic/jetpack/blob/b550c1120720533d18cf49360060547d9725752d/projects/packages/search/src/instant-search/components/search-result-expanded.jsx#L65-L69
- https://github.com/Automattic/jetpack/blob/da40feddf6cf85ab445389a51f2408e2f42c4d0d/projects/packages/search/src/instant-search/components/search-result-product.jsx#L61-L65
- https://github.com/Automattic/jetpack/blob/5e09479e047632668cb7f97b7078bbd468160367/projects/packages/search/src/instant-search/components/search-result-minimal.jsx#L115-L119

Contributor guide

Open the contributing guide

Research direction

Start with the three referenced components: projects/packages/search/src/instant-search/components/search-result-expanded.jsx, search-result-product.jsx, and search-result-minimal.jsx, focusing on the cited link elements. Trace how those result links are rendered and determine a suitable filtering customization; done means the requested data-google-interstitial="false" attribute can be applied to the relevant links.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, search
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.