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

Allow removing bottom margin from SelectControl #41269

Merged

Conversation

noisysocks
Copy link
Member

@noisysocks noisysocks commented May 24, 2022

What?

Allows removing the bottom margin from SelectControl by specifying a __nextHasNoMarginBottom prop.

Why?

How?

BaseControl already has a __nextHasNoMarginBottom prop so the approach here is to just use that from SelectControl.

I am not adding a call to deprecate() as there are dozens of uses of SelectControl in Gutenberg that need to be adjusted first. This is also the approach that was taken with BaseControl.

Testing Instructions

  1. npm run storybook:dev
  2. Got to the SelectControl component.
  3. Check that toggling the __nextHasNoMarginBottom removes the bottom margin from the control's wrapper.

@noisysocks noisysocks added [Package] Components /packages/components CSS Styling Related to editor and front end styles, CSS-specific issues. labels May 24, 2022
Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

__nextHasNoMarginBottom={ false }

Screenshot 2022-05-24 at 14 33 08

__nextHasNoMarginBottom={ true }

Screenshot 2022-05-24 at 14 34 00

E2E failures don't seem related.

@noisysocks noisysocks merged commit 9ebb4fe into trunk May 24, 2022
@noisysocks noisysocks deleted the update/allow-removing-bottom-margin-from-select-control branch May 24, 2022 23:24
@github-actions github-actions bot added this to the Gutenberg 13.4 milestone May 24, 2022
@mirka mirka mentioned this pull request May 27, 2022
49 tasks
@mburridge mburridge added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 9, 2022
@mburridge
Copy link
Contributor

Added the Needs Dev Note label in case this needs a dev note for the 6.1 release.

@mirka
Copy link
Member

mirka commented Sep 12, 2022

We'll be officially deprecating the margins as a separate PR (centrally managed in #38730), at which time we'll post the Dev Note. Thanks!

@mirka mirka removed the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Package] Components /packages/components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants