Repository navigation
fix(core): forward search dropdown labels from the CMS - #3600
Merged
Merged
Conversation
The SearchInput stopped forwarding `searchTopTitle` and `searchHistoryTitle` to the SearchDropdown (regression from #3334), so the CMS values ended up as attributes on the <input> and the dropdown always rendered the English defaults. Also add `searchProductsTitle` and `searchHistoryClearLabel` to the Navbar searchInput CMS schema so "Suggested Products" and "Clear History" can be translated too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
lariciamota
requested review from
gabpaladino
and removed request for
a team
November 18, 2026 18:57
…tests
- Forward `loadingLabel` from SearchInput to SearchDropdown; it was
dropped in the same refactor and the loading text rendered empty.
- Align the `searchTopTitle` CMS default with the component ("Top Search").
- Move the SearchInput label tests into SearchInputComponent.test.tsx and
add a SearchDropdown test for title/clear label forwarding.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
DK Review — Audit SummaryVerdict: ✅ CLEAN
Only BLOCK and RESTRICT findings anchored to a changed line are commented inline on the diff. The finding below opens no review thread. Scenarios evaluated: feature-flags, general-review 📋 Findings (1)SUGGEST
DK Review v1.0.0 | To contest a finding, reply in its thread |
@faststore/api
@faststore/cli
@faststore/components
@faststore/core
@faststore/diagnostics
@faststore/lighthouse
@faststore/sdk
@faststore/ui
commit: |
Addresses the Sonar "props should be read-only" rule on the components touched by this change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Addresses the Sonar "Mark the props of the component as read-only" issue reported on SearchDropdown. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
hellofanny
approved these changes
Nov 18, 2026
| sort: string | ||
| submitButtonAriaLabel?: string | ||
| searchHistoryTitle?: string | ||
| searchHistoryClearLabel?: string |
5 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.

0 New Issues
0 Fixed Issues
0 Accepted Issues
What's the purpose of this pull request?
The search dropdown can't be translated. "Top Search" and "History" ignore the titles set in the CMS (Navbar > searchInput), and "Suggested Products" and "Clear History" have no CMS field at all, so stores in non-English locales always show these four labels in English.
The first part is a regression: since #3334 (released in v4.4.0),
SearchInputno longer destructuressearchTopTitle/searchHistoryTitle. They fall into...otherProps, end up on the<input>as HTML attributes (searchtoptitle="..."), and<SearchDropdown>renders without them.How it works?
SearchInputdestructures the dropdown labels again (searchTopTitle,searchHistoryTitleandloadingLabel, which was dropped in the same refactor and left the loading text empty) and forwards them toSearchDropdown, so they no longer leak to the<input>.searchInput(insections.json,schema.jsonandcms_component__navbar.jsonc):searchProductsTitle(default "Suggested Products"), passed astitletoSearchProductssearchHistoryClearLabel(default "Clear History"), passed asclearLabeltoSearchHistorysearchTopTitleCMS default now matches the component ("Top Search" instead of "Top search").NavbarProps['searchInput']andSearchInputPropsget the two new optional props. This is additive only: nothing changes for stores that don't set them, since@faststore/componentskeeps its English defaults.How to test it?
<input>: it should no longer carrysearchtoptitle/searchhistorytitleattributes.cd packages/core && pnpm vitest run test/components/search. The new label tests inSearchInputComponent.test.tsxandSearchDropdown.test.tsxfail ondevand pass here.Starters Deploy Preview
Use the CodeSandbox build from this PR.
References
devand also covers the "Clear History" label. Thanks to the authors of fix(searchInput): Add a propertie in the cms for searchProductsTitle … #3240 for the original fix.🤖 Generated with Claude Code