Skip to content

feat: footer prop enhancement#1125

Open
benlife5 wants to merge 18 commits intomainfrom
footer-updates
Open

feat: footer prop enhancement#1125
benlife5 wants to merge 18 commits intomainfrom
footer-updates

Conversation

@benlife5
Copy link
Copy Markdown
Contributor

@benlife5 benlife5 commented Mar 25, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

⚠️ Deleted Translation Keys Detected

🔤 Deleted Translation Keys

fields

Key Languages Removed
fields.linksPosition cs,da de,en en-GB,es et,fi fr,hr hu,it ja,lt lv,nb nl,pl pt,ro sk,sv tr,zh zh-TW
fields.show cs,da de,en en-GB,es et,fi fr,hr hu,it ja,lt lv,nb nl,pl pt,ro sk,sv tr,zh zh-TW

secondaryFooter

Key Languages Removed
secondaryFooter.hiddenOnLivePage cs,da de,en en-GB,es et,fi fr,hr hu,it ja,lt lv,nb nl,pl pt,ro sk,sv tr,zh zh-TW

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the new screenshot is actually correct according to the props, the old one wasn't respecting the alignment on mobile

@benlife5 benlife5 marked this pull request as ready for review March 27, 2026 20:50
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

Walkthrough

Refactors footer alignment and visibility across the visual editor. Replaces single alignment/linksPosition fields with desktopContentAlignment and mobileContentAlignment, adds visibility booleans (showLogo, showSocialLinks, showUtilityImages, secondaryFooter.show), updates many locale JSON keys, adds a migration (0072) to transform legacy footer data, and updates default layout data to version 72 with the new alignment and visibility props.

Sequence Diagram(s)

sequenceDiagram
    participant Editor as Editor UI
    participant MigrationRegistry as MigrationRegistry
    participant FooterMigration as 0072 Migration
    participant LayoutData as Layout Data
    participant Components as Footer Components

    Editor->>LayoutData: load layout (version 70/older)
    Editor->>MigrationRegistry: request migrations
    MigrationRegistry->>FooterMigration: run migration step
    FooterMigration->>LayoutData: transform footer props (alignment → desktop/mobile, add show* flags)
    LayoutData->>Components: provide migrated data
    Components->>Components: render using desktopContentAlignment/mobileContentAlignment and show* flags
Loading

Possibly related PRs

Suggested labels

create-dev-release

Suggested reviewers

  • briantstephan
  • mkilpatrick
  • asanehisa
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: footer prop enhancement' directly and clearly describes the main change: adding new props and alignment controls to footer components.
Description check ✅ Passed The description provides a Figma design reference link that contextualizes the visual changes being made to the footer components.

✏️ 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 footer-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.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/visual-editor/src/components/footer/SecondaryFooterSlot.tsx (1)

186-198: ⚠️ Potential issue | 🟡 Minor

Update defaultProps to use new alignment props instead of legacy alignment.

The SecondaryLinksWrapperSlot defaultProps at line 196 still uses alignment: "left", which is the legacy prop. For newly created SecondaryFooterSlot instances (post-migration), this prop won't be transformed since migrations only run once. While FooterLinksSlot has defaults for the new props, the orphaned alignment prop is unused and should be updated for consistency.

🔧 Proposed fix to use new alignment props
       SecondaryLinksWrapperSlot: [
         {
           type: "FooterLinksSlot",
           props: {
             data: {
               links: defaultLinks,
             },
             variant: "secondary",
             eventNamePrefix: "secondary",
-            alignment: "left",
+            desktopContentAlignment: "left",
+            mobileContentAlignment: "left",
           },
         },
       ],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/components/footer/SecondaryFooterSlot.tsx` around
lines 186 - 198, The SecondaryFooterSlot defaultProps still set the legacy
alignment prop for slots.SecondaryLinksWrapperSlot (alignment: "left"); remove
that legacy key and replace it with the new alignment props expected by
FooterLinksSlot so defaults match (update the slots entry under
SecondaryFooterSlot -> SecondaryLinksWrapperSlot to drop alignment and add the
new prop(s) used by FooterLinksSlot, e.g. set the horizontal/primary alignment
prop to "left" to mirror the previous behavior).
packages/visual-editor/src/components/footer/ExpandedFooter.tsx (1)

605-613: ⚠️ Potential issue | 🟡 Minor

Remove the legacy alignment prop from the default FooterLinksSlot in SecondaryFooterSlot.tsx defaultProps.

The alignment forwarding is correctly implemented via resolveData, which passes styles.desktopContentAlignment and styles.mobileContentAlignment to the nested SecondaryLinksWrapperSlot[0].props (lines 215-216 and 220-221). However, line 196 still includes the legacy alignment: "left" prop, which is not part of FooterLinksSlotProps and serves no purpose. Remove it to avoid confusion and clean up stale code.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/components/footer/ExpandedFooter.tsx` around lines
605 - 613, Remove the legacy alignment prop from the default FooterLinksSlot
props: locate the defaultProps (or the object literal) that sets type:
"FooterLinksSlot" and delete the unused alignment: "left" entry (in
SecondaryFooterSlot / the FooterLinksSlot defaults). The alignment is already
handled via resolveData which forwards styles.desktopContentAlignment and
styles.mobileContentAlignment to SecondaryLinksWrapperSlot[0].props, so simply
removing the alignment property cleans up the stale prop without further
changes.
🧹 Nitpick comments (1)
packages/visual-editor/src/vite-plugin/defaultLayoutData.ts (1)

3841-3849: Factor the shared v72 footer seed into a helper.

The same ExpandedFooter schema update now has to be maintained in both mainDefaultLayout and directoryDefaultLayout. Pulling the shared footer data and styles defaults into a small builder/object would make future footer-prop changes much less likely to drift.

Also applies to: 4154-4200, 4617-4625, 4906-4988

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/vite-plugin/defaultLayoutData.ts` around lines
3841 - 3849, Extract the shared v72 footer defaults into a small helper (e.g.,
buildV72FooterSeed or v72FooterDefaults) that returns the common data and styles
for the footer, then replace the duplicated footer objects in mainDefaultLayout
and directoryDefaultLayout with calls/refs to that helper; ensure the helper
provides both primaryFooter and secondaryFooter shapes (including
expandedFooter, showLogo, showSocialLinks, showUtilityImages, show) and update
the other duplicated spots that apply the same v72 footer seed so they consume
the helper instead of duplicating the object.
🤖 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/locales/platform/lv/visual-editor.json`:
- Line 481: The translation for the key "showUtilityImages" uses "Rādīt utilītu
attēlus" but should match the existing term "Lietderīgie attēli" used elsewhere;
update the value of "showUtilityImages" to use "Rādīt Lietderīgie attēli" (or
the exact phrasing matching surrounding entries) so the `utilityImages`
terminology is consistent across the locale.

In `@packages/visual-editor/locales/platform/sv/visual-editor.json`:
- Line 213: The JSON key "desktopLinkPosition" currently has an English value;
update its value to the Swedish translation (e.g., "Skrivbordslänkens position"
or "Länkposition på skrivbordet") so the UI footer control is fully
localized—edit the value for "desktopLinkPosition" in the visual-editor.json
locale file to the chosen Swedish text.

In `@packages/visual-editor/locales/platform/tr/visual-editor.json`:
- Around line 211-213: Add missing i18n metadata after updating Turkish locale:
run the i18n update task to sync locale metadata. Execute the command `pnpm
--dir packages/visual-editor run i18n:update` (from the repo root) so the new
keys like "desktopContentAlignment", "desktopImagePosition", and
"desktopLinkPosition" are propagated into the i18n metadata; after running it,
commit the updated locale metadata files and re-run tests or lints that validate
i18n consistency.

In `@packages/visual-editor/src/components/footer/ExpandedFooter.test.tsx`:
- Line 1495: The test fixtures in ExpandedFooter.test.tsx use a misspelled
TikTok URL ("https://toktok.com/yext") which breaks social-link validation;
locate the fixtures that define the tiktokLink property (the test data objects
in ExpandedFooter.test.tsx) and update both occurrences to the correct domain
("https://tiktok.com/yext") so the TikTok icon will render when showSocialLinks
is enabled.
- Line 1663: The v72 test fixtures in ExpandedFooter.test.tsx still use the
removed prop name linksPosition; update those fixtures to use the renamed prop
desktopLinkPosition (preserving the same value, e.g., "right") so the snapshot
suite validates the current prop name. Locate the v72 fixture objects in this
test (search for linksPosition and the v72 case identifiers around the
ExpandedFooter test), replace linksPosition with desktopLinkPosition, and apply
the same change to the other v72 fixtures in the same block mentioned in the
comment.

---

Outside diff comments:
In `@packages/visual-editor/src/components/footer/ExpandedFooter.tsx`:
- Around line 605-613: Remove the legacy alignment prop from the default
FooterLinksSlot props: locate the defaultProps (or the object literal) that sets
type: "FooterLinksSlot" and delete the unused alignment: "left" entry (in
SecondaryFooterSlot / the FooterLinksSlot defaults). The alignment is already
handled via resolveData which forwards styles.desktopContentAlignment and
styles.mobileContentAlignment to SecondaryLinksWrapperSlot[0].props, so simply
removing the alignment property cleans up the stale prop without further
changes.

In `@packages/visual-editor/src/components/footer/SecondaryFooterSlot.tsx`:
- Around line 186-198: The SecondaryFooterSlot defaultProps still set the legacy
alignment prop for slots.SecondaryLinksWrapperSlot (alignment: "left"); remove
that legacy key and replace it with the new alignment props expected by
FooterLinksSlot so defaults match (update the slots entry under
SecondaryFooterSlot -> SecondaryLinksWrapperSlot to drop alignment and add the
new prop(s) used by FooterLinksSlot, e.g. set the horizontal/primary alignment
prop to "left" to mirror the previous behavior).

---

Nitpick comments:
In `@packages/visual-editor/src/vite-plugin/defaultLayoutData.ts`:
- Around line 3841-3849: Extract the shared v72 footer defaults into a small
helper (e.g., buildV72FooterSeed or v72FooterDefaults) that returns the common
data and styles for the footer, then replace the duplicated footer objects in
mainDefaultLayout and directoryDefaultLayout with calls/refs to that helper;
ensure the helper provides both primaryFooter and secondaryFooter shapes
(including expandedFooter, showLogo, showSocialLinks, showUtilityImages, show)
and update the other duplicated spots that apply the same v72 footer seed so
they consume the helper instead of duplicating the object.
🪄 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: eeda40e5-5cff-4329-97d7-ffb181c1e82e

📥 Commits

Reviewing files that changed from the base of the PR and between c76aa4d and 07c519a.

⛔ Files ignored due to path filters (40)
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] default props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 20 props - expanded full width.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 42 props - basic.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 42 props - expanded with all data.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 51 - with external links, centered secondary links - Dark BG.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 51 - with external links, centered secondary links.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 71 props with color overrides.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 72 - center align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 72 - left align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 72 - left links, desktop center, mobile left, hide secondary links.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[desktop] version 72 - right align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] default props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 20 props - expanded full width.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 42 props - basic.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 42 props - expanded with all data.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 48 props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 51 - with external links, centered secondary links - Dark BG.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 51 - with external links, centered secondary links.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 71 props with color overrides.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 72 - center align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 72 - left align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 72 - left links, desktop center, mobile left, hide secondary links.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[mobile] version 72 - right align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] default props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 20 props - expanded full width.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 42 props - basic.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 42 props - expanded with all data.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 48 props.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 51 - with external links, centered secondary links - Dark BG.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 51 - with external links, centered secondary links.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 71 props with color overrides.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 72 - center align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 72 - left align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 72 - left links, desktop center, mobile left, hide secondary links.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/ExpandedFooter/[tablet] version 72 - right align.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Grid/[mobile] version 29 - various CTAs.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Grid/[mobile] version 45 - CTAs with Dark background.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Grid/[mobile] version 45 - CTAs with different site colors.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Grid/[tablet] version 19 - various atoms.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
  • packages/visual-editor/src/components/testing/screenshots/Locator/[tablet] version 64 static image.png is excluded by !**/*.png, !packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (37)
  • 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/components/footer/CopyrightMessageSlot.tsx
  • packages/visual-editor/src/components/footer/ExpandedFooter.test.tsx
  • packages/visual-editor/src/components/footer/ExpandedFooter.tsx
  • packages/visual-editor/src/components/footer/FooterExpandedLinksWrapper.tsx
  • packages/visual-editor/src/components/footer/FooterLinksSlot.tsx
  • packages/visual-editor/src/components/footer/FooterUtilityImagesSlot.tsx
  • packages/visual-editor/src/components/footer/SecondaryFooterSlot.tsx
  • packages/visual-editor/src/components/migrations/0072_footer_alignment_and_visibility_props.ts
  • packages/visual-editor/src/components/migrations/migrationRegistry.ts
  • packages/visual-editor/src/docs/ai/components.d.ts
  • packages/visual-editor/src/docs/components.md
  • packages/visual-editor/src/vite-plugin/defaultLayoutData.ts

Comment on lines +211 to +213
"desktopContentAlignment": "Masaüstü İçerik Hizalaması",
"desktopImagePosition": "Masaüstü görüntü konumu",
"desktopLinkPosition": "Masaüstü Bağlantı Konumu",
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Any remaining deprecated i18n lookups?"
rg -n --type=ts --type=tsx 'msg\(["'"'"']fields\.linksPosition["'"'"']\)' packages/visual-editor/src || true

echo "2) Current prop usage footprint:"
rg -n --type=ts --type=tsx '\b(linksPosition|linkPosition|desktopLinkPosition)\b' \
  packages/visual-editor/src/components/footer \
  packages/visual-editor/src/components/migrations || true

echo "3) Locale key parity across platform locales:"
python - <<'PY'
import json, pathlib, sys
required = {
  "desktopContentAlignment",
  "desktopLinkPosition",
  "secondaryFooter",
  "showLinks",
  "showLogo",
  "showSocialLinks",
  "showUtilityImages",
}
missing = []
for p in pathlib.Path("packages/visual-editor/locales/platform").glob("*/visual-editor.json"):
    data = json.loads(p.read_text(encoding="utf-8"))
    fields = data.get("fields", {})
    miss = sorted(required - set(fields.keys()))
    if miss:
        missing.append((str(p), miss))

if missing:
    print("Missing required footer keys:")
    for p, miss in missing:
        print(f"{p}: {miss}")
    sys.exit(1)

print("All platform locale files include required footer keys.")
PY

Repository: yext/visual-editor

Length of output: 311


Ensure pnpm --dir packages/visual-editor run i18n:update is run after locale changes.

The Turkish locale additions for the new footer controls are in place, and verification confirms all platform locales include the required keys. Complete the update by running the i18n:update command to sync locale metadata.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/locales/platform/tr/visual-editor.json` around lines
211 - 213, Add missing i18n metadata after updating Turkish locale: run the i18n
update task to sync locale metadata. Execute the command `pnpm --dir
packages/visual-editor run i18n:update` (from the repo root) so the new keys
like "desktopContentAlignment", "desktopImagePosition", and
"desktopLinkPosition" are propagated into the i18n metadata; after running it,
commit the updated locale metadata files and re-run tests or lints that validate
i18n consistency.

selectedColor: "palette-primary-dark",
contrastingColor: "white",
},
linksPosition: "right",
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.

⚠️ Potential issue | 🟠 Major

Use desktopLinkPosition in the v72 fixtures.

These current-version cases still populate the removed linksPosition field, so the screenshot suite is not actually validating the renamed footer prop. Either rename these to desktopLinkPosition, or move the fixtures back to a pre-72 version if the intent is migration coverage.

♻️ Representative fix
-          linksPosition: "right",
+          desktopLinkPosition: "right",

Apply the same rename to the other v72 fixtures in this block.

Also applies to: 1931-1931, 2107-2107, 2396-2396

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/components/footer/ExpandedFooter.test.tsx` at line
1663, The v72 test fixtures in ExpandedFooter.test.tsx still use the removed
prop name linksPosition; update those fixtures to use the renamed prop
desktopLinkPosition (preserving the same value, e.g., "right") so the snapshot
suite validates the current prop name. Locate the v72 fixture objects in this
test (search for linksPosition and the v72 case identifiers around the
ExpandedFooter test), replace linksPosition with desktopLinkPosition, and apply
the same change to the other v72 fixtures in the same block mentioned in the
comment.

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: 2

🤖 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/locales/platform/lv/visual-editor.json`:
- Line 481: Update the value for the JSON key "showUtilityImages" in the locales
object to use sentence-case and correct Latvian grammar; replace "Rādīt
Lietderīgie attēli" with the approved phrasing such as "Rādīt lietderīgos
attēlus" (or your house-approved variant) so it matches nearby label style and
casing conventions.

In `@packages/visual-editor/src/components/footer/ExpandedFooter.test.tsx`:
- Around line 2077-2078: The test assigns raw link objects to the slots key
(SecondaryLinksWrapperSlot = testFooterLinks) but slots must be an array of
component descriptors ({ type, props }); update the test to provide an array of
slot components instead of raw data by mapping testFooterLinks into the expected
slot shape (or replace testFooterLinks with a slot-typed array) so that
SecondaryLinksWrapperSlot receives [{ type: <component>, props: { links: [...] }
}] (preserve the existing component type used elsewhere in the suite and the
prop name expected by the footer).
🪄 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: 94258a20-2dce-4ea3-9fec-a03fbdcce285

📥 Commits

Reviewing files that changed from the base of the PR and between 07c519a and 7a204c6.

📒 Files selected for processing (3)
  • packages/visual-editor/locales/platform/lv/visual-editor.json
  • packages/visual-editor/locales/platform/sv/visual-editor.json
  • packages/visual-editor/src/components/footer/ExpandedFooter.test.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/visual-editor/locales/platform/sv/visual-editor.json

"showSocialLinks": "Rādīt sociālās saites",
"showSubtitle": "Rādīt subtitrus",
"showTitle": "Rādīt virsrakstu",
"showUtilityImages": "Rādīt Lietderīgie attēli",
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.

⚠️ Potential issue | 🟡 Minor

Adjust showUtilityImages phrasing for Latvian grammar/casing consistency.

"Rādīt Lietderīgie attēli" is inconsistent with nearby label style and reads grammatically off. Prefer a sentence-case object form like "Rādīt lietderīgos attēlus" (or your approved house translation equivalent).

💬 Suggested locale tweak
-    "showUtilityImages": "Rādīt Lietderīgie attēli",
+    "showUtilityImages": "Rādīt lietderīgos attēlus",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"showUtilityImages": "Rādīt Lietderīgie attēli",
"showUtilityImages": "Rādīt lietderīgos attēlus",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/locales/platform/lv/visual-editor.json` at line 481,
Update the value for the JSON key "showUtilityImages" in the locales object to
use sentence-case and correct Latvian grammar; replace "Rādīt Lietderīgie
attēli" with the approved phrasing such as "Rādīt lietderīgos attēlus" (or your
house-approved variant) so it matches nearby label style and casing conventions.

Comment on lines +2077 to +2078
slots: {
SecondaryLinksWrapperSlot: testFooterLinks,
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.

⚠️ Potential issue | 🟠 Major

SecondaryLinksWrapperSlot assigned raw link data instead of a slot component array.

testFooterLinks is an array of link objects, but slots expect an array of component definitions with type and props. This will cause the secondary links not to render correctly in this test case.

🐛 Proposed fix
               slots: {
-                SecondaryLinksWrapperSlot: testFooterLinks,
+                SecondaryLinksWrapperSlot: [
+                  {
+                    type: "FooterLinksSlot",
+                    props: {
+                      id: "FooterLinksSlot-right-align-secondary",
+                      data: {
+                        links: testFooterLinks,
+                      },
+                      variant: "secondary",
+                      eventNamePrefix: "secondary",
+                      desktopContentAlignment: "right",
+                      mobileContentAlignment: "right",
+                    },
+                  },
+                ],
                 CopyrightSlot: [
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
slots: {
SecondaryLinksWrapperSlot: testFooterLinks,
slots: {
SecondaryLinksWrapperSlot: [
{
type: "FooterLinksSlot",
props: {
id: "FooterLinksSlot-right-align-secondary",
data: {
links: testFooterLinks,
},
variant: "secondary",
eventNamePrefix: "secondary",
desktopContentAlignment: "right",
mobileContentAlignment: "right",
},
},
],
CopyrightSlot: [
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/visual-editor/src/components/footer/ExpandedFooter.test.tsx` around
lines 2077 - 2078, The test assigns raw link objects to the slots key
(SecondaryLinksWrapperSlot = testFooterLinks) but slots must be an array of
component descriptors ({ type, props }); update the test to provide an array of
slot components instead of raw data by mapping testFooterLinks into the expected
slot shape (or replace testFooterLinks with a slot-typed array) so that
SecondaryLinksWrapperSlot receives [{ type: <component>, props: { links: [...] }
}] (preserve the existing component type used elsewhere in the suite and the
prop name expected by the footer).

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.

1 participant