Repository navigation
fix: allow_all_components for CMS - #3312
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR centralizes the allowed section components across eight CMS page-type schemas. Rather than maintaining separate ChangesCMS Page Schema Consolidation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
@faststore/api
@faststore/cli
@faststore/components
@faststore/core
@faststore/diagnostics
@faststore/lighthouse
@faststore/sdk
@faststore/ui
commit: |
## What's the purpose of this pull request? ℹ️ The same was done for vtex.faststore@4 via #3312 Fix a bug where CMS content-types (Home, PDP, PLP, Search, Landing Page, Global Sections) had their sections field hardcoded to an explicit list of allowed components instead of using `$ALLOW_ALL_COMPONENTS`. This prevented custom components from appearing in the CMS editor. Any store that created new sections would need to manually rewrite FastStore's schema, breaking the onboarding experience entirely. Reported by Otavio and Caixeta. A patch was already shipped in v4.0.1 as a hotfix. ## How it works? FastStore's base.jsonc defines a `$ALLOW_ALL_COMPONENTS` sentinel in **$defs**. This sentinel is replaced at build time (before sending to Schema Registry) with the full dynamic list of all registered components, including user-defined ones. Previously, the .jsonc files generated for each content type had the sections array expanded inline with a hardcoded anyOf list of known built-in components. This list was stale and excluded any custom component. This PR removes the hardcoded anyOf blocks and replaces them with a reference to `$ALLOW_ALL_COMPONENTS`, consistent with how 404, 500, and login content types already work. Also removes the **now-obsolete** `schema.json` that duplicated this data. ## How to test it? Add a new custom component using the faststore@3 base. This new fixed version is already deployed in v3.99.1. <img width="275" height="87" alt="image" src="https://github.com/user-attachments/assets/1e4a7398-4e5b-4b9c-827f-c7ac66ac6e2f" /> ## Checklist <em>You may erase this after checking them all 😉</em> **PR Title and Commit Messages** - [x] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification - Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test` **PR Description** - [x] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`.. **Dependencies** - [ ] Committed the `pnpm-lock.yaml` file when there were changes to the packages **Documentation** - [x] PR description - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request)
## Summary Graduation PR from `dev` to `main`. Promotes the `4.1.0-dev.10` prerelease cycle to the next stable, expected `4.1.1` (only `fix:` and `chore:` commits since `4.1.0`). ### Notable changes since 4.1.0 - fix: region slider section render (#3318) - fix: allow_all_components for CMS (#3312) - chore: test coverage sonarqube (#3319) - chore: bump next.js to 16.2.6 (#3327) - chore: phase 4 — split AGENTS.md, add MCP config and spec-kit check (#3320) - chore: Update repo read me files (#3314) - Dark Kitchen Catalog Setup (#3317) ### Back-merge `main` was back-merged into `dev` (`3d4d24081`) before this PR to bring in the `4.1.0` release commit and avoid silent overwrites. Conflicts were resolved in favor of `dev` for code/CMS/version files, with `CHANGELOG` entries merged from both sides. ## Test plan - [x] dev CD published `4.1.0-dev.10` on the `dev` dist-tag for all 8 packages - [ ] After merge, main CD graduates to `4.1.1` on the `latest` dist-tag - [ ] All 8 packages publish (api, cli, components, core, diagnostics, lighthouse, sdk, ui) Made with [Cursor](https://cursor.com) --------- Co-authored-by: Larícia Mota <[email protected]> Co-authored-by: Matheus P. Silva <[email protected]> Co-authored-by: Leandro Rodrigues <[email protected]> Co-authored-by: vtexgithubbot <[email protected]> Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Luiz Falcão <[email protected]> Co-authored-by: Artur Santiago <[email protected]> Co-authored-by: Sahan Jayawardana <[email protected]> Co-authored-by: Mateus Pontes <[email protected]> Co-authored-by: Matheus Martins <[email protected]> Co-authored-by: renatomaurovtex <[email protected]> Co-authored-by: Leandro Rodrigues <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Arthur Andrade <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Thiago Pereira <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Giuliana Rigaud <[email protected]> Co-authored-by: renato <[email protected]> Co-authored-by: Bruna Santos <[email protected]> Co-authored-by: BrunaCubos <[email protected]> Co-authored-by: Ícaro Oliveira <[email protected]> Co-authored-by: Bruna Santos <[email protected]> Co-authored-by: Everton Ataide <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Otavio Moreira Meirelles <[email protected]> Co-authored-by: Marco Cardoso <[email protected]> Co-authored-by: Gabriel Paladino <[email protected]> Co-authored-by: CodeRabbit <[email protected]> Co-authored-by: dk-portal[bot] <134092483+dk-portal[bot]@users.noreply.github.com>
What's the purpose of this pull request?
Fix a bug where CMS content-types (Home, PDP, PLP, Search, Landing Page, Global Sections) had their sections field hardcoded to an explicit list of allowed components instead of using
$ALLOW_ALL_COMPONENTS.This prevented custom components from appearing in the CMS editor. Any store that created new sections would need to manually rewrite FastStore's schema, breaking the onboarding experience entirely.
Reported by Otavio and Caixeta. A patch was already shipped in v4.0.1 as a hotfix.
How it works?
FastStore's base.jsonc defines a
$ALLOW_ALL_COMPONENTSsentinel in $defs. This sentinel is replaced at build time (before sending to Schema Registry) with the full dynamic list of all registered components, including user-defined ones.Previously, the .jsonc files generated for each content type had the sections array expanded inline with a hardcoded anyOf list of known built-in components. This list was stale and excluded any custom component.
This PR removes the hardcoded anyOf blocks and replaces them with a reference to
$ALLOW_ALL_COMPONENTS, consistent with how 404, 500, and login content types already work. Also removes the now-obsoleteschema.jsonthat duplicated this data.How to test it?
Add a new custom component using the faststore@4 base. This new fixed version is already deployed in v4.0.1.
Checklist
You may erase this after checking them all 😉
PR Title and Commit Messages
feat,fix,chore,docs,style,refactor,ciandtestPR Description
breaking change,bug,contributing,performance,documentation..Dependencies
pnpm-lock.yamlfile when there were changes to the packagesDocumentation
@Mariana-Caetanoto review and update (Or submit a doc request)Summary by CodeRabbit