Skip to content

refactor: use 'basicSelector' for maxWidth#1192

Merged
mkilpatrick merged 2 commits intomainfrom
max-width
Apr 30, 2026
Merged

refactor: use 'basicSelector' for maxWidth#1192
mkilpatrick merged 2 commits intomainfrom
max-width

Conversation

@mkilpatrick
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions
Copy link
Copy Markdown
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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 131a11c3-24af-4d5b-b408-3a6f5180fd35

📥 Commits

Reviewing files that changed from the base of the PR and between 3ae2db9 and 01d2aa7.

📒 Files selected for processing (5)
  • packages/visual-editor/src/components/footer/ExpandedFooter.tsx
  • packages/visual-editor/src/components/header/ExpandedHeader.tsx
  • packages/visual-editor/src/editor/MaxWidthSelector.test.tsx
  • packages/visual-editor/src/editor/YextField.test.tsx
  • packages/visual-editor/src/editor/YextField.tsx
💤 Files with no reviewable changes (1)
  • packages/visual-editor/src/editor/YextField.tsx

Walkthrough

This pull request refactors the maxWidth field handling across the visual editor components. The dedicated "maxWidth" field type is removed from the YextField component, and components that previously relied on this built-in type (ExpandedFooter and ExpandedHeader) now define maxWidth using basicSelector with options dynamically generated by a new getMaxWidthOptions() utility function. Tests are updated to validate the new option generation logic.

Possibly related PRs

Suggested reviewers

  • briantstephan
  • jwartofsky-yext
  • benlife5
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess the intent or context of the changes. Add a description explaining the purpose and motivation for refactoring maxWidth to use basicSelector instead of a dedicated type.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main refactoring change: converting the maxWidth field implementation to use basicSelector.
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.

✏️ 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 max-width

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

Copy link
Copy Markdown
Contributor

@jwartofsky-yext jwartofsky-yext left a comment

Choose a reason for hiding this comment

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

LGTM!

@mkilpatrick mkilpatrick merged commit 23e21bc into main Apr 30, 2026
17 checks passed
@mkilpatrick mkilpatrick deleted the max-width branch April 30, 2026 15:45
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.

5 participants