Add transform scope to social link variations #56900
Closed
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.
What?
This PR enables the block variation transformation API for the social-link block. The API is available since #50139, but has not been enabled yet for all blocks who have variations.
Why?
This issue was already brought up here: #46726. When changing the old twitter icon to the new "x" icon yesterday this function would have saved me some time.
How?
I simply extended the social-link block's variations' scope to
transform
, this way enabling the new API for the block.Testing Instructions
Testing Instructions for Keyboard
You can do the same by keyboard.
Screenshots or screencast
Bildschirmaufnahme.2023-12-08.um.11.21.31.mov
Possible problems
The big number of variations for this block might look odd to some. I, personally, don't actually have a problem with how it looks.
It was already discussed in the PR #50139 (comment) that more than four items might look weird. I think there should be the possibility to enable an alternative UI for many items which shows them as a dropdown. This UI should be enabled automatically once a max number of items is exceeded (as suggested in the PR), or by configuration in the block's code.
A bigger problem could be A11y. Currently, you have to tab through all the block variations and can't skip the control. Does anyone think this is a showstopper? Does developing the alternative UI have priority before we can merge this PR? Or does the implementation of the variation transformation API already lead to better editor UX and the alternative UI can come afterwards?