Skip to content

Conversation

@colton-demetriou
Copy link
Contributor

@colton-demetriou colton-demetriou commented Nov 7, 2025

tested here: https://www.yext.com/s/4259018/yextsites/161497/branches/131426/editor#pageSetId=empty-loc-test&locale=en&themeId=empty-test&entityId=1095527849

Fix reviews section, slotify nearby locations empty state logic, and restore migration logic that was removed

@colton-demetriou colton-demetriou added the create-dev-release Triggers dev release workflow label Nov 7, 2025
@colton-demetriou colton-demetriou changed the title for demo branch chore: for demo branch Nov 7, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 7, 2025

pages-visual-editor-starter

npm i https://pkg.pr.new/yext/visual-editor/@yext/visual-editor@882

commit: cdb62b9

@colton-demetriou colton-demetriou changed the title chore: for demo branch fix: restore functionality from merge Nov 7, 2025
@colton-demetriou colton-demetriou marked this pull request as ready for review November 7, 2025 21:10
@colton-demetriou colton-demetriou merged commit e3bfe05 into fall-2025-slot-ify-components Nov 7, 2025
15 of 16 checks passed
@colton-demetriou colton-demetriou deleted the demo branch November 7, 2025 21:10
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request introduces empty-state handling and data migration features across multiple components. The NearbyLocations component gains a new empty-state UI component with observer-based change detection (ResizeObserver and MutationObserver) to track rendering state. NearbyLocationsCardsWrapper adds early loading state rendering and simplified empty-data checks. ReviewsSection introduces a new exported interface (ReviewsSectionProps), expands props destructuring to include editing state (puck), and updates empty-state logic to consider query status. The main template file adds a transformProps function that performs data migration and resolution before rendering.

Sequence Diagram

sequenceDiagram
    participant Mount as Component Mount
    participant Observer as ResizeObserver/<br/>MutationObserver
    participant State as Component State
    participant Render as Render Logic

    Mount->>Observer: Setup watchers on mount<br/>(cards wrapper + empty-state)
    Observer->>Observer: Perform initial check
    Observer->>State: Detect changes in DOM
    
    Note over State: isEmptyState evaluation:<br/>1. Empty-state marker present?<br/>2. Element height > 0?<br/>3. Content presence (wrapper)?<br/>4. Loading state?
    
    State->>Render: isEmptyState = true
    Render->>Render: Render NearbyLocationsEmptyState<br/>(with MapPinOff icon + text)
    
    Note over Render: Alternative path
    
    State->>Render: isEmptyState = false
    Render->>Render: Render standard<br/>NearbyLocationsSection
Loading

Possibly related PRs

Suggested reviewers

  • briantstephan
  • benlife5
  • mkilpatrick
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch demo

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5fd1aae and cdb62b9.

📒 Files selected for processing (4)
  • packages/visual-editor/src/components/pageSections/NearbyLocations/NearbyLocations.tsx (3 hunks)
  • packages/visual-editor/src/components/pageSections/NearbyLocations/NearbyLocationsCardsWrapper.tsx (1 hunks)
  • packages/visual-editor/src/components/pageSections/ReviewsSection/ReviewsSection.tsx (5 hunks)
  • packages/visual-editor/src/vite-plugin/templates/main.tsx (1 hunks)

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

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

Labels

create-dev-release Triggers dev release workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants