Skip to content

Exclude Known issues from search and move to Updates sidebar (EDU-18458)#476

Open
barbara-celi wants to merge 35 commits into
mainfrom
EDU-18458-ki-search
Open

Exclude Known issues from search and move to Updates sidebar (EDU-18458)#476
barbara-celi wants to merge 35 commits into
mainfrom
EDU-18458-ki-search

Conversation

@barbara-celi

@barbara-celi barbara-celi commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

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: true on the Known issues sidebar entry; the actual search behavior (filter tabs, search section cards, and NOT 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 helpcenter changes alone only update navigation and sidebar configuration.

Related work

EDU-17906 — Hybrid Search integration

The branch EDU-18458-ki-search builds on the EDU-17906 hybrid 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)

  • Moved the Known issues entry from menuSupportData (Support) to updatesData (Updates), placing it after Announcements.
  • Marked Known issues with excludeFromSearch: true so @vtexdocs/components treats it differently from other sidebar sections in search.

2. Types (src/utils/typings/types.ts)

  • Added optional excludeFromSearch?: boolean to DocDataElement to support per-section search exclusion in sidebar navigation data.

3. Dependencies

The implementation on @vtexdocs/components reads excludeFromSearch from sidebar sections passed via LibraryContextProvider and:

  • Removes the Known issues tab from the search doctype filter bar
  • Excludes Known issues from search section cards in the header dropdown
  • Adds NOT doctype:"known-issues" to Algolia and hybrid search queries

Test plan

  • Sidebar: Known issues appear under Updates (after Announcements), not under Support
  • Hamburger / dropdown menu: Known issues appear under Updates
  • Search page: no Known issues doctype filter tab
  • Global search: Known issues content does not appear in the results
  • Direct navigation to /known-issues page still works as expected

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

barbara-celi and others added 30 commits May 5, 2026 12:25
- 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.
PedroAntunesCosta and others added 5 commits June 17, 2026 21:44
…(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.
@barbara-celi barbara-celi self-assigned this Jun 18, 2026
@barbara-celi barbara-celi added release-auto Automatic version bump effort-medium We estimate the effort to solve this issue is medium.. ui Portal interface issues. labels Jun 18, 2026
@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for leafy-mooncake-7c2e5e ready!

Name Link
🔨 Latest commit 89c9090
🔍 Latest deploy log https://app.netlify.com/projects/leafy-mooncake-7c2e5e/deploys/6a344854c13c6c000886856c
😎 Deploy Preview https://deploy-preview-476--leafy-mooncake-7c2e5e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort-medium We estimate the effort to solve this issue is medium.. release-auto Automatic version bump ui Portal interface issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants