Skip to content

fix: comingSoon in locator results#1226

Merged
asanehisa merged 2 commits into
2026-custom-components-templatesfrom
replicate-fix
Jun 2, 2026
Merged

fix: comingSoon in locator results#1226
asanehisa merged 2 commits into
2026-custom-components-templatesfrom
replicate-fix

Conversation

@asanehisa
Copy link
Copy Markdown
Contributor

Same fix as #1225

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

Walkthrough

This PR adds "coming soon" support to locator result cards. The LocatorResultCard component's HoursSection now renders the hours status row directly when comingSoon is true, bypassing the accordion layout used in normal cases. Test fixtures in Locator.test.tsx are extended to accept and propagate the comingSoon flag through API result builders and fetch mocks. A snapshot test case validates the rendering behavior for coming soon locators.

Possibly related PRs

  • yext/visual-editor#1225: Implements the same comingSoon behavior for locator results, with updates to test fixtures and HoursSection rendering logic.
  • yext/visual-editor#1155: Modifies the same HoursSection component within LocatorResultCard.tsx to add controlled accordion expansion and ARIA attributes.

Suggested labels

create-dev-release

Suggested reviewers

  • briantstephan
  • benlife5
  • jwartofsky-yext
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for 'comingSoon' status in locator results.
Description check ✅ Passed The description references a related PR that implements the same fix, providing context for the changeset even if minimal.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch replicate-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Warning: Component files have been updated but no migrations have been added. See https://github.com/yext/visual-editor/blob/main/packages/visual-editor/src/components/migrations/README.md for more information.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/visual-editor/src/components/LocatorResultCard.tsx (1)

55-55: 💤 Low value

Consider using .tsx extension for consistency.

The import uses .js extension while other local imports in this file use .tsx or .ts. While this may be intentional for build system compatibility, it creates inconsistency.

♻️ Proposed fix for consistency
-} from "./atoms/accordion.js";
+} from "./atoms/accordion.tsx";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/visual-editor/src/components/LocatorResultCard.tsx` at line 55, The
import from "./atoms/accordion.js" is inconsistent with other local imports in
LocatorResultCard.tsx; update the import to use the .tsx extension (import from
"./atoms/accordion.tsx") to match the file's TypeScript JSX convention and keep
module resolution consistent, ensuring any tooling/configuration supports .tsx
imports and adjusting exports in the Accordion component if needed (refer to the
import statement referencing "./atoms/accordion.js" in LocatorResultCard.tsx).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/visual-editor/src/components/LocatorResultCard.tsx`:
- Line 55: The import from "./atoms/accordion.js" is inconsistent with other
local imports in LocatorResultCard.tsx; update the import to use the .tsx
extension (import from "./atoms/accordion.tsx") to match the file's TypeScript
JSX convention and keep module resolution consistent, ensuring any
tooling/configuration supports .tsx imports and adjusting exports in the
Accordion component if needed (refer to the import statement referencing
"./atoms/accordion.js" in LocatorResultCard.tsx).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 629c5b40-6a33-4517-9232-db4caba244f4

📥 Commits

Reviewing files that changed from the base of the PR and between 1ad5f0e and 1a103d4.

⛔ Files ignored due to path filters (4)
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 48 props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Locator/[desktop] version 74 comingSoon.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Locator/[mobile] version 74 comingSoon.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Locator/[tablet] version 74 comingSoon.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (2)
  • packages/visual-editor/src/components/Locator.test.tsx
  • packages/visual-editor/src/components/LocatorResultCard.tsx

@asanehisa asanehisa marked this pull request as ready for review June 2, 2026 18:40
@asanehisa asanehisa merged commit 1a1a504 into 2026-custom-components-templates Jun 2, 2026
17 checks passed
@asanehisa asanehisa deleted the replicate-fix branch June 2, 2026 19:46
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.

4 participants