Page MenuHomePhabricator

update the design to fit the new window size when changing the window size
Closed, ResolvedPublic

Description

when we resize the browser window when the gallery is open, the gallery gets all broken until we refresh.

we should update the design to fit the new window size

QA Results - WordPress Dev

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
SBisson triaged this task as Medium priority.Feb 21 2024, 4:49 PM
SBisson moved this task from Backlog to Ready for Dev on the Inuka-Team (Kanban) board.
SBisson subscribed.

The gallery is indeed surprisingly broken when the window is resized. I think this is worth figuring out why and fixing the CSS a little.

the current implementation of the gallery slide gesture is too hacky and old, we should use CSS scroll snap that we learn from wiki-highlight

benefit is to simplify the code for gallery component

PR: https://github.com/wikimedia/wikipedia-preview/pull/187
Demo: https://wikimedia.github.io/wikipedia-preview/main/articles/english.html

Note:
to migrate component to use CSS scroll snap, we need to also consider how the zoom works and all the relevant events, i propose we create another ticket as the improvement and keep this PR as the temp solution for window resize

@hueitan In the first part there were no issues when resizing the browser when the gallery is open as seen in the videos. Can you check out the potential issue video that I have? Is that a normal behavior?

*UPDATE 3/12*- The potential issue is for Wordpress, not Wikipedia-Preview as mentioned here. Therefore as seen in the videos below, this task has been resolved and will be moved to design sign-off. @hueitan Thanks for all your work!

Status: ✅PASS
Environment: WordPress 6.4.3; Wikipedia Preview 1.12
OS: macOS Sonoma 14.2.1
Browser: Chrome 122, Firefox 123, Safari 17.3, Edge 122
Skins. N/A
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://dev-test.local/philadelphia-eagles-test/

✅AC1: https://phabricator.wikimedia.org/T287095

DesktopMobile/Tablet

❓Potential Issue- When selecting the second picture, it does not resize; instead, it advances to the next picture. This behavior differs from the first video. Is that fine still?

❓Potential Issue- When selecting the second picture, it does not resize; instead, it advances to the next picture. This behavior differs from the first video. Is that fine still?

This is the task for Wikipedia-Preview only, wordpress don't get the latest version yet.

❓Potential Issue- When selecting the second picture, it does not resize; instead, it advances to the next picture. This behavior differs from the first video. Is that fine still?

This is the task for Wikipedia-Preview only, wordpress don't get the latest version yet.

@hueitan Do you mean that this issue won't be there once we push a new release for the Wordpress plugin?