Opened 5 years ago
Closed 5 years ago
#48780 closed defect (bug) (fixed)
Image Editor screen is scaled incorrectly
Reported by: | fierevere | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | 5.3 |
Component: | Media | Keywords: | has-screenshots has-patch commit fixed-major |
Focuses: | ui, css, administration | Cc: |
Description
With older WordPress we got just icon for tool buttons
Crop, Rotate Left, Rotate Right, Flip vertical, Flip horizontal, Undo, Redo
Everything looked right, with 100% browser view scale or other views.
See iedit-wp52.png
With WP 5.3 buttons have text, which can cause editor look weird, tool buttons sometimes cant fit on screen and are wrapped below the column of widgets (Scale,Crop,Thumbnail settings).
See iedit-eng-wp53-scale110.png
Problem appears with browser view scaled to 110% and more.
However, if localized text for buttons is longer than english original,
problem may appear even with 100% scale (default view!)
See iedit-rus-wp53.png
Attachments (15)
Change History (54)
#2
@
5 years ago
Setting the width
to auto
fixes the issue for 110%
scale but still, it breaks for 125%
.
#4
@
5 years ago
48780.1.patch
wraps one button to lower row, but still doesnt help if buttons have long text.
See: iedit-rus-patched-1.png
#5
@
5 years ago
The CSS portion of 47136.diff should take care of this issue, and the PHP part could fix the illogical markup order as well. If we're interested in only the CSS changes for a minor release (in case swapping column order might cause trouble with a plugin or something), I'll upload a patch here with that alone.
#6
@
5 years ago
Attachment 48780.2.diff
Same as above with 48780.1.patch
buttons with localized text are still wrapped below middle column
#9
@
5 years ago
@fierevere Did you run npm run build
command after applying a patch? The fix worked for me even with long words.
#10
@
5 years ago
I use WP 5.3 installation and patch utility (GNU diffutils) to apply patches.
# patch -p1 < 48780.3.patch patching file wp-admin/css/media.css
then clearing browser cache.
Tried with Otter (blink engine, chrome-like) default settings on FHD (1920x1080) screen, looks good, but breaks at 120% scale.
My default FireFox has layout.css.devPixelsPerPx set to 1.25, which makes it look better on FHD display with bigger text and elements, thats why i have new media editor broken by default.
#11
follow-up:
↓ 15
@
5 years ago
@fierevere thanks for your feedback.
Worth noting the layout breakage in the Image Editor isn't new in WordPress 5.3. It always happened, depending on the edited image size and the viewport width. Not something related to the new buttons text. The new buttons just make this more evident, as the layout breaks a bit before when narrowing the screen.
See screenshot attached below, taken on WordPress 5.2 with Firefox and a viewport width around 1150 pixels. See that the layout breaks also with the old buttons. Can be reproduced on all the previous versions.
As pointed out in a previous comment, a fix was explored on #47116 and then postponed to #47136 because at some point it was clear that the Image Editor page needs a substantial refactoring. This page is also one of the oldest ones in the WordPress admin and it shows its age.
Not personally opposed to a partial, quick, improvement in the next minor release but strictly speaking this isn't a regression that needs to be addressed in 5.3.1 as it always happened on all the previous WordPress versions. I'd recommend everyone to focus their effort on #47136 which requires more work and more substantial improvements. Also, since this issue is already tracked on #47136, this ticket should be considered a duplicate.
#12
@
5 years ago
- Keywords needs-patch removed
Regarding the approach used on this ticket patches, setting a width or a min-width would produce the opposite effect. The edited image would overlap the column on the right, making impossible to use the interface. See screenshot attached below, taken with 48780.3.patch applied.
As similar fix was already tried on #47116 and then reverted in [46331] because of the overlapping. I'm afraid this approach can't really solve the issue and I'd suggest again to focus on a major refactoring on #47136.
#13
@
5 years ago
@sathyapulse Thanks for trying another option.
While 48780.3.patch may cover more cases, it unfortunately introduces an overlap in the 2-column layout that was not there in previous versions at some screen sizes (at 100% zoom, about 1066-1150px wide, with an image wider than it is tall). In mine, I had set the entire column's min-width
specifically to 400 pixels because the image can be (only) as wide as that, so the floating column would drop down if there isn't enough space for all 400 pixels.
My patch (48780.2.diff) clearly does not correct the problem as I had thought it would, but it still might be good enough as a partial fix in a minor version. In my tests it keeps the image's column at the top, as it had been in 5.2, in the 2-column layout when the screen/window is about 1168-1348px+ wide (100% zoom). If you're interested in a temporary fix, I'd appreciate more testing to ensure my option does not make the layout worse than 5.3.0 in any case (various languages and zoom levels, 1-column and 2-column layouts, expanding the auto-folded side menu at narrower widths, etc.). Note: the first row of five buttons is allowed to wrap to the next line(s), and the Undo and Redo buttons are on a separate line in 5.3.
(I purposely responded here instead of #47136, intending to keep further discussion of a temporary patch here, separate from the ticket that would address a real fix.)
And until a better layout is provided in a future (major) version, I'd encourage people using the editor to consider switching to the 1-column layout under Screen Options.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
5 years ago
#15
in reply to:
↑ 11
@
5 years ago
- Milestone changed from 5.3.1 to 5.4
Hi,
Let's move this ticket to the next major release as it's not a regression from WP 5.3 (see Andrea’s quotes below - comment 11). Not closing it for the moment as it may be good to ensure to keep some visibility on this particular issue.
Thanks,
Jb
Worth noting the layout breakage in the Image Editor isn't new in WordPress 5.3. It always happened, depending on the edited image size and the viewport width. Not something related to the new buttons text. The new buttons just make this more evident, as the layout breaks a bit before when narrowing the screen.
See screenshot attached below, taken on WordPress 5.2 with Firefox and a viewport width around 1150 pixels. See that the layout breaks also with the old buttons. Can be reproduced on all the previous versions.
Not personally opposed to a partial, quick, improvement in the next minor release but strictly speaking this isn't a regression that needs to be addressed in 5.3.1 as it always happened on all the previous WordPress versions. I'd recommend everyone to focus their effort on #47136 which requires more work and more substantial improvements. Also, since this issue is already tracked on #47136, this ticket should be considered a duplicate.
#16
@
5 years ago
Well, it is a regression for anyone who has used the Image Editor prior to 5.3 with a screen size, language and/or zoom level where the floating layout started to break in this version.
Now the column also drops down (off screen) on my standard 1366x768 laptop screen, in English, at default zoom, with default 2-column layout. So the image to edit no longer displayed where I expected to see it, as if it had disappeared ("below the fold").
Switching to the 1-column layout would be better for now, but that requires both knowing that there is another option and knowing how to adjust it.
Maybe my patch isn't good enough, and it's probably too late for adequate testing before the first minor release (also note: this ticket has no owner). However, I actually think we should push for a small fix on this before the next major release.
This ticket was mentioned in Slack in #accessibility by sabernhardt. View the logs.
5 years ago
#19
@
5 years ago
- Keywords needs-patch added; has-patch needs-testing removed
Let's try to get this in 5.4 :)
Re: 48780.2.diff
- Please avoid to introduce one more media query breakpoint at 783px. This value isn't used anywhere in core. We should try to use existing breakpoints. I'd rather reverse the logic and set min-width / max-width by default, then reset them at a the breakpoint max-width 782px
- The bottom margin is changed to 20px. It's best to not introduce unrelated changes. If a change is worth it, then please mention in a comment in the ticket the reasons why.
- In my testing, with a large image and the 2-columns layout, the float drop happens anyways with a viewport width around 1160 pixels. This is more or less what always happened. Further improvements should preferably go in #47136 where a larger refactoring is being considered.
#20
@
5 years ago
@afercia Yes, thanks. The bottom padding change there is a remnant from when I tried putting the left column first, which would make it unnecessary here.
Also for the next patch:
The layout automatically changes from 2-column to 1-column at 850px currently. If we want to eliminate the float drop between there and about 1160, we could consider increasing that break point (1200px?) for each of the elements affected (including #wpbody-content #post-body.columns-2 #postbox-container-1
, #wpbody-content #poststuff #post-body
, and the .columns-prefs
screen option).
This ticket was mentioned in Slack in #accessibility by sabernhardt. View the logs.
5 years ago
#22
@
5 years ago
- Keywords has-patch needs-testing added; needs-patch removed
48780.4.diff simply sets the min-width
and max-width
within existing breakpoints (with no padding change) to fix where the layout started to break in version 5.3.
The 48780.adjusted-float-drop.diff option also enforces one-column layout from 850-1200 pixels wide (or zoom equivalent) for attachment editor screens. This would change the screen for any attachment type, though, not just images that need editing. It repurposes the style set that enforces one-column layout for the (classic) post editor, and it leaves the post editor's current breakpoint at 850. There still is a range around 770-870 where expanding the side navigation can push the main image editor column down, but my attempts to fix that situation clearly made it worse.
This ticket was mentioned in Slack in #core-media by sabernhardt. View the logs.
5 years ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
5 years ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
5 years ago
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
#28
@
5 years ago
Note: If the 48780.adjusted-float-drop.diff option is still being considered, it targets a .poststuff
class (instead of the #poststuff
ID that would be restored by reverting #46964).
#29
@
5 years ago
I don't know if I'm the best person to review the CSS portions here, but I tested 48780.adjusted-float-drop.diff and really like how much better usability is with a more narrow viewport.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
5 years ago
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
#33
@
5 years ago
- Keywords needs-refresh added
This patch needs a minor refresh to switch from .poststuff
to #poststuff
following [47410].
#35
@
5 years ago
Thanks much @sabernhardt!
Just tested the refresh, and works as expected. Happy to be a +1 here, or handle a commit if that's desired.
WordPress below 5.3 no text on buttons