-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove .components-item-group selector in edit-site components #67384
base: trunk
Are you sure you want to change the base?
Remove .components-item-group selector in edit-site components #67384
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @im3dabasia! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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. |
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.
Thanks for the PR!
There are no strict rules, but in the Gutenberg project, many components define CSS class names based on the following rules:
{package-name}-{component-name|file-name}
This component is in the edit-site
package and the file name is sidebar-navigation-screen-main
, so an example of one CSS class name would be edit-site-sidebar-navigation-screen-main
.
I don't think we should include the components used inside the component (in this case the ItemGroup
component) in the CSS class name.
What do you think about these points?
Yes, I saw how the class names are given in the project. I appreciate your example, and I think the name you suggested is appropriate for our context. I will make the changes right away. |
I have made the changes as suggested. Please check now, @t-hamano. Let me know if there are any further changes. |
Thanks for the update! Sorry, I missed an important point. The NavigationPages
TemplatesPatternsFor this screen, the Can I use a similar approach to add class names to these components? 🙏 |
…s and patterns in site editor
Fixes: #67369
What?
The
.components-item-group
selector has been replaced with a custom class (.edit-site-sidebar-navigation-screen__item-group
) that is scoped specifically to the sidebar navigation screen.This change does not affect other components outside of the sidebar navigation screen and will prevent unintended side effects if the
ItemGroup
component is used elsewhere in the future.Screenshot