Fix Social Link Block: Passing class, id and other props to block main element in the editor#73802
Fix Social Link Block: Passing class, id and other props to block main element in the editor#73802aliaghdam wants to merge 2 commits intoWordPress:trunkfrom
class, id and other props to block main element in the editor#73802Conversation
…correctly adding id and other attrs to block main element
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
1 similar comment
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
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. |
|
@ajitbohra and @fabiankaegy Please check this PR. |
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.Screenshots or screencast