Skip to content

Conversation

@rkeerthient
Copy link
Contributor

On professional VLE pages (location templates), we’re following the new two-column layout, where, the left side shows the description, while the right side lists details like products, services, and specialties. Right now, the right column looks too large because the list is rendered as a <ul>. To fix this, there will be a new prop Comma Separated on the TextList component. When toggled on, the list will display as a comma-separated string instead of a bulleted list. By default, this prop stays off.

TextList.mov

@rkeerthient rkeerthient changed the title update: adding comma seperated prop for TextList Component feat: adding comma seperated prop for TextList Component Nov 13, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

Walkthrough

Adds a new boolean prop commaSeparated to the TextList component (default false), updates rendering to show items inline with commas when true, adds commaSeparated locale keys across many visual-editor locales, and introduces a migration (addCommaSeparatedToTextList) that defaults existing TextList props.commaSeparated to false. The migration is registered in the migration registry.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Editor
    participant Storage
    participant MigrationRegistry
    participant Renderer as TextListComponent

    Editor->>Storage: Save TextList entity (props without commaSeparated)
    Storage->>MigrationRegistry: Request apply migrations on load
    MigrationRegistry->>Storage: addCommaSeparatedToTextList.propTransformation
    note right of MigrationRegistry `#DDEEFF`: If props.commaSeparated is undefined\nset to false
    MigrationRegistry-->>Storage: Store transformed entity (props.commaSeparated = false)
    Storage->>Renderer: Render TextList with props.commaSeparated = false
    alt commaSeparated = true
        Renderer->>Renderer: Render inline items with comma separators
    else commaSeparated = false
        Renderer->>Renderer: Render as bulleted list
    end
Loading

Suggested labels

create-dev-release

Suggested reviewers

  • mkilpatrick
  • briantstephan
  • benlife5

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a comma-separated prop to the TextList component, which matches the core functionality added across translations and component code.
Description check ✅ Passed The description clearly explains the purpose, context, and behavior of the new feature, directly relating to the changeset's addition of comma-separated display functionality.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch textlist-csv

📜 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 90d4ece and 194829a.

⛔ Files ignored due to path filters (1)
  • packages/visual-editor/src/components/testing/screenshots/StaticMapSection/[mobile] default props with coordinate - with api key.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (25)
  • packages/visual-editor/locales/cs/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/da/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/de/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/en-GB/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/en/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/es/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/et/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/fi/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/fr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/hr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/hu/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/it/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/ja/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/lt/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/lv/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/nb/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/nl/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/pl/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/pt/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/ro/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/sk/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/sv/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/tr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/zh-TW/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/zh/visual-editor.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (17)
  • packages/visual-editor/locales/fr/visual-editor.json
  • packages/visual-editor/locales/it/visual-editor.json
  • packages/visual-editor/locales/zh/visual-editor.json
  • packages/visual-editor/locales/da/visual-editor.json
  • packages/visual-editor/locales/tr/visual-editor.json
  • packages/visual-editor/locales/cs/visual-editor.json
  • packages/visual-editor/locales/zh-TW/visual-editor.json
  • packages/visual-editor/locales/hu/visual-editor.json
  • packages/visual-editor/locales/sk/visual-editor.json
  • packages/visual-editor/locales/ro/visual-editor.json
  • packages/visual-editor/locales/en-GB/visual-editor.json
  • packages/visual-editor/locales/es/visual-editor.json
  • packages/visual-editor/locales/lt/visual-editor.json
  • packages/visual-editor/locales/pt/visual-editor.json
  • packages/visual-editor/locales/nb/visual-editor.json
  • packages/visual-editor/locales/de/visual-editor.json
  • packages/visual-editor/locales/ja/visual-editor.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: call_unit_test / unit_tests (18.x)
  • GitHub Check: call_unit_test / unit_tests (20.x)
  • GitHub Check: semgrep/ci
🔇 Additional comments (10)
packages/visual-editor/locales/hr/visual-editor.json (1)

147-147: Looks good!

The locale key is correctly spelled "commaSeparated" with an appropriate Croatian translation. This aligns with the PR's objective of adding the new prop across all locales, and the misspelled variant has been properly excluded.

packages/visual-editor/locales/nl/visual-editor.json (1)

147-147: LGTM!

The new locale key commaSeparated is properly added to the Dutch locale file with a well-placed, alphabetically-correct entry. The translation "Komma gescheiden" is appropriate.

packages/visual-editor/locales/lv/visual-editor.json (1)

147-147: LGTM!

The new locale key is correctly added to the fields section with proper alphabetical ordering and valid JSON syntax. This aligns with the parallel locale updates across other languages for the TextList commaSeparated feature.

packages/visual-editor/locales/sv/visual-editor.json (1)

148-148: LGTM!

The translation key is correctly placed in alphabetical order within the fields object and uses an appropriate Swedish translation for "comma-separated." The change aligns with the broader locale rollout for the TextList component feature.

packages/visual-editor/locales/fi/visual-editor.json (2)

147-147: Finnish translation is appropriate and consistent.

The translation "Pilkulla erotettuna" accurately conveys the meaning of "separated by commas" and aligns with the feature's intent to render TextList items as comma-separated strings.


147-147: Cleanup verified—change is ready.

The misspelled commaSeperated key has been completely removed from all 25 locale files, and the correctly spelled commaSeparated is consistently present across the codebase. The Finnish translation at line 147 is properly formatted and idiomatic.

packages/visual-editor/locales/et/visual-editor.json (1)

147-147: Localization is complete across all locale files — verification confirms the commaSeparated key exists in all 25 locale files under packages/visual-editor/locales/. The Estonian translation is properly formatted and consistently included with the feature rollout. No action needed.

packages/visual-editor/locales/pl/visual-editor.json (1)

148-148: Verify translation accuracy for Polish locale.

The Polish translation "commaSeparated": "Oddzielone przecinkiem" (comma-separated) appears contextually appropriate. However, verify with native Polish speakers or translation guidelines that this is the preferred terminology for UI field labels in your design system.

packages/visual-editor/locales/en/visual-editor.json (2)

146-146: ✓ All misspelled "commaSeperated" entries have been successfully removed from the codebase.

Verification confirms:

  • No misspelled "commaSeperated" entries found across any locale files
  • Correct spelling "commaSeparated" verified in 25 locale files

The concern raised in the previous review has been fully addressed. The English locale file (line 146) and all other locale files now use the correct spelling consistently, eliminating any risk of key conflicts or user confusion.


124-147: Key positioning verified across all 25 locale files.

Verification confirms that commaSeparated is consistently positioned after columns in all locale files (cs, da, de, en-GB, en, es, et, fi, fr, hr, hu, it, ja, lt, lv, nb, nl, pl, pt, ro, sk, sv, tr, zh-TW, zh). The placement is correctly maintained for consistency.


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.

Copy link
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: 5

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59f88ff and 5f7187e.

📒 Files selected for processing (28)
  • packages/visual-editor/locales/cs/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/da/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/de/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/en-GB/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/en/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/es/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/et/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/fi/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/fr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/hr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/hu/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/it/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/ja/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/lt/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/lv/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/nb/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/nl/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/pl/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/pt/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/ro/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/sk/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/sv/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/tr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/zh-TW/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/zh/visual-editor.json (1 hunks)
  • packages/visual-editor/src/components/contentBlocks/TextList.tsx (4 hunks)
  • packages/visual-editor/src/components/migrations/0025_add_commaSeparated_to_textList.ts (1 hunks)
  • packages/visual-editor/src/components/migrations/migrationRegistry.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
packages/visual-editor/src/components/contentBlocks/TextList.tsx (2)
packages/visual-editor/src/editor/YextField.tsx (1)
  • YextField (163-284)
packages/visual-editor/src/utils/resolveComponentData.tsx (1)
  • resolveComponentData (52-99)
packages/visual-editor/src/components/migrations/migrationRegistry.ts (1)
packages/visual-editor/src/components/migrations/0025_add_commaSeparated_to_textList.ts (1)
  • addCommaSeparatedToTextList (3-13)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: call_unit_test / unit_tests (18.x)
  • GitHub Check: call_unit_test / unit_tests (20.x)
  • GitHub Check: semgrep/ci
🔇 Additional comments (16)
packages/visual-editor/locales/nb/visual-editor.json (1)

147-147: Consistent localization addition, but note systemic property naming issue.

The addition of "commaSeperated": "Kommadelt" is correct and properly positioned. However, the property name uses commaSeperated (with an 'e') instead of the standard English spelling commaSeparated (with an 'a'). This typo appears consistent with the implementation (per the migration file mentioned in the PR summary), so it is not an error in this file. Consider opening a follow-up issue to standardize the property name across the codebase if not already tracked.

packages/visual-editor/locales/sk/visual-editor.json (1)

148-148: LGTM. Correctly placed and translated.

packages/visual-editor/locales/lv/visual-editor.json (1)

147-147: LGTM. Correctly placed and translated.

packages/visual-editor/locales/hr/visual-editor.json (1)

147-147: LGTM. Correctly placed and translated.

packages/visual-editor/locales/zh-TW/visual-editor.json (1)

147-147: LGTM. Correctly placed and translated.

packages/visual-editor/locales/pl/visual-editor.json (1)

148-148: LGTM. Correctly placed and translated.

packages/visual-editor/locales/de/visual-editor.json (1)

146-146: LGTM. Correctly placed and translated.

packages/visual-editor/locales/zh/visual-editor.json (1)

147-147: LGTM. Correctly placed and translated.

packages/visual-editor/locales/sv/visual-editor.json (1)

148-148: Consistent property misspelling across all locale files.

The key commaSeperated (one 'r' in "separated") is misspelled. The correct spelling is commaSeparated (two 'r's). This misspelling appears in all 8 locale files in this PR. To maintain code quality and avoid future confusion, consider a global rename to the correct spelling before merging.

Swedish translation is appropriate: "Kommaseparerad" = "comma-separated."

packages/visual-editor/locales/ja/visual-editor.json (1)

147-147: Same spelling inconsistency as other locale files.

Line 147 also uses commaSeperated (misspelled). See note above regarding correcting to commaSeparated across all files. Japanese translation "カンマ区切り" is appropriate and correctly conveys "comma-separated."

packages/visual-editor/locales/fr/visual-editor.json (1)

146-146: Same misspelled property name across all locales.

Line 146 continues the pattern of using commaSeperated instead of the correct English spelling commaSeparated. This should be corrected globally. The French translation "Séparé par des virgules" is grammatically correct and appropriate for the UI.

packages/visual-editor/locales/ro/visual-editor.json (1)

147-147: Misspelled property name persists in Romanian locale.

Line 147 adds commaSeperated (should be commaSeparated). This is now the 5th file with the same inconsistency. The Romanian translation "Separat prin virgulă" is appropriate and correctly means "separated by comma."

packages/visual-editor/locales/es/visual-editor.json (1)

146-146: Property misspelling consistent across 6 locale files so far.

Line 146 uses commaSeperated (misspelled). The Spanish translation "Separados por comas" is correct and appropriately means "separated by commas." However, the underlying property name should be corrected globally to commaSeparated before release.

packages/visual-editor/locales/hu/visual-editor.json (1)

147-147: Misspelled property name continues in Hungarian locale (7th file).

Line 147 adds commaSeperated rather than commaSeparated. The Hungarian translation "Vesszővel elválasztva" is grammatically appropriate and conveys "separated by comma." However, the underlying property name misspelling should be corrected globally.

packages/visual-editor/locales/en-GB/visual-editor.json (1)

146-146: Consistent localization addition across all 8 locales.

The new commaSeperated translation key has been added to all provided locale files in alphabetical order within the fields object. All entries follow proper JSON formatting and are positioned consistently.

Note: The key spelling commaSeperated (instead of commaSeparated) appears to be intentional and matches the code implementation referenced in the PR summary, so no changes needed.

packages/visual-editor/src/components/migrations/migrationRegistry.ts (1)

25-25: Verify the migration number sequence.

The migration registry jumps from 0023_add_id_to_schema to 0025_add_commaSeparated_to_textList, skipping 0024. While this might be intentional (e.g., a deleted or reserved migration), please confirm whether migration 0024 exists or if the new migration should be renumbered to 0024.

Otherwise, the import and registration look correct structurally. Once the spelling of commaSeparated is fixed throughout the codebase (see comments on other files), these changes will be ready.

Also applies to: 56-56

Copy link
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: 6

♻️ Duplicate comments (2)
packages/visual-editor/locales/it/visual-editor.json (1)

147-148: Remove the misspelled commaSeperated key; keep only commaSeparated.

Both lines add translation keys, but line 148 introduces a misspelled duplicate. The correct key is commaSeparated (line 147); the misspelled variant commaSeperated should be removed entirely.

Apply this diff:

     "commaSeparated": "Separati da virgole",
-    "commaSeperated": "Separati da virgole",

This issue affects all 24 locale files in the PR. The misspelling must be corrected across the entire codebase—including the prop name in TextList.tsx, the migration file, and all other locale files—to avoid confusion and runtime bugs.

packages/visual-editor/locales/en/visual-editor.json (1)

146-147: Remove the misspelled commaSeperated key and fix its value.

Line 146 correctly adds commaSeparated: "Comma Separated", but line 147 introduces a misspelled duplicate with both an incorrect key (commaSeperated) and an incorrect value ("Comma Seperated"). This typo is user-facing and will appear in the editor UI. Remove line 147 entirely.

Apply this diff:

     "commaSeparated": "Comma Separated",
-    "commaSeperated": "Comma Seperated",

Important: This correction must cascade across all 24 locale files, the TextList component prop definition, the migration file (ensure it uses the correct key name), and migrationRegistry.ts. A find-and-replace of commaSeperatedcommaSeparated throughout the codebase is required to prevent runtime errors and inconsistencies.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5f7187e and 90d4ece.

📒 Files selected for processing (27)
  • packages/visual-editor/locales/cs/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/da/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/de/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/en-GB/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/en/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/es/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/et/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/fi/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/fr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/hr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/hu/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/it/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/ja/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/lt/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/lv/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/nb/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/nl/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/pl/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/pt/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/ro/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/sk/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/sv/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/tr/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/zh-TW/visual-editor.json (1 hunks)
  • packages/visual-editor/locales/zh/visual-editor.json (1 hunks)
  • packages/visual-editor/src/components/contentBlocks/TextList.tsx (4 hunks)
  • packages/visual-editor/src/components/migrations/0025_add_commaSeparated_to_textList.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (19)
  • packages/visual-editor/locales/pl/visual-editor.json
  • packages/visual-editor/locales/nl/visual-editor.json
  • packages/visual-editor/locales/pt/visual-editor.json
  • packages/visual-editor/locales/es/visual-editor.json
  • packages/visual-editor/locales/da/visual-editor.json
  • packages/visual-editor/locales/sk/visual-editor.json
  • packages/visual-editor/locales/tr/visual-editor.json
  • packages/visual-editor/locales/et/visual-editor.json
  • packages/visual-editor/locales/ro/visual-editor.json
  • packages/visual-editor/locales/lv/visual-editor.json
  • packages/visual-editor/src/components/migrations/0025_add_commaSeparated_to_textList.ts
  • packages/visual-editor/locales/fi/visual-editor.json
  • packages/visual-editor/locales/fr/visual-editor.json
  • packages/visual-editor/src/components/contentBlocks/TextList.tsx
  • packages/visual-editor/locales/sv/visual-editor.json
  • packages/visual-editor/locales/en-GB/visual-editor.json
  • packages/visual-editor/locales/de/visual-editor.json
  • packages/visual-editor/locales/cs/visual-editor.json
  • packages/visual-editor/locales/zh/visual-editor.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: call_unit_test / unit_tests (18.x)
  • GitHub Check: call_unit_test / unit_tests (20.x)
  • GitHub Check: semgrep/ci

@github-actions
Copy link
Contributor

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.

@mkilpatrick mkilpatrick merged commit 68a8e55 into main Nov 17, 2025
15 checks passed
@mkilpatrick mkilpatrick deleted the textlist-csv branch November 17, 2025 18:19
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.

6 participants