feat: add CLI dynamic widget generation#207
Open
V3RON wants to merge 5 commits into
Open
Conversation
Port dynamic widget manifest, placeholder, native wiring, and release bundling generation to voltra apply for React Native CLI projects.
Apply repository formatter output after adding CLI dynamic widget generation.
Use the app's own Metro instance when loading Metro APIs and add a regression test.
Use an error-only reporter for the widget Metro config so startup banners and info logs stay quiet while real Metro failures still surface.
Drop custom logging for Metro events that the upstream terminal reporter does not render, and keep the reporter limited to terminal-visible error paths.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this?
This PR brings Dynamic Widget generation to the Voltra CLI so React Native CLI projects can use the same widget workflow that Expo projects already have.
voltra applynow understands widgetentrydeclarations and generates the native and Metro-facing pieces required for on-device widget rendering.How does it work?
The CLI keeps widget entries project-relative, validates that Dynamic Widget modules default-export a render function, and writes platform manifests under
.voltra. It also generates dynamic placeholder initial states, iOS client widget provider scaffolding with AppIntent support, Android client widget receivers and configuration defaults, and release build hooks that bake widget bundles through@use-voltra/metro. Generated Android Gradle and iOS Xcode wiring is idempotent and cleaned up when dynamic widgets are removed.Why is this useful?
React Native CLI users no longer need the Expo config-plugin path to ship Dynamic Widgets. The same config-level widget model now works through
voltra apply, making the experimental dynamic widget workflow available across both supported setup flows while preserving existing server-rendered widget behavior.