Skip to content

feat: add tooltip to itemSource for mapping requirements - #1266

Merged
jwartofsky-yext merged 5 commits into
mainfrom
itemSourceTooltip
Jul 16, 2026
Merged

feat: add tooltip to itemSource for mapping requirements#1266
jwartofsky-yext merged 5 commits into
mainfrom
itemSourceTooltip

Conversation

@jwartofsky-yext

@jwartofsky-yext jwartofsky-yext commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Adds a tooltip to the Parent field when in Entity mode that explains that "List elements must be able to satisfy the mapping requirements."

The required fields are listed in the message aswell.

This works for both itemSource and slottedItemSource.

image

Adds a tooltip to the Parent field when in Entity mode that
explains that "List elements must be able to satisfy the mapping requirements."

The required fields are listed in the message aswell.
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The visual editor derives unique field type requirements from repeated entity field item sources and passes them to ConstantValueModeToggler. When constant-value mode is disabled, the toggler displays a localized information button with the required types. Two localized strings were added across supported platform locales. Tests cover displaying tooltip contents and hiding the control when constant-value mode is enabled.

Sequence Diagram(s)

sequenceDiagram
  participant Editor as Repeated entity field selector
  participant Toggler as Constant value mode toggler
  participant Tooltip as Requirements tooltip
  Editor->>Toggler: Pass normalized item source requirements
  Toggler->>Tooltip: Render info button when constant mode is disabled
  Tooltip-->>Editor: Display localized requirement types
Loading

Possibly related PRs

Suggested labels: create-dev-release

Suggested reviewers: briantstephan, asanehisa, benlife5

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly matches the main change: adding a mapping-requirements tooltip for itemSource.
Description check ✅ Passed The description accurately describes the new Entity-mode tooltip and the listed required fields for itemSource and slottedItemSource.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch itemSourceTooltip

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 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/locales/platform/en/visual-editor.json`:
- Line 560: Update the expected tooltip text in
EntityFieldSelectorField.test.tsx to match the current
itemSourceParentFieldTooltip locale copy: “List elements must be able to satisfy
the mapping requirements:”. Replace the stale “List fields must have
children...” assertion and leave the locale and component unchanged.

In `@packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx`:
- Around line 628-631: The tooltip text assertion in the
EntityFieldSelectorField test uses wording that differs from the component’s
default string. Update the assertion to expect “List elements must be able to
satisfy the mapping requirements:” while preserving the existing tooltip lookup
and assertion structure.

In `@packages/visual-editor/src/fields/EntityFieldSelectorField.tsx`:
- Around line 84-87: Remove the module-level
ITEM_SOURCE_PARENT_FIELD_TOOLTIP_TITLE translation and call
pt("itemSourceParentFieldTooltip", ...) inside the component render path where
the tooltip title is used, alongside the existing parentFieldRequirements
translation pattern, so the value updates when the locale changes.
- Around line 247-249: Update the infoTooltipRequirements prop in
EntityFieldSelectorField to access itemSourceTypes through optional chaining on
field.filter, allowing undefined to be passed safely to
getItemSourceTooltipRequirements without throwing.
🪄 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: 20a11072-ab9d-47f3-8d2c-42e4bd4e2c9f

📥 Commits

Reviewing files that changed from the base of the PR and between a46fa45 and 882b6bc.

📒 Files selected for processing (27)
  • 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/src/fields/EntityFieldSelectorField.test.tsx
  • packages/visual-editor/src/fields/EntityFieldSelectorField.tsx

Comment thread packages/visual-editor/locales/platform/en/visual-editor.json
Comment thread packages/visual-editor/src/fields/EntityFieldSelectorField.test.tsx
Comment thread packages/visual-editor/src/fields/EntityFieldSelectorField.tsx Outdated
Comment thread packages/visual-editor/src/fields/EntityFieldSelectorField.tsx
mkilpatrick
mkilpatrick previously approved these changes Jul 15, 2026
Comment thread packages/visual-editor/src/fields/EntityFieldSelectorField.tsx Outdated
@jwartofsky-yext
jwartofsky-yext merged commit f60905a into main Jul 16, 2026
18 checks passed
@jwartofsky-yext
jwartofsky-yext deleted the itemSourceTooltip branch July 16, 2026 15:40
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.

3 participants