Make WordPress Core

Opened 10 months ago

Closed 5 months ago

#63029 closed defect (bug) (fixed)

Better align restore revision buttons on mobile devices

Reported by: yogeshbhutkar's profile yogeshbhutkar Owned by: joedolson's profile joedolson
Milestone: 6.8.2 Priority: normal
Severity: normal Version: 3.8
Component: Revisions Keywords: has-patch commit fixed-major
Focuses: ui, accessibility, css Cc:

Description

On mobile devices, the restore revision buttons in the revision comparison view appear too cramped, and they appear misaligned in normal view.

Additionally, due to the fixed height of their parent containers, these buttons shrink significantly when the available space is 330px or less, such as when comparing revisions of different versions. If the screen width decreases any further than 330px, the buttons can become unusable or disappear entirely.

Attachments (2)

bug.png (53.0 KB) - added by yogeshbhutkar 10 months ago.
Here, when the width becomes 330px, the button completely shrinks and becomes unusable.
trac.png (34.4 KB) - added by yogeshbhutkar 9 months ago.
reference for 30 revisions with 70% max-width

Download all attachments as: .zip

Change History (25)

@yogeshbhutkar
10 months ago

Here, when the width becomes 330px, the button completely shrinks and becomes unusable.

This ticket was mentioned in PR #8421 on WordPress/wordpress-develop by @yogeshbhutkar.


10 months ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/63029

## Screenshots

BeforeAfter
https://github.com/user-attachments/assets/b1c9b361-1345-42dc-8e3e-ca9ed2f94173https://github.com/user-attachments/assets/f34794b1-3764-435b-a703-e0855cb4b644
https://github.com/user-attachments/assets/504cb1d9-1c6d-4e8f-bfc5-08a0d8b592eahttps://github.com/user-attachments/assets/5d38c682-a628-4ed2-9c65-c3ee287ac623
https://github.com/user-attachments/assets/a2972bcf-2f14-4eb6-9968-22f8fcfa2d12https://github.com/user-attachments/assets/e895c670-a8dd-4f67-99a9-799b76ab3f3d

#2 @yogeshbhutkar
10 months ago

  • Keywords needs-design-feedback added

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


9 months ago

#4 @joedolson
9 months ago

  • Milestone changed from Awaiting Review to 6.9
  • Version changed from trunk to 3.8

The design change is good! I'm wondering if we could also increase the width of the slider in this mobile view? I'm not sure it's helpful to have the significant side padding.

I'd only wrap that into this patch if it's fairly easy to accomplish; if there are problems, that could be a separate ticket.

It would be very difficult to figure out when this was introduced; I'm going to set it as 3.8, the last major admin redesign.

#5 @yogeshbhutkar
9 months ago

  • Keywords needs-design-feedback removed

Thanks for the feedback, @joedolson! The slider expands with multiple revisions, but its max width is still capped at 70%:
https://github.com/WordPress/wordpress-develop/blob/3861c9092e38b43769818810b4ca36d380acbf47/src/wp-admin/css/revisions.css#L167-L168

With 30 revisions, the 70% max-width feels reasonable. Also, increasing it further could cause the tooltip to overflow.

The PR is now ready to be reviewed.

Last edited 9 months ago by yogeshbhutkar (previous) (diff)

@yogeshbhutkar
9 months ago

reference for 30 revisions with 70% max-width

#6 @yogeshbhutkar
9 months ago

I believe the slider behavior could be improved further. Notably, it doesn't support sliding on mobile devices, instead, it acts as a button where ticks must be tapped to move it. I confirmed this on a real device as well.

That said, it's best to address this separately in a dedicated ticket.

@yogeshbhutkar commented on PR #8421:


9 months ago
#7

Here's a screencast after the latest changes:

https://github.com/user-attachments/assets/f6ee92e5-2a1f-4db4-af21-14e56d26af92

P.S. This has been tested locally.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


9 months ago

#9 @joedolson
9 months ago

  • Owner set to joedolson
  • Status changed from new to accepted

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


7 months ago

#11 @joedolson
7 months ago

  • Keywords needs-testing added

@getsyash commented on PR #8421:


7 months ago
#12

### Test Report
Description
This report validates whether the indicated patch works as expected.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/63424/63424.2.patch

Environment
WordPress: 6.8.1
PHP: 8.2.28
Server: nginx/1.27.5
Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
Browser: Chrome 135.0.0.0
OS: Windows
Theme: Twenty Sixteen 3.5
MU Plugins: None activated
Plugins: Test Reports 1.2.0
Actual Results
✅ Issue resolved with patch.

Supplemental Artifacts
Before:
https://github.com/user-attachments/assets/a9b9da69-6070-434b-a04a-ea8987223c9f

After:
https://github.com/user-attachments/assets/bc509576-6b32-4725-8fd8-e3a967c08f80

#13 @joedolson
7 months ago

  • Keywords commit added; needs-testing removed

#14 @joedolson
7 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 60259:

Revisions: Improve revisions layout on mobile viewports.

On small screens, the restore revision button was mostly hidden due to excessive constraints on overflow height. Fix the overflow issue and ensure that restore revision buttons are always usable.

Props yogeshbhutkar, getsyash, joedolson.
Fixes #63029.

#15 @joedolson
7 months ago

  • Keywords fixed-major added

This ticket was mentioned in Slack in #core by sabernhardt. View the logs.


7 months ago

#17 @jorbin
7 months ago

  • Milestone changed from 6.9 to 6.8.2
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport consideration

#18 @corazondejaguar
6 months ago

Hey guys! I know this ticket is closed, but during Wordcamp we (@feedmymedia, @tibiii and me) came up with a better design arrangement (from the UX|UI design perspective) for the mobile version of this screen: See above. Should I open a new PR for this?

https://i.imgur.com/RkmGkFp.png

This ticket was mentioned in Slack in #core-test by corazondejaguar. View the logs.


6 months ago

#20 @SirLouen
6 months ago

@corazondejaguar sure, open a new ticket for this

#21 @joedolson
6 months ago

An alternate design is certainly a welcome possibility, but I agree with @SirLouen; it's best as a new ticket. This ticket was pretty tightly focused on resolving a specific bug with the existing design.

There is a lot of motivation to leave major design efforts in the revisions component for the admin redesign project, so that's something to be aware of before spending too much time on it.

There's no current schedule for an admin redesign, but Matt has specifically mentioned it as a goal for the 6.9 release, and that could make any design efforts in this area moot.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


6 months ago

#23 @audrasjb
5 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 60410:

Revisions: Improve revisions layout on mobile viewports.

On small screens, the restore revision button was mostly hidden due to excessive constraints on overflow height. Fix the overflow issue and ensure that restore revision buttons are always usable.

Reviewed by audrasjb.
Merges [60259] to the 6.8 branch.
Props yogeshbhutkar, getsyash, joedolson.
Fixes #63029.

Note: See TracTickets for help on using tickets.