Skip to content

feat: pass comingSoon into HoursTable and HoursStatus#1223

Merged
asanehisa merged 3 commits into
mainfrom
coming-soon-updates
Jun 1, 2026
Merged

feat: pass comingSoon into HoursTable and HoursStatus#1223
asanehisa merged 3 commits into
mainfrom
coming-soon-updates

Conversation

@asanehisa
Copy link
Copy Markdown
Contributor

@asanehisa asanehisa commented Jun 1, 2026

Just a copy of work in this PR for our other branch.

Included a small change in DirectoryCard.tsx so tests would pass.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

Walkthrough

This PR introduces support for displaying a "Coming Soon" status in location hours sections. It adds comingSoon translations across 24 languages in component and platform locale files, extends TypeScript type definitions to include a comingSoon boolean field, updates HoursStatusAtom and HoursTableAtom to accept and render the flag with localized text, modifies content block wrappers to render hours sections when either hours data or the coming-soon flag is set, and threads the flag through card components. Dependency versions for @yext/pages-components are updated to ^2.2.0, and a minor correction is made to DirectoryCard's heading text fallback logic.

Sequence Diagram

sequenceDiagram
  participant LocationCard as LocatorResultCard/<br/>NearbyLocationCard
  participant HoursContentBlocks as HoursStatus/<br/>HoursTable Blocks
  participant HoursAtoms as HoursStatusAtom/<br/>HoursTableAtom
  participant Renderer as HoursStatusJS/<br/>HoursTable Component

  LocationCard->>LocationCard: Extract comingSoon from location data
  LocationCard->>HoursContentBlocks: Render if hours OR comingSoon
  HoursContentBlocks->>HoursContentBlocks: Derive comingSoon from data or stream
  HoursContentBlocks->>HoursAtoms: Pass hours (with fallback) + comingSoon
  HoursAtoms->>Renderer: Forward props to underlying component
  Renderer->>Renderer: Detect comingSoon flag
  alt comingSoon is true
    Renderer->>Renderer: Render localized "Coming Soon" text
  else hours data exists
    Renderer->>Renderer: Render hours table/status
  end
Loading

Possibly related PRs

  • yext/visual-editor#1222: Implements the same comingSoon support path for hours UI with matching updates to HoursStatus/HoursTable wiring.
  • yext/visual-editor#1121: Modifies HoursStatus.tsx component props and wrapper value resolution concurrently with this PR's rendering logic changes.
  • yext/visual-editor#1220: Updates DirectoryCard.tsx defaultDirectoryCardSlotData and heading/title handling, overlapping with this PR's minor heading text fallback fix.

Suggested labels

create-dev-release

Suggested reviewers

  • mkilpatrick
  • benlife5
  • jwartofsky-yext
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: passing a comingSoon prop into HoursTable and HoursStatus components across multiple files.
Description check ✅ Passed The description is related to the changeset, explaining this is a copy of work from another PR and mentions the main feature (comingSoon prop) and a supporting change in DirectoryCard.tsx.
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 coming-soon-updates

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.

@asanehisa asanehisa marked this pull request as ready for review June 1, 2026 15:40
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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@packages/visual-editor/src/components/contentBlocks/HoursStatus.tsx`:
- Line 105: The current comingSoon assignment (const comingSoon =
parentData?.comingSoon ?? !!streamDocument.comingSoon) incorrectly falls back to
streamDocument when parentData exists but lacks comingSoon; change the logic so
that if parentData is provided we only use parentData.comingSoon (or false) and
only read streamDocument.comingSoon when parentData is absent. Update the
comingSoon expression in HoursStatus.tsx to something like: if (parentData) use
!!parentData.comingSoon, otherwise use !!streamDocument.comingSoon, referencing
the comingSoon variable, parentData, and streamDocument identifiers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3d4ff1b9-4701-426d-9d44-cd3a0adc9991

📥 Commits

Reviewing files that changed from the base of the PR and between 14297fd and 4b39566.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (60)
  • packages/visual-editor/locales/components/cs/visual-editor.json
  • packages/visual-editor/locales/components/da/visual-editor.json
  • packages/visual-editor/locales/components/de/visual-editor.json
  • packages/visual-editor/locales/components/en-GB/visual-editor.json
  • packages/visual-editor/locales/components/en/visual-editor.json
  • packages/visual-editor/locales/components/es/visual-editor.json
  • packages/visual-editor/locales/components/et/visual-editor.json
  • packages/visual-editor/locales/components/fi/visual-editor.json
  • packages/visual-editor/locales/components/fr/visual-editor.json
  • packages/visual-editor/locales/components/hr/visual-editor.json
  • packages/visual-editor/locales/components/hu/visual-editor.json
  • packages/visual-editor/locales/components/it/visual-editor.json
  • packages/visual-editor/locales/components/ja/visual-editor.json
  • packages/visual-editor/locales/components/lt/visual-editor.json
  • packages/visual-editor/locales/components/lv/visual-editor.json
  • packages/visual-editor/locales/components/nb/visual-editor.json
  • packages/visual-editor/locales/components/nl/visual-editor.json
  • packages/visual-editor/locales/components/pl/visual-editor.json
  • packages/visual-editor/locales/components/pt/visual-editor.json
  • packages/visual-editor/locales/components/ro/visual-editor.json
  • packages/visual-editor/locales/components/sk/visual-editor.json
  • packages/visual-editor/locales/components/sv/visual-editor.json
  • packages/visual-editor/locales/components/tr/visual-editor.json
  • packages/visual-editor/locales/components/zh-TW/visual-editor.json
  • packages/visual-editor/locales/components/zh/visual-editor.json
  • packages/visual-editor/locales/platform/cs/visual-editor.json
  • packages/visual-editor/locales/platform/da/visual-editor.json
  • packages/visual-editor/locales/platform/de/visual-editor.json
  • packages/visual-editor/locales/platform/en-GB/visual-editor.json
  • packages/visual-editor/locales/platform/en/visual-editor.json
  • packages/visual-editor/locales/platform/es/visual-editor.json
  • packages/visual-editor/locales/platform/et/visual-editor.json
  • packages/visual-editor/locales/platform/fi/visual-editor.json
  • packages/visual-editor/locales/platform/fr/visual-editor.json
  • packages/visual-editor/locales/platform/hr/visual-editor.json
  • packages/visual-editor/locales/platform/hu/visual-editor.json
  • packages/visual-editor/locales/platform/it/visual-editor.json
  • packages/visual-editor/locales/platform/ja/visual-editor.json
  • packages/visual-editor/locales/platform/lt/visual-editor.json
  • packages/visual-editor/locales/platform/lv/visual-editor.json
  • packages/visual-editor/locales/platform/nb/visual-editor.json
  • packages/visual-editor/locales/platform/nl/visual-editor.json
  • packages/visual-editor/locales/platform/pl/visual-editor.json
  • packages/visual-editor/locales/platform/pt/visual-editor.json
  • packages/visual-editor/locales/platform/ro/visual-editor.json
  • packages/visual-editor/locales/platform/sk/visual-editor.json
  • packages/visual-editor/locales/platform/sv/visual-editor.json
  • packages/visual-editor/locales/platform/tr/visual-editor.json
  • packages/visual-editor/locales/platform/zh-TW/visual-editor.json
  • packages/visual-editor/locales/platform/zh/visual-editor.json
  • packages/visual-editor/package.json
  • packages/visual-editor/src/components/LocatorResultCard.tsx
  • packages/visual-editor/src/components/atoms/hoursStatus.tsx
  • packages/visual-editor/src/components/atoms/hoursTable.tsx
  • packages/visual-editor/src/components/contentBlocks/HoursStatus.tsx
  • packages/visual-editor/src/components/contentBlocks/HoursTable.tsx
  • packages/visual-editor/src/components/directory/DirectoryCard.tsx
  • packages/visual-editor/src/components/pageSections/NearbyLocations/NearbyLocationCard.tsx
  • packages/visual-editor/src/components/pageSections/NearbyLocations/useNearbyLocations.ts
  • starter/package.json

Comment thread packages/visual-editor/src/components/contentBlocks/HoursStatus.tsx
@asanehisa asanehisa merged commit d48f1db into main Jun 1, 2026
26 of 27 checks passed
@asanehisa asanehisa deleted the coming-soon-updates branch June 1, 2026 17:02
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