Exclude Known issues from search and move to Updates sidebar (EDU-18458)#476
Open
barbara-celi wants to merge 35 commits into
Open
Exclude Known issues from search and move to Updates sidebar (EDU-18458)#476barbara-celi wants to merge 35 commits into
barbara-celi wants to merge 35 commits into
Conversation
- Added a new API endpoint `/api/search` that proxies requests to the VTEX Docs Hybrid Search API. - Implemented query parameter handling, including validation and default limits. - Introduced caching for successful responses at the CDN edge. - Created a reusable Hybrid Search client for API interactions. - Added comprehensive unit tests for the API handler and client functionality. - Documented the setup and usage in a new `hybrid-search-setup.md` file.
- Clarified the purpose of the `NEXT_PUBLIC_HYBRID_SEARCH_ENABLED` variable. - Added detailed steps for enabling hybrid search in local development and Netlify deployment. - Included a note about the need for a rebuild when using the `NEXT_PUBLIC_` prefix.
- Updated library config to support hybrid search via NEXT_PUBLIC_HYBRID_SEARCH_ENABLED - Configured settings for Algolia and hybrid search backends with API endpoints
… troubleshooting pages - Updated translation files to include new messages for results found. - Enhanced the respective pages to display the number of results found based on user filters.
- Modified the Search component to accept an itemsPerPage prop, setting it to 10. - Increased the default limit for hybrid search results from 10 to 50.
…n library config - Removed the itemsPerPage prop from the Search component. - Set the default itemsPerPage value to 10 in the library configuration for hybrid search.
Required so the Netlify deploy preview resolves the hybrid search adapter that libraryConfig.ts wires up.
- Introduced a new style for the results number container with specific font size and color. - Updated the export to include the new style in the announcements page styles.
- Added a new API endpoint `/api/search` that proxies requests to the VTEX Docs Hybrid Search API. - Implemented query parameter handling, including validation and default limits. - Introduced caching for successful responses at the CDN edge. - Created a reusable Hybrid Search client for API interactions. - Added comprehensive unit tests for the API handler and client functionality. - Documented the setup and usage in a new `hybrid-search-setup.md` file.
- Clarified the purpose of the `NEXT_PUBLIC_HYBRID_SEARCH_ENABLED` variable. - Added detailed steps for enabling hybrid search in local development and Netlify deployment. - Included a note about the need for a rebuild when using the `NEXT_PUBLIC_` prefix.
- Updated library config to support hybrid search via NEXT_PUBLIC_HYBRID_SEARCH_ENABLED - Configured settings for Algolia and hybrid search backends with API endpoints
… troubleshooting pages - Updated translation files to include new messages for results found. - Enhanced the respective pages to display the number of results found based on user filters.
- Modified the Search component to accept an itemsPerPage prop, setting it to 10. - Increased the default limit for hybrid search results from 10 to 50.
…n library config - Removed the itemsPerPage prop from the Search component. - Set the default itemsPerPage value to 10 in the library configuration for hybrid search.
Required so the Netlify deploy preview resolves the hybrid search adapter that libraryConfig.ts wires up.
- Introduced a new style for the results number container with specific font size and color. - Updated the export to include the new style in the announcements page styles.
…U-18407) Replaces the describe.skip skeleton with the full 4-test implementation. Requires data-testid attributes added to SearchFilterTabBar in vtexdocs/components feat/hybrid-search (T-9). Tests run at 1023px viewport so the mobile tab bar is visible. Uses warm-then-visit pattern in before() and visits a known doc page rather than '/' to avoid cold-start timeouts on the Netlify preview.
…rcepts (V-10) search-doctype-filter: move cy.viewport(1023, 768) to after cy.submitSearch so the header search input is visible during submission. At < 1024px the header search collapses and cy.click() on its parent fails with 'display: none'. search-pagination / search-results: widen cy.intercept from POST /algolia.net/ to /algolia.net|\/api\/search/ so the intercepts fire on both the Algolia backend (main branch) and the hybrid search backend (PR #456 feat/hybrid-search components).
# Conflicts: # src/pages/announcements/index.tsx # src/styles/announcements-page.ts
At Cypress's default 1000px viewport, header searchContainer is display:none (breakpoint flex only at ≥1024px), causing the submitSearch click to fail on a hidden element. Move cy.viewport(1280, 768) to the first line of beforeEach so the search input is visible during visit and submit; keep cy.viewport(1023, 768) after submit to reveal SearchFilterTabBar.
…ttrs Resolves feat/hybrid-search from 977f53a5 to e0fce1e3 — includes the data-testid attributes added to SearchFilterTabBar in T-9, which are required for search-doctype-filter.cy.js to find [data-testid="doctype-filter-tab-bar"].
In beforeEach, add cy.get('.searchCardTitle').should('have.length.greaterThan', 0)
after the tab-bar visibility check. On cold first-test runs the search response
arrives after the 5s retry window on the count assertion (ocurrenceCount[''] stays 0).
Waiting for at least one result card ensures ocurrenceCount is populated before
any test asserts on tab counts.
…(V-30) Replace .searchCardTitle wait with a direct wait on the "All" tab count badge becoming > 0 (15s timeout). ocurrenceCount[""] is populated by the Algolia response which arrives after the first result cards render — a race that caused test 1 to fail consistently on first cold visit while tests 3-4 (later beforeEach iterations) passed.
…c (T-34) `/docs/tutorials/about-the-admin-category` is a redirect; curl without `-L` stops at the 3xx and never triggers ISR rendering for the actual cache key `/en/docs/tutorials/about-the-admin-category` that Next.js uses. Adding the locale-prefixed path directly ensures the page is rendered and ISR-cached before Cypress runs the doctype-filter spec.
…client serves pages from cache
In hybrid search mode, createHybridClient fetches all results in one
upstream /api/search request and serves subsequent pages from an
in-memory cache. cy.scrollTo('bottom') triggers refineNext() via
IntersectionObserver, which returns a cache hit with no network
request, so cy.wait('@algoliaNextPage') always timed out (T-31).
Replace cy.intercept + cy.wait with a direct DOM count assertion in
all three tests. The .should('have.length.greaterThan', N) assertion
retries until more cards appear in the DOM, which works for both
hybrid (cache-based, instant) and Algolia (network, async) backends.
…T-33) Adds an explicit leading entry for search-doctype-filter.cy.js in the specPattern array so it runs as early as possible while the Netlify preview is warmest. Cypress deduplicates, so the catch-all glob still covers all other specs without re-running the doctype-filter spec.
✅ Deploy Preview for leafy-mooncake-7c2e5e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
EDU-18458
vtexdocs/components implementation: PR #85
This PR relocates Known issues from the Support sidebar group to the Updates group and configures it for search exclusion. Helpcenter sets
excludeFromSearch: trueon the Known issues sidebar entry; the actual search behavior (filter tabs, search section cards, andNOT doctype:"known-issues"query filters) is implemented in @vtexdocs/components via PR #85.This aligns navigation with how Known issues is categorized (alongside Announcements and Status) and prevents Known issues content from appearing in global search results and search filters.
Known issues are operational/status content, not general support documentation. Grouping it under Updates improves discoverability in the sidebar, while excluding it from search prevents transient issue reports from mixing with evergreen docs in search results.
Note: components PR #85 must be merged (or pinned in this PR) for search exclusion to take effect. The
helpcenterchanges alone only update navigation and sidebar configuration.Related work
EDU-17906 — Hybrid Search integration
The branch
EDU-18458-ki-searchbuilds on theEDU-17906hybrid search work, which replaces direct Algolia-only search with a server-side proxy to the VTEX Docs Hybrid Search API. That foundation is a prerequisite for the Known issues search exclusion in components PR #85, which extends hybrid search filtering to support excluded doctypes (NOT doctype:"...").Changes
1. Navigation (src/utils/constants.ts)
2. Types (src/utils/typings/types.ts)
3. Dependencies
The implementation on
@vtexdocs/componentsreadsexcludeFromSearchfrom sidebar sections passed viaLibraryContextProviderand:NOT doctype:"known-issues"to Algolia and hybrid search queriesTest plan
/known-issuespage still works as expectedTypes of changes