-
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
Borders: Stabilize border block supports within block processing #66918
Merged
aaronrobertshaw
merged 8 commits into
trunk
from
update/stabilize-border-block-supports
Nov 20, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5c954b8
Use stabilized border support key
aaronrobertshaw 03f745d
Update stabilization approach to include border support
aaronrobertshaw 0377da1
Add unit tests for border support stabilization
aaronrobertshaw 50caa72
Update processBlockType tests for border stabilization
aaronrobertshaw 32df888
Fix global styles unit test
aaronrobertshaw 611de98
Make comments match between JS and PHP stabilizations
aaronrobertshaw f51cbc0
Add border support stabilization to existing backport log
aaronrobertshaw 9c32c4a
Try improving comments around importance of order
aaronrobertshaw 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
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7069 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/63401 | ||
* https://github.com/WordPress/gutenberg/pull/66918 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
This is not at all a blocker for now, but in the JS implementation we check for an object, so there'd never be a match against the
align
support, where an array is a valid value. Here, there theoretically could be a match.In practice it's not an issue because we don't have anything in
$experimental_to_stable_keys
that references supports where an array is a valid value, but just thought I'd mention it for the (very) unlikely event that at some distant point in the future we create an experimental support that does accept an array and then want to stabilize it further down the track. In that case, this condition might need to be updated.For now, though, I think it's fine to leave as-is. And please excuse my verbose comment here 😄
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.
Appreciate you raising this one. It has vaguely been on my radar but I was struggling to come up with a real-word case where it should happen.
The
align
support is stable, so wouldn't be in the$experimental_to_stable_keys
array, as you note. In that case, the guard clause at the beginning of the loop should just continue on, while using thealign
config as is.In the end, rather than waste too much time on coming up with hypotheticals to test, I decided to leave this until it was a problem.
Does that allay your concern at all? What else am I missing?
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 meant to also add that in recent times, there's been a decided effort to not land block supports at all unless they were stable. To prevent being in the situation like we are with some typography and border supports. That's been the case for entire block support features like
shadow
or subfeatures liketextColumns
andminHeight
.If the approach to not landing experimental block supports continues, there shouldn't be a scenario with a new experimental block support that needs stabilizing.
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.
Absolutely, what you've described captures my thinking, too, so you're not missing anything here!
That's where I was coming from, too. I was mostly thinking out loud, which is to say, flagging something that could theoretically be an issue at some distant point in the future. And it's at that distant point (if we're adding an experimental support that uses arrays) where I think it could be addressed, rather than now 🙂
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.
Indeed — my vote is to avoid using the
__experimental
prefix for things in the future, too 👍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.
👍 Having it on the record here will also flag it for our future selves or others, if it is really needed in the end.