W-21017394 feat: add sf flexipage generate command#833
Open
inba-ganapathy wants to merge 6 commits intosalesforcecli:mainfrom
Open
W-21017394 feat: add sf flexipage generate command#833inba-ganapathy wants to merge 6 commits intosalesforcecli:mainfrom
inba-ganapathy wants to merge 6 commits intosalesforcecli:mainfrom
Conversation
Add CLI command to generate FlexiPage metadata with flags: - --name: FlexiPage name (required) - --template: RecordPage, AppPage, or HomePage (required) - --entity-name: SObject API name (required for RecordPage) - --primary-field: Primary field for dynamic highlights - --secondary-fields: Secondary fields for highlights - --detail-fields: Fields for Details tab field section
Contributor
jshackell-sfdc
left a comment
There was a problem hiding this comment.
See my suggestions, mostly for the --help messages, but also a suggestion to change one of your flag name.
FYI @iowillhoit .
- Rename --entity-name to --sobject for CLI consistency - Improve command summary and description messaging - Fix custom field __c formatting in examples - Consolidate flag summaries and descriptions - Remove redundant flag descriptions
c016f9c to
f947bb0
Compare
- Mark command as beta for future flexibility - Add validation for max 11 secondary fields - Add tests for beta state and secondary fields limit
… formatting - Add custom validation to ensure primary-field, secondary-fields, and detail-fields flags can only be used with --template RecordPage - Remove dependsOn since it only checks flag presence, not value - Fix __c formatting in examples (was showing as **c or \_\_c) - Add flexipage topic to oclif config in package.json - Consolidate flag descriptions into summaries for cleaner --help output
Verify that --primary-field, --secondary-fields, and --detail-fields throw an error when used with non-RecordPage templates (AppPage, HomePage).
| public static readonly summary = messages.getMessage('summary'); | ||
| public static readonly description = messages.getMessage('description'); | ||
| public static readonly examples = messages.getMessages('examples'); | ||
| public static readonly aliases = ['force:flexipage:create']; |
There was a problem hiding this comment.
I don't think we need aliases for this, since this has never existed before. We can remove this and line 22
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.
@W-21017394@
Summary
sf flexipage generateCLI command to create FlexiPage metadata--name,--template(RecordPage|AppPage|HomePage)--entity-nameand supports--primary-field,--secondary-fields,--detail-fieldsTest Plan