Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-4064: Search page #1860

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open

IBX-4064: Search page #1860

wants to merge 57 commits into from

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Jan 16, 2023

Question Answer
JIRA Ticket IBX-4064, IBX-5007
Versions All
  • See all results link at bottom of search dropdown menu
  • Page to see all those results

To wrap the search page into the doc layout, I use https://www.mkdocs.org/user-guide/writing-your-docs/#meta-data

Preview: https://ez-systems-developer-documentation--1860.com.readthedocs.build/en/1860/search_results/?sq=Content&p=5

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

@adriendupuis adriendupuis marked this pull request as ready for review February 1, 2023 08:07
@DominikaK DominikaK self-assigned this Feb 1, 2023
}
let href = '/en/' + branchName + '/search_results/#q=' + encodeURI($(/*this.inputSelector*/'#search_input').val()) + '&p=1';
link.attr('href', href).show();
if (hits.length < 10/*hitsPerPage*/) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hits.length == hitsPerPage means that there are hitsPerPage or more results; hits.length > hitsPerPage can't happen. So we can only be sure that the link must be hidden if there is less than hitsPerPage results.

When the whole text is highlight, the hover wasn't visible
instantsearch.js:29 Uncaught TypeError: Cannot read properties of null (reading '1')
    at instantsearch.js:29:65
    at instantsearch.js:229:3
It helps the user to manipulate the browser URL. Some browser like Chrome doesn't react when the hash/anchor is modified by hand but does when the search/GET is.

notice: `?q=` is intercepted by the top-right search input box so full page param has to be renamed.

https://developer.mozilla.org/en-US/docs/Web/API/History/pushState#change_a_query_parameter
@DominikaK DominikaK removed their assignment Jun 29, 2023
Useful for dropdown debug when true, it change the searchbox background from white to black even when set to false.
Use relative base_url instead of absolute config.site_url
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.

3 participants