-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Block Bindings: Allow label override when it is defined in client registration #66160
Block Bindings: Allow label override when it is defined in client registration #66160
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -3 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
Flaky tests detected in b19618b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11361922364
|
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.
LGTM
Having errors on local environment.
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.
Now it works with the last change. 😆
There was a conflict while trying to cherry-pick the commit to the wp/6.7 branch. Please resolve the conflict manually and create a PR to the wp/6.7 branch. PRs to wp/6.7 are similar to PRs to trunk, but you should base your PR on the wp/6.7 branch instead of trunk.
|
@cbravobernal Looks like this didn't apply cleanly. If you'd like it included in RC 1 then would you like to manually backport this by Monday morning UTC (as that's when I'll be cutting the packages for the release)? Much appreciated. |
…istration (#66160) * Change registration to override label * Change unit test * Compare label values * Keep server value if client is not defined * Add unit test to ensure server label persists Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org> Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
I've started a pull request to handle the manual cherry-pick: #66237 |
…istration (#66160) (#66237) * Change registration to override label * Change unit test * Compare label values * Keep server value if client is not defined * Add unit test to ensure server label persists Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org> Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
The manual cherry-pick has been merged. I'm changing the labels to reflect that. |
…istration (WordPress#66160) * Change registration to override label * Change unit test * Compare label values * Keep server value if client is not defined * Add unit test to ensure server label persists Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org> Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org>
What?
As discussed here, and reported in other places, there are some concerns about not registering a source when the label is both defined in the server and in the client.
In this pull request, I'm fixing the behavior by overriding the label with the value coming from the client. From the feedback received, this should be the expected behavior.
There are mainly two questions:
Why?
The current behavior is confusing for users.
How?
For the moment, I kept the warning but register the source anyway, with the client value prevailing. Happy to make any changes based on discussions.
Testing Instructions
I've updated the unit tests to reflect this. To test manually: