Add movePropToNewChildElement utility and formControls migration#36
Merged
Add movePropToNewChildElement utility and formControls migration#36
Conversation
Owner
origami-z
commented
Jan 24, 2026
- Add movePropToNewChildElement function to utils.js for moving JSX props to new child elements
- Create formControls.js migration to migrate FormField from @salt-ds/lab to @salt-ds/core
- Moves label prop to FormFieldLabel child
- Moves helperText prop to FormFieldHelperText child
- Migrates FormField import from @salt-ds/lab to @salt-ds/core
- Add comprehensive edge case tests (41 new tests):
- Basic prop migration (string literals, JSX expressions, template literals)
- Import handling (adding to existing, creating new, avoiding duplicates)
- Component aliasing support
- Multiple instances, nested components, spread props
- Parameter validation and error handling
- Add movePropToNewChildElement function to utils.js for moving JSX props to new child elements - Create formControls.js migration to migrate FormField from @salt-ds/lab to @salt-ds/core - Moves label prop to FormFieldLabel child - Moves helperText prop to FormFieldHelperText child - Migrates FormField import from @salt-ds/lab to @salt-ds/core - Add comprehensive edge case tests (41 new tests): - Basic prop migration (string literals, JSX expressions, template literals) - Import handling (adding to existing, creating new, avoiding duplicates) - Component aliasing support - Multiple instances, nested components, spread props - Parameter validation and error handling
- Add migrateFormControls boolean option (default: false) to args.js - Import and conditionally call formControls migration in index.js - Migration only runs when explicitly enabled with --migrateFormControls flag
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.