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

Merged
merged 77 commits into from
Nov 29, 2024
Merged

IBX-4064: Search page #1860

merged 77 commits into from
Nov 29, 2024

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
    • If there is less than 10 results, all results are in the drop down menu so the link is not shown.
    • If there is more than 10 results, 10 are shown on the drop down and the link allow to access the search result page where other result can be consulted. (examples: "TaxonomyEntryIdAggregation" 6 results, "SesExternalData" 4 results)
    • If there is 10 results, the link is shown even if useless due to the drop down not knowing the real result count
  • Page to see all those results. It's limited to 1000 results/100 pages by Algolia default settings. After few unsuccessful attempts to increase this, it was decided to not invest more time in it as nobody reaches the 100th page anyway. Page is empty when there is no searched text.

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

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

Search dropdown previews:

It can be previewed anywhere on this PR build. But, notice that the “See all results” link is always wrong has the PR ID is not seen as a valid version/branch and is replaced by master. You can put the version back to PR ID 1860 to be on https://ez-systems-developer-documentation--1860.com.readthedocs.build/en/1860/search_results/ with the right arguments behind.

search_Content
The "See all results" link will bring to a page like https://ez-systems-developer-documentation--1860.com.readthedocs.build/en/1860/search_results/?sq=Content&p=1

search_TaxonomyEntryIdAggr
No "See all results" link as all the results are available in the drop down suggestions.

search_customize_cart

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
docs/js/custom.js Outdated Show resolved Hide resolved
docs/js/custom.js Outdated Show resolved Hide resolved
@adriendupuis adriendupuis requested review from mnocon and removed request for DominikaK and MagdalenaZuba November 20, 2024 14:26
Copy link
Contributor

@mnocon mnocon left a comment

Choose a reason for hiding this comment

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

Looks great! I've checked both on Safari and Firefox that it's rendered corretly, did you have a chance to check it with Chrome?

Two (optional) remarks, we can discuss them and maybe come back to them as follow ups:

  1. It looks like the number of pages is capped at 100 - and with 10 items per page you can "only" get the first 1000 results.

Some queries return more than 1k results, meaning that some of them are not accessible, for example:
https://ez-systems-developer-documentation--1860.com.readthedocs.build/en/1860/search_results/?sq=Content&p=1

You cannot see what the result 1900 is, even when browsing to the last page.

What do you think about displaying 1000+ when there are more than 1k results?

  1. Having a full search page is great for experimentation and really tailoring the query.
    When playing with this I found myself using the - keyword a lot to remove things which I'm not looking for:

migration step gives different results than migration step -update.
https://ez-systems-developer-documentation--1860.com.readthedocs.build/en/1860/search_results/?sq=migration+step&p=1

https://ez-systems-developer-documentation--1860.com.readthedocs.build/en/1860/search_results/?sq=migration+step+-update&p=1

I thought about including an info box somewhere in the search page informing users about this possibility - it's described in the Algolia doc: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntax/#how-to-use

It's a small feature, but useful for power users (developers). Or do you think developers already know this?

docs/images/ez-icons.svg Outdated Show resolved Hide resolved
@adriendupuis adriendupuis merged commit 2145f26 into master Nov 29, 2024
6 checks passed
@adriendupuis adriendupuis deleted the search-page branch November 29, 2024 13:37
adriendupuis added a commit that referenced this pull request Nov 29, 2024
---------

Co-authored-by: Michał Grabowski <michal.grabowski@ibexa.co>
(cherry picked from commit 2145f26)
adriendupuis added a commit that referenced this pull request Nov 29, 2024
---------

Co-authored-by: Michał Grabowski <michal.grabowski@ibexa.co>

(cherry picked from commit 2145f26)
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.

5 participants