feat(app-page-builder): make website settings view configurable #4145
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.
Changes
This PR upgrades the Page Builder Website Settings view to use the config API, like most of our apps. This makes it easy to add, modify, and remove fields and groups to Website Settings. This also allows us to decorate individual components and control their visibility through security permissions, or any other logic.
Visually, there are no changes, and the GraphQL API is the same. The changes are primarily on how you extend and modify this view.
Comparison with the Old API
In the following image, you can see how the API changed. The new API has a top-level
WebsiteSettingsConfig
component which you can use multiple times to mount configurations. IndividualElement
s now require aname
prop, which allows us to target individual elements and modify/remove them, or position before/after other elements.How Has This Been Tested?
Manually.
Documentation
TODO