Automattic / Automattic/jetpack
Search: highlight matching text on linked page
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
Could we add `#:~:text={searchterms}` to all of our links? In Chrome at least this will highlight and scroll within the page. I can't tell if this is a thing in other browsers or not. I had mentioned this idea on https://github.com/Automattic/jetpack/issues/14911#issuecomment-715615327
https://greg.blog/2013/05/01/three-principles-for-multilingal-indexing-in-elasticsearch/#:~:text=minimal%20stemming
Seems super helpful right? Even better would be to snag the first snippet in the search results but unfortunately our snippets go beyond line breaks so I don't think this will work. e.g. https://jetpack.com/support/search/frequently-asked-questions/#~=text=Pricing:%20How%20can%20I%20reduce%20the%20number%20of%20records%20on%20my%20site?%20Pricing:%20Will%20search%20stop%20working
Contributor guide
Research direction
Start by locating the search-result link generation used by the Jetpack support search page and review the related discussion in Automattic/jetpack#14911. Check how Chrome text fragments behave with the existing result URLs and snippets; done means matching links highlight and scroll to useful text without breaking other browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend, search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100