gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Standardize form elements padding

Open afercia opened this issue 1 year ago • 3 comments

Description

Splitting this out from https://github.com/WordPress/gutenberg/pull/57310

There's some pretty large inconsistency in the padding of the various input fields, select, etc. across the editor user interface. Specifically, the left and right padding seem largely inconsistent. Sometimes, the padding is different even for input fields that are adjacent in the same component, for example the 'Create pattern' modal dialog.

Ideally, also the height of the input fields should be the same everywhere but I do realize that in some cases there's the need to use smaller input fields, e.g. in the settings panel. However, it would be great to standardize the padding. I'd tend to think standardizing would help make the editor be perceived like a more polished and refined user interface.

Some examples in the screenshots below:

Screenshot 2023-12-27 at 10 09 29

Step-by-step reproduction instructions

  • Observe the inconsistent padding of the various input fields, select, etc. across hte UI.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

afercia avatar Dec 27 '23 10:12 afercia

Note: for 'padding' I mean the actual visually perceived spacing. In some cases, this spacing is not determined by the actual CSS padding value, as for the 'Categories' input field in the 'Create pattern' modal dialog, which is the `components form token field' component.

afercia avatar Dec 27 '23 10:12 afercia

One more place where padding inconsistency (and also sizes inconsistencies) is very evident is by comparing some block placeholders. For example:

  • The RSS block placeholder uses an InputControl component.
  • The other placeholders in the screenshot below (Embed and YouTube blocks) use a standard <input /> element, styled differently.
  • Also, the size of inputs and buttons are different.

It would be great to consider to prioritize this for WordPress 6.6 Cc @WordPress/gutenberg-design

Screenshot 2024-05-10 at 15 06 20

afercia avatar May 10 '24 13:05 afercia

One more place where padding inconsistency (and also sizes inconsistencies) is very evident is by comparing some block placeholders. For example:

This is tracked by #41961. I would like to progress the task so that we can ship to WP6.6.

t-hamano avatar May 10 '24 13:05 t-hamano