Skip to content

Remove unused search props, add missing search translations#2367

Merged
jordanarldt merged 1 commit into
canaryfrom
ja/fix-search-translations
Jun 3, 2025
Merged

Remove unused search props, add missing search translations#2367
jordanarldt merged 1 commit into
canaryfrom
ja/fix-search-translations

Conversation

@jordanarldt

Copy link
Copy Markdown
Contributor

What/Why?

When writing e2e tests, I found more missing translations with the Search component. This PR removes some unused props and adds the missing translations.

Testing

Tested locally

Migration

core/components/header/index.tsx

Ensure the following props are passed to the HeaderSection navigation prop:

        searchInputPlaceholder: t('Search.inputPlaceholder'),
        searchSubmitLabel: t('Search.submitLabel'),

core/messages/en.json

Add the following keys to the Components.Header.Search translations:

        "somethingWentWrong": "Something went wrong. Please try again.",
        "inputPlaceholder": "Search products, categories, brands...",
        "submitLabel": "Search"

core/vibes/soul/primitives/navigation/index.tsx

Copy all changes from this file:

  1. Create searchSubmitLabel?: string; property, ensure it is passed into SearchForm
  2. On the SearchForm, remove the searchCtaLabel = 'View more', property, as it is unused, and rename submitLabel to searchSubmitLabel
  3. Ensure that SearchForm passes searchSubmitLabel to the SearchButton: <SubmitButton loading={isPending} submitLabel={searchSubmitLabel} />
  4. Remove the searchCtaLabel property from the SearchResults component

@jordanarldt
jordanarldt requested a review from a team June 3, 2025 20:15
@changeset-bot

changeset-bot Bot commented Jun 3, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ea81df3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 3, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 3, 2025 8:35pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Jun 3, 2025 8:35pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 8:35pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 8:35pm

@jordanarldt
jordanarldt force-pushed the ja/fix-search-translations branch from 49a2589 to ea81df3 Compare June 3, 2025 20:31
@jordanarldt
jordanarldt added this pull request to the merge queue Jun 3, 2025
Merged via the queue into canary with commit 6b0c85a Jun 3, 2025
9 checks passed
@jordanarldt
jordanarldt deleted the ja/fix-search-translations branch June 3, 2025 20:43
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.

2 participants