Conversation
# Conflicts: # packages/visual-editor/src/editor/YextField.tsx
|
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughThis PR removes the DynamicOptionsSelector implementation and its exports, adds a new MultiSelectorField implementation (+types, override, tests), and migrates callers (Locator, ImageField, TranslatableStringField, EmbeddedFieldStringInput, docs) from DynamicOption/DynamicOptionsSelector types to EmbeddedStringOption/MultiSelector types. YextField runtime support and overload for Sequence Diagram(s)sequenceDiagram
participant User
participant VisualEditor as Visual Editor
participant YextField
participant MultiSelector as MultiSelectorField
participant Store as Data Store
User->>VisualEditor: open editor / interact with locator or image field
VisualEditor->>YextField: render field config (type: "multiSelector")
YextField->>MultiSelector: instantiate field (options provider or static options)
MultiSelector->>VisualEditor: request options (call options function)
VisualEditor->>MultiSelector: return options (EmbeddedStringOption[])
User->>MultiSelector: select/deselect option(s)
MultiSelector->>YextField: emit onChange ({ selections: [...] } or undefined)
YextField->>Store: persist updated field value
Store-->>VisualEditor: confirm save / update UI
Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/visual-editor/src/fields/DynamicMultiSelectField.tsx`:
- Around line 7-10: The code currently allows object option values via
DynamicOptionValueTypes which breaks selection matching in getItemSummary (it
compares with === and object references change across renders), so restrict
option values to stable primitives: remove `object` from DynamicOptionValueTypes
(leaving `string | number | boolean`) and ensure DynamicOptionSelection<T> and
any callers/props expecting object values are updated to use a primitive key
(e.g., id string/number) instead; alternatively, if object support is required,
change getItemSummary to match by a stable key field instead of strict equality,
but the minimal fix is to remove `object` from the union and update usages
accordingly.
🪄 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: 6fc416f6-352f-4a4e-8936-8d1220299934
📒 Files selected for processing (14)
packages/visual-editor/src/components/Locator.tsxpackages/visual-editor/src/components/LocatorResultCard.tsxpackages/visual-editor/src/docs/components.mdpackages/visual-editor/src/editor/DynamicOptionsSelector.test.tsxpackages/visual-editor/src/editor/DynamicOptionsSelector.tsxpackages/visual-editor/src/editor/YextField.test.tsxpackages/visual-editor/src/editor/YextField.tsxpackages/visual-editor/src/editor/index.tspackages/visual-editor/src/fields/DynamicMultiSelectField.test.tsxpackages/visual-editor/src/fields/DynamicMultiSelectField.tsxpackages/visual-editor/src/fields/TranslatableStringField.tsxpackages/visual-editor/src/fields/fields.tspackages/visual-editor/src/fields/index.tspackages/visual-editor/src/internal/puck/constant-value-fields/Image.tsx
💤 Files with no reviewable changes (3)
- packages/visual-editor/src/editor/DynamicOptionsSelector.test.tsx
- packages/visual-editor/src/editor/index.ts
- packages/visual-editor/src/editor/DynamicOptionsSelector.tsx
# Conflicts: # packages/visual-editor/src/components/LocatorResultCard.tsx # packages/visual-editor/src/editor/YextField.test.tsx # packages/visual-editor/src/editor/YextField.tsx # packages/visual-editor/src/internal/puck/constant-value-fields/Image.tsx
9ef369a
auto-screenshot-update: true
Tested with devMode and confirmed multi select use in Locator still works! <img width="1840" height="1196" alt="Screenshot 2026-04-30 at 11 24 09 AM" src="https://github.com/user-attachments/assets/97f6ae19-ca55-4508-892a-1865b61e70d3" /> Renamed it to MultiSelector as that's the only diff between it and BasicSelector. Allow it to take in static values and dynamic like BasicSelector --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This reverts commit b7c7bb3.
Tested with devMode and confirmed multi select use in Locator still works!

Renamed it to MultiSelector as that's the only diff between it and BasicSelector. Allow it to take in static values and dynamic like BasicSelector