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

Text for dropdown fields within legacy widgets in the Customizer is off centered #34076

Merged
merged 3 commits into from
Aug 19, 2021
Merged

Text for dropdown fields within legacy widgets in the Customizer is off centered #34076

merged 3 commits into from
Aug 19, 2021

Conversation

anton-vlasenko
Copy link
Contributor

@anton-vlasenko anton-vlasenko commented Aug 13, 2021

Description

When editing a legacy menu widget in the Customizer in Firefox, the text for dropdown menus is misaligned. However, it works correctly on the Widgets admin screen.
Fixes #33431.

How has this been tested?

  1. Add a menu to the site.
  2. Open the Widgets panel in the Customizer using the Firefox browser.
  3. Insert a legacy navigation widget.

Actual result

Observe the dropdown text is pulled out of the field.

Expected result

The text inside the dropdown is properly aligned.

Screenshots

Screenshot 2021-08-13 at 17 38 05
Screenshot 2021-08-13 at 17 37 31

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

…ender text correctly inside the select element in the legacy menu widget.
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Aug 13, 2021
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @anton-vlasenko! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@anton-vlasenko anton-vlasenko added this to the WordPress 5.8.1 milestone Aug 13, 2021
@anton-vlasenko anton-vlasenko added the [Type] Bug An existing feature does not function as intended label Aug 13, 2021
@anton-vlasenko anton-vlasenko changed the title [WIP] We need to specify the padding-top property because Firefox doesn't r… Text for dropdown fields within legacy widgets in the Customizer is off centered Aug 13, 2021
@anton-vlasenko anton-vlasenko added [Block] Legacy Widget Affects the Legacy Widget Block - used for displaying Classic Widgets [Feature] Widgets Customizer Ability to add and edit blocks in Customize → Widgets. and removed First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository labels Aug 13, 2021
@@ -67,6 +67,8 @@
line-height: 1;
min-height: 30px;
padding-left: $grid-unit-10;
padding-top: $grid-unit * 1.25;
padding-bottom: $grid-unit * 1.25;
Copy link
Member

Choose a reason for hiding this comment

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

Why 10px? Maybe we can do 8px ($grid-unit) too?

Copy link
Contributor Author

@anton-vlasenko anton-vlasenko Aug 16, 2021

Choose a reason for hiding this comment

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

Because that value (10px) is being used on the Widgets page.
In my opinion, we should use similar values for the same component.

Copy link
Member

Choose a reason for hiding this comment

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

Could you point me to the place it's used on the Widgets page? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's on Appearance -> Widgets page. Sorry if it wasn't clear.
Just add a new (legacy) Navigation Menu widget.
Screenshot 2021-08-17 at 9 52 33

Copy link
Member

Choose a reason for hiding this comment

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

Correct me if I'm wrong, but I think it's defined by the theme (twentytwentyone). You might see other values if switch to other themes.

Copy link
Contributor Author

@anton-vlasenko anton-vlasenko Aug 17, 2021

Choose a reason for hiding this comment

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

Yep, it is. 8px vs 10px is not such a big difference.
I think we can use 8px as well.
Fixed in 5f52f34

Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kevin940726 kevin940726 merged commit e1eb020 into WordPress:trunk Aug 19, 2021
@noisysocks
Copy link
Member

Nice job, congrats on the first PR 👏

desrosj pushed a commit that referenced this pull request Aug 30, 2021
@desrosj desrosj mentioned this pull request Aug 30, 2021
7 tasks
desrosj added a commit that referenced this pull request Sep 1, 2021
* Fix API docs generation (#33384)

* Docs: use markdown headings instead of links for API declarations (#33381)

* Docs: Run Prettier after updating API in documentation (#33498)

(cherry picked from commit 626f233)

* Use tabs instead of spaces in block transform doc example (#33549)

(cherry picked from commit 8afca1e)

* Fix metabox reordering (#30617).

* Block editor: don't render layout and duotone styles in between blocks (#32083)

* Widgets: Allow HTML tags in description (#33814)

* Widgets: Allow HTML tags in description

* Use `dangerouslySetInnerHTML`

Avoid `<div />` inside the `<p />` tag

* Describe by dangerouslySetInnerHTML is used

* Use safeHTML

* Update comment

* Editor: Set 'hide_empty' for the most used terms query (#33457)

Don't include terms that aren't assigned to any posts as "most used" terms.

* Update widget editor help links to point to the new support article (#33482)

* If select-all fires in .editor-post-title__input, end the process.. (#33621)

* Writing flow: select all: remove early return for post title (#33699)

* Call onChangeSectionExpanded conditionally (#33618)

* FontSizePicker: Use number values when the initial value is a number (#33679)

* FontSizePicker: Don't use units if the value is a number
* Add unit tests
* Disable units when we have number values

* Fix justification for button block when selected (#33739)

* Remove margin setting, auto right conflict with justify buttons

* Per review, add little margin back

* Add error boundaries to widget screens (#33771)

* Add error boundary to edit widgets screen

* Add error boundary to customize widgets

* Refactor sidebar controls provider to application level so that its state is not lost when re-initializing

* Revert "Refactor sidebar controls provider to application level so that its state is not lost when re-initializing"

This reverts commit 7d607ff.

* Remove rebootability from customize widgets

* Remove debug code

* Fix insertion point in Widgets editors (#33802)

* Default batch processor: Respect the batch endpoint's maxItems (#34280)

This updates the default batch processor to make multiple batch requests
if the number of requests to process exceeds the number of requests that
the batch endpoint can handle.

We determine the number of requests that the batch endpoint can handle
by making a preflight OPTIONS request to /batch/v1. By default it is 25
requests.

See https://make.wordpress.org/core/2020/11/20/rest-api-batch-framework-in-wordpress-5-6/.

* Fix button block focus trap after a URL has been added (#34314)

* Rework button block link UI to match RichText format implementation

* Refine some more, determine visibility by selection and url state

* Add e2e test

* Also focus rich text when unlinking using a keyboard shortcut

* Text for dropdown fields within legacy widgets in the Customizer is off centered (#34076)

* Fix ESLint errors reported

* Regenerate autogenerated docs

* Update the `INSERTER_SEARCH_SELECTOR` path.

This is a partial cherry pick of 2356b2d in order to fix the performance tests.

Co-authored-by: André <[email protected]>
Co-authored-by: JuanMa <[email protected]>
Co-authored-by: Greg Ziółkowski <[email protected]>
Co-authored-by: Jeff Bowen <[email protected]>
Co-authored-by: Bruno Ribarić <[email protected]>
Co-authored-by: Ella van Durpe <[email protected]>
Co-authored-by: Petter Walbø Johnsgård <[email protected]>
Co-authored-by: George Mamadashvili <[email protected]>
Co-authored-by: Daniel Richards <[email protected]>
Co-authored-by: Hiroshi Urabe <[email protected]>
Co-authored-by: Kai Hao <[email protected]>
Co-authored-by: Marcus Kazmierczak <[email protected]>
Co-authored-by: Robert Anderson <[email protected]>
Co-authored-by: Anton Vlasenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Legacy Widget Affects the Legacy Widget Block - used for displaying Classic Widgets [Feature] Widgets Customizer Ability to add and edit blocks in Customize → Widgets. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text for dropdown fields within legacy widgets in the Customizer is off centered
3 participants