-
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[2] #67575
Conversation
… in edit-site components Applied horizontal margins to the following screens 1. Navigation 2. Pages 3. Templates 4. Patterns
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. |
Hi @t-hamano , If you have a moment, could you please review my PR? I would really appreciate your feedback. Thank you so much! |
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!
Sorry, maybe my explanation in #67384 was insufficient. Can you just do the following two things?
- Create a new
packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/style.scss
file and move the following styles into it:.edit-site-sidebar-navigation-screen-templates-browse { margin-left: -$grid-unit-20; margin-right: -$grid-unit-20; }
- Rearrange the import statements in the
packages/edit-site/src/style.scss
file. It's a good idea to group import statements with thesidebar-navigation-screen
prefix:@import "./components/sidebar-navigation-screen/style.scss"; @import "./components/sidebar-navigation-screen-details-footer/style.scss"; @import "./components/sidebar-navigation-screen-navigation-menu/style.scss"; @import "./components/sidebar-navigation-screen-patterns/style.scss"; @import "./components/sidebar-navigation-screen-main/style.scss"; @import "./components/sidebar-navigation-screen-templates-browse/style.scss";
Thank you @t-hamano , I’ve addressed both of the changes you requested. Please review the updated work when you have a moment.
There was one more file @import "./components/sidebar-navigation-screen-navigation-menus/style.scss"; Since it shares the same sidebar-navigation-screen prefix, I’ve moved it accordingly as well. Looking forward to your feedback! |
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.
LGTM! Thanks for working with it through to the end 👍
Note: Native E2E test failures are not related to this PR. See #67595
@im3dabasia @t-hamano looks like the ItemGroup in the first level of the navigation panel isn't aligned correctly and misses the negative margins. Can you please have a look at it? Screenshot from latest trunk: |
Hi @afercia, I checked the latest trunk, and the negative margins are applied correctly on my end. I’ve attached a screenshot for reference. |
@im3dabasia based on your screenshot, the negative margins are applied to the |
Yeah @afercia , I had the latest trunk version, I restarted the repo and then checked and yes what you claim holds true. The negative margins are not applied in the 'Design' menu. I'll work on this right away. |
Thanks for noticing. This issue is a regression introduced by #66851. Just adding the @im3dabasia I'll be happy to review your PR. |
It looks like the issue occurred due to this commit which was merged recently, where the Here's the relevant diff. Would it be helpful if I opened a new PR to reintroduce the className, or is there a different approach you would prefer to resolve this? |
Sure @t-hamano , I'll raise a new PR and cc you ASAP. |
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.
As requested in the earlier PR now closed (#67384), to apply horizontal negative margins in 4 more places (Reference)
Screenshots
Screenshots of the negatively applied margins.
Navigation Screen
Pages Screen
Templates Screen
Patterns Screen