Page MenuHomePhabricator

🚧 [MEX] Follow-up: Restore map interactivity after T429179 CSS fix
Closed, ResolvedPublic

Description

Parent task: T429179: [MEX] 🐛️ horizontal-scrolling for items with globe coordinates in RTL languages

The parent task was fixed with a CSS change in the Kartographer extension.
The CSS fix is valid for its scope (stops the horizontal scroll) but has a side effect:

  • globe-coordinate maps in the wbui2025 view are no longer interactive.
  • Pan and zoom no longer work as they did before the regression.

This task is to restore map interactivity without reintroducing the horizontal-scrolling bug.

Acceptance Criteria

  • Globe-coordinate maps in wbui2025 support pan and zoom again, on mobile width.
  • The zoom controls (+/-) are visible and clickable.
  • The T429179 horizontal-scrolling bug does not come back (page width stays fixed).
  • Manually verified on an RTL wiki (example: uselang=ar) and on a mobile viewport.

Event Timeline

Change #1339623 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Mahmoud-abdelsattar):

[mediawiki/extensions/Kartographer@master] mapframe: Let a caller keep the map interactive on small screens

https://gerrit.wikimedia.org/r/1339623

Change #1339624 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Mahmoud-abdelsattar):

[mediawiki/extensions/Wikibase@master] wbui2025: Keep the map interactive on small screens

https://gerrit.wikimedia.org/r/1339624

@Arian_Bozorg Might need a product decision regarding the maps interactivity on small screens.

@Arian_Bozorg, the thresholds Kartographer currently uses are:

  • The device width must be greater than 480px.
  • There is at least 200px room to move your finger left and right.

This decision was made in T137852: Experiment rendering a static map instead of an interactive map on mobile.

Options I see:

  • T137852 doesn't mention a specific number. We can probably refine and lower the threshold. I suggest to replace <= 480 with < 400 (twice the 200px from above). That will make maps interactive on many current phones.
  • Entirely disabling the feature on MEX pages honestly doesn't sound like a good idea, considering the arguments in T137852 and the patch's commit message. The feature exists for good reasons, and they apply equally on MEX.

That sounds good to me

Thanks so much

Change #1344273 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Reduce interactive→static map threshold from 480px to 400px

https://gerrit.wikimedia.org/r/1344273

@Arian_Bozorg I uploaded a suggestion, see https://gerrit.wikimedia.org/r/1344273.

Does this imply we should abandon the patches that disable the feature and always make maps interactive?

Change #1346418 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Fix interactive/static toggle not considering screen height

https://gerrit.wikimedia.org/r/1346418

Change #1339624 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/Wikibase@master] wbui2025: Keep the map interactive on small screens

Reason:

Partially solved via I46242f1. Forcing the map to always be interactive turned out not to be a good idea.

https://gerrit.wikimedia.org/r/1339624

Change #1339623 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/Kartographer@master] mapframe: Let a caller keep the map interactive on small screens

Reason:

Not needed any more.

https://gerrit.wikimedia.org/r/1339623

Change #1344273 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Reduce interactive→static map threshold from 480px to 375px

https://gerrit.wikimedia.org/r/1344273

Change #1346418 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Fix interactive/static toggle not considering screen height

https://gerrit.wikimedia.org/r/1346418

@mahmoud.abdelsattar.wmde, @AudreyPenven_WMDE

I can zoom in and out, and move inside the map. But the fullscreen button doesn't do anything!

(we could remove it here too, as we might in edit mode, if that is the pragmatic thing to do)