Skip to content
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

Add __nextHasNoMarginBottom to BaseControl-based components #729

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

t-hamano
Copy link
Contributor

Closes #728

As presented in the following issue, BaseControl-based components are planned to have margin-free style as the default behavior:

WordPress/gutenberg#64408

For this future effort, and to suppress browser warnings, we need to add the __nextHasNoMarginBottom prop.

By adding __nextHasNoMarginBottom, the bottom margin of the BaseControl-based components will be removed, making the stacked layout a bit cramped. To prevent this, I increased the value of the spacing prop of the VStack component.

There should be very little visual change caused by this PR.


<Text variant="muted">
{ __(
help={ __(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is a small improvement. It prevents a large space from appearing between the input field and the help text.

Before After
image image

Copy link
Member

@madhusudhand madhusudhand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the changes and UI layout. It looks good to me! 🚢

Spacing between the input fields is even and much better now with added VStack 🎉

@t-hamano
Copy link
Contributor Author

@madhusudhand Thanks for the review!

@t-hamano t-hamano merged commit ffa9186 into trunk Sep 23, 2024
2 checks passed
@t-hamano t-hamano deleted the next-has-no-margin-bottom branch September 23, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add __nextHasNoMarginBottom to BaseControl-based components
2 participants