Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app-page-builder): make website settings view configurable #4145

Merged
merged 5 commits into from
May 23, 2024

Conversation

Pavel910
Copy link
Collaborator

@Pavel910 Pavel910 commented May 22, 2024

LOW IMPACT BREAKING CHANGE! The API has changed slightly, so this can be considered a breaking change. However, this feature was never documented, and from our own sources, there are only 1-2 projects that have extended website settings in the past. Migration instructions will be included with the release, and the migration will take only a minute or two. See a diff below to get an idea of the difference in the API.

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.

CleanShot 2024-05-22 at 18 21 56

CleanShot 2024-05-22 at 18 22 26

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. Individual Elements now require a name prop, which allows us to target individual elements and modify/remove them, or position before/after other elements.

CleanShot 2024-05-22 at 18 31 52

How Has This Been Tested?

Manually.

Documentation

TODO

@Pavel910 Pavel910 added this to the 5.40.0 milestone May 22, 2024
@Pavel910 Pavel910 requested a review from leopuleo May 22, 2024 16:26
@Pavel910 Pavel910 self-assigned this May 22, 2024
@Pavel910 Pavel910 merged commit c11112d into next May 23, 2024
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants