-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Block editor settings endpoint - Remove experimental namespace #33128
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Block editor settings endpoint - Remove experimental namespace
- Loading branch information
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked some stable endpoints in the gutenberg and wordpress-develop codebase and this is what I see:
wp/v2/pattern-directory,wp/v2/widget-types,wp/v2/widgets,wp/v2/block-directory,wp/v2/block-types,wp/v2/comments.Following the convention of existing endpoints, I wonder if this should be
wp/v2/block-editor-settingsinstead,wp/v2as namespace andblock-editor-settingsasrest_base.I'd welcome thoughts from people more experienced with the REST API naming schema, cc @TimothyBJacobs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestions @nosolosw!
From this comment it was suggested to use this naming instead of following the
wp/v2/convention, although it'd make things easier if it was using the same structure as the existing ones 😅There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the intention to use the different namespace is that
wp/v2is for modeling data, whereas this is purely a block editor API returning configuration values.There really is no plan to introduce a
wp/v3for numerous reasons, but putting this in a block editor namespace would allow for more freedom in introducing newer versions for breaking changes.This would match what we did for Site Health in having a
wp-site-health/v1namespace. I think the only inconsistency here would be that ideally theblock-directoryandpattern-directoryendpoints would've been part of this namespace as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks for the context. Let's do this then.
As a data point for the future, I'd like to provide the thought that it's difficult to reason about why/when something is data or a setting from the perspective of a consumer of the API. By looking at the reference documentation, I see endpoints that are arguably config: post types, block types, site settings to name a few.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Let's keep the
wp-site-health/v1namespace 👍Can we then proceed with removing the
__experimentalpart? Thanks!