-
Notifications
You must be signed in to change notification settings - Fork 0
feat: allow custom code component for all users #922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
WalkthroughThis pull request removes the default feature flag gate on the CustomCodeSection component. The Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/visual-editor/src/utils/filterComponents.test.ts (1)
32-58: Advanced core info flag test stays consistent with new custom code behaviorWith
coreInformationexplicitly allowed, asserting thatGrid/BodyTextare present and thatCustomCodeSectionremains available (both in the registry and theothercategory) is consistent with the intended feature-flag behavior and the new ungated custom code default. Consider adding similar assertions when new gated components are introduced to keep this coverage pattern.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
packages/visual-editor/src/components/testing/screenshots/StaticMapSection/[mobile] default props with coordinate - with api key.pngis excluded by!**/*.png,!packages/visual-editor/src/components/testing/screenshots/**
📒 Files selected for processing (4)
packages/visual-editor/src/components/CustomCodeSection.tsx(0 hunks)packages/visual-editor/src/docs/components.md(1 hunks)packages/visual-editor/src/utils/filterComponents.test.ts(2 hunks)packages/visual-editor/src/utils/filterComponents.ts(2 hunks)
💤 Files with no reviewable changes (1)
- packages/visual-editor/src/components/CustomCodeSection.tsx
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-29T22:00:03.843Z
Learnt from: mkouzel-yext
Repo: yext/visual-editor PR: 833
File: packages/visual-editor/src/components/Locator.tsx:1050-1057
Timestamp: 2025-10-29T22:00:03.843Z
Learning: In packages/visual-editor/src/components/Locator.tsx, the AppliedFilters component is intentionally rendered in two locations (inside the filter modal and outside it) as per the design requirements. This dual rendering should not be flagged as a duplicate issue.
Applied to files:
packages/visual-editor/src/utils/filterComponents.ts
🔇 Additional comments (4)
packages/visual-editor/src/docs/components.md (1)
116-133: CustomCodeSection docs now match ungated behaviorRemoving the feature‑flag note keeps the description aligned with the new default availability of CustomCodeSection; no further doc changes needed here.
packages/visual-editor/src/utils/filterComponents.ts (2)
3-8: Component-level gating correctly disabled while keeping mechanism intactSetting
gatedLayoutComponentsto an empty array removes default gating (including forCustomCodeSection) while preserving the hook for future gated components; this aligns with the PR goal.
40-51: Final component filter matches documented gating rulesThe comment and implementation agree: a component must (a) belong to an allowed category and (b) either not be in
gatedLayoutComponentsor be explicitly allowed viaadditionalLayoutComponents. This preserves future flexibility without changing current behavior sincegatedLayoutComponentsis empty.packages/visual-editor/src/utils/filterComponents.test.ts (1)
6-30: Baseline gating test correctly reflects ungated CustomCodeSectionExpecting
CustomCodeSectionin both the components registry and theothercategory, while still excludingGrid/BodyTextand thecoreInformationcategory, matches the updated gating logic.
Previously it was gated behind a feature flag. This removes it from the list of gated components, but leaves some of the base logic in case we need to gate another component in the future.