Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 16 months ago

#56123 closed defect (bug) (fixed)

Plugin Update Message slightly moved out of place

Reported by: Presskopp Owned by: audrasjb
Priority: normal Milestone: 6.1
Component: Upgrade/Install Version: 5.0
Severity: minor Keywords: assigned-for-commit has-screenshots good-first-bug has-patch has-test-info commit
Cc: Focuses: ui, css, administration

Description

Is it only me or is the text shown a bit too low in the plugin update messages?

Attachments (3)

update-message.png (8.1 KB ) - added by Presskopp 4 years ago.
plugin-update-alignment.png (70.1 KB ) - added by sabernhardt 4 years ago.
icon is aligned to the bottom instead of top
56123.diff (383 bytes ) - added by eherman24 4 years ago.
Remove bottom vertical alignment from .wrap .notice p:before

Download all attachments as: .zip

Change History (13)

#1 @SergeyBiryukov
4 years ago

  • Component GeneralUpgrade/Install
  • Focuses ui css administration added
  • Keywords needs-patch added
  • Milestone Awaiting ReviewFuture Release

@sabernhardt
4 years ago

icon is aligned to the bottom instead of top

#2 follow-up: @sabernhardt
4 years ago

This seems to relate to the vertical alignment of the icon. Toggling vertical-align:bottom off so it falls back to top—within the browser—fixes it at some screen widths and has no effect at other widths (not changing at CSS breakpoints).

#3 in reply to: ↑ 2 @Presskopp
4 years ago

Replying to sabernhardt:

This seems to relate to the vertical alignment of the icon. Toggling vertical-align:bottom off so it falls back to top—within the browser—fixes it at some screen widths and has no effect at other widths (not changing at CSS breakpoints).

To me deleting the vertical-align:bottom looks like the solution for any screen size.

#4 @costdev
4 years ago

  • Keywords good-first-bug added

This looks like a good-first-bug candidate.

The file in question: src/wp-admin/css/common.css (Line ~1577)

vertical-align: bottom; should be removed from here and instead added with just the .import-php .updating-message:before selector, unless the icon is misaligned in that element too.

@eherman24
4 years ago

Remove bottom vertical alignment from .wrap .notice p:before

#5 @eherman24
4 years ago

  • Keywords has-patch added; needs-patch removed
  • Versiontrunk

I've added a patch here with the following changes, which seems to resolve the alignment issue at all browser widths.

Changes were made to src https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-admin/css/common.css#L1577 as outlined by @costdev

.wrap .notice p:before,
.import-php .updating-message:before {
	margin-right: 6px;
        vertical-align: bottom;
}

to

.wrap .notice p:before,
.import-php .updating-message:before {
	margin-right: 6px;
}

.import-php .updating-message:before {
	vertical-align: bottom;
}

#6 @costdev
4 years ago

  • Keywords has-testing-info commit added
  • Milestone Future Release6.1
  • Version trunk5.0

Test Report

Patch tested: 56123.diff

Steps to Reproduce/Test

  1. Install an old version of a plugin.
  2. Navigate to Appearance > Plugins.
  3. 🐞 The icon and text in the update notice are not aligned with each other.
  4. Apply 56123.diff.
  5. Run npm run build:dev.
  6. Navigate to Appearance > Plugins. Perform a hard refresh.
  7. 🎉 The icon and text in the update notice are aligned with each other.

Environment

  • Server: Apache (Linux)
  • WordPress: 6.1-alpha-53344-src
  • Browser: Chrome 103.0.0.0
  • OS: Windows 10
  • Theme: Twenty Twenty-Two
  • Language: LTR - English (US) and RTL - Arabic
  • Plugins: None activated.

Actual Results

  • 🐞 The icon and text are not aligned with each other.
  • 🎉 The icon and text are aligned with each other.
  • ✅ Issue resolved with patch.

Notes

  • This appears to have existed since the update notices were added in 5.0. Changing Version to 5.0.
  • I attempted to check if .import-php .updating-message::before had the same issue, but can't seem to find any core reference to import-php except in the CSS file mentioned in this ticket.
  • Marking for commit consideration.

#7 @costdev
4 years ago

Nice work @eherman24! The patch tested well for me.

#8 @audrasjb
4 years ago

  • Keywords assigned-for-commit added
  • Owner set to audrasjb
  • Status newaccepted

Alright, self-assigning for commit.

#9 @audrasjb
4 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 53717:

Upgrade/Install: Improve plugin update icon alignment.

This changeset improves the vertical alignment of the plugin update button in the Plugins screen.

Props Presskopp, sabernhardt, costdev, eherman24.
Fixes #56123.

#10 @wordpressdotorg
16 months ago

  • Keywords has-test-info added; has-testing-info removed
Note: See TracTickets for help on using tickets.