Add shared field includes and recently-used blocks palette - #70
Add shared field includes and recently-used blocks palette#70helmutkaufmann wants to merge 2 commits into
Conversation
Block definitions may declare a top-level include: (string or list) merging fields/config from external YAML files, with base-with- override precedence, nested include resolution, and cycle detection. Also bundles the small, related recently-used-blocks palette feature.
resolveIncludes() previously used the running $config[$key] (already containing earlier includes' merged result) as a tie-breaker alongside the block's own values, which made the first include always win on a key collision instead of the last one as documented. Includes are now merged into a separate accumulator before the block's own values are applied once at the end.
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
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 |
Split out of #68 (closed in favor of smaller, focused PRs).
Summary
.blockdefinitions may declare a top-levelinclude:(string or list) to mergefieldsandconfigfrom external plain-YAML files, resolved viaFile::symbolizePath()($/,~/,#/).localStorage).See the README sections "Including shared field definitions" and "Recently used blocks" for usage.
Test plan
tests/classes/BlockManagerTest.phpcovering merge precedence (including multi-include override order), nested includes, circular-include guarding, and missing-file handlingphp artisan winter:test -p Winter.Blocks)