-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 margins from Notice component #54800
Remove margins from Notice component #54800
Conversation
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 👍
@jorgefilipecosta , thanks for the approval! There is one question that I would like to ask: since this change might impact the existing users of the Notice component, how will we release and communicate this change? e.g. Will this be in the Also, I'm not authorized to merge this PR. It says "The base branch restricts merging to authorized users." Could you help to merge this PR please? |
Also, I see we have some failed required checks here. I don't think they are related to my changes here. I want to re-run them but I don't see the re-run buttons. I think I may not have the permission to re-run the jobs. Could you also help with those please? |
Sorry this fell through the cracks. Can you try to rebase the branch to see if the test errors go with the latest trunk updates? |
@youknowriad , thanks for the suggestion. I merged the latest trunk branch into my branch. Now there is one required e2e test that is failing. How should we proceed? 🤔 |
I've restarted the failing e2e test to see whether it's an intermittent failure. On the other hand, it would be great to update the CHANGELOG of the components package to mention the change maybe as |
Hi @youknowriad ,
Thank you. It got passed.
Done in If everything is alright, could you or @jorgefilipecosta help to merge this PR (I am not authorized to merge PR)? |
cc @ciampo just in case. |
Thank you @ecgan for working on this , and @youknowriad and @jorgefilipecosta for reviewing! This change is definitely a good change — in general, to ensure good layout composition, components should not set any properties affecting their own size or margins. We've been always working on removing margins from control components, and we've usually adopted a more careful approach (ie. adding a transitional prop to make the change more gradual), but I don't think that this should cause much disruption. |
@ecgan , I think it would be great to have a small follow-up cleaning any related style overrides (that now are not necessary anymore) like the ones listed in #54800 (comment). We could look for |
@ciampo , thank you for the comments. 🙏 🙂
Could you share a bit more info or examples on how we can do that for this Notice case in this PR? I thought about being more careful and being backward compatible, but couldn't think of a good idea. Do you mean something like
That's a good idea. I don't actively work in this Gutenberg repo, and I will have to be AFK for some time soon, but I would be happy to contribute. I'll try to come up with something. 🙂 |
You can see this project as an example — the idea is to introduce a temporary prop, which will allow us to gradually transition to the new styles.
That would be great, thank you! |
@ciampo ,
Thanks for the link! From the link, I found the guidelines, which states:
... which is not being followed in this PR. 😅 I guess we will take your words in #54800 (comment) ("but I don't think that this should cause much disruption.") for it and move forward. If we want to stick with the above guideline, I can revert this PR, and come up with another PR with deprecation. It may be a good learning opportunity for me too. Just let me know if I should do this.
I have created issue #55279 as a follow up to clean up unneeded style overrides for |
@ecgan , let's move forward this time, and keep eyes open for any potential regression. In case anything comes up, we can always go with the plan that you suggested:
|
This is because margin from the Notice component has been removed in PR WordPress#54800.
What?
Closes issue #54741.
In this PR, we remove the margins from the
Notice
component, so that developers using the component does not need to manually override the margins.Here's a screenshot of the
Notice
components nested withinNoticeList
component, retrieved fromhttp://localhost:50240/?path=/story/components-notice--notice-list-subcomponent
after runningnpm run storybook:dev
:Why?
See issue #54741.
How?
By removing the margins in the Notice component CSS.
Testing Instructions
npm install
and thennpm run storybook:dev
Testing Instructions for Keyboard
Screenshots or screencast