Fix Social Link Block: Passing class, id and other props to block main element in the editor
#73802
+34
−2
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?
The Social Link block in the editor works not like as it work in the front end. In the editor the block main element is the button and all classes, id and other attrs were added to the inner button but in the front end the
liis the main element.This create a inconsistency for styling block in the editor and also in the front end. Also, the custom class for block were not added to main block element and it create another inconsistency while styling and working with block.
This is important to add
id,class,data-typeanddata-blockto the blocks main element to make the styling easy for editor and front and also enable third-party plugins to easily work with block by finding the block easily by using it's clientId in the editor.I made changes to make the
litag the main element as same as how it is the front end.Before:

After:
