Page MenuHomePhabricator

Enable DIV infoboxes to be shown in mobile-html
Closed, ResolvedPublic

Description

Background Information

A user on dewiki has reported this bug; I only have the iOS app and cannot reproduce the issue there, thus I assume it is an Android-only problem. Apparently, some infoboxes on dewiki are not only collapsed, but completely invisible in the app. While the infobox here is collapsed, the one here vanishes completely. The difference between the two is that the former is a table, the latter a table within a div (which is necessary as workaround for T18700). What happened?

UPDATE: Now I experience the same bug in the iOS app as well! And I discovered a trigger of this bug on enwiki: whenever infoboxes are used within the Stack begin / Stack end templates, they will not be visible in the apps anymore. See for example this article.

What

We remove infoboxes that are also div elements. The reasoning behind that is unknown, (fun fact) I traced it back to the origin and this rule exists since the first prototype commit and was never documented.

How

  • Investigate if the rule that removes DIV infoboxes elements from the mobile-html output can be changed and have no side-effect in the presentation

Acceptance Criteria

TBD - the investigation should be carried on first

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
JTannerWMF subscribed.

I'll take a look to see if this is happening on Android

JTannerWMF added a subscriber: Dbrant.

Thanks for filing this task @XanonymusX !

I replicated the bug here

Ring Ring Lied is showing the collapsed infobox

Screenshot_20210104-162856(1).png (2×1 px, 330 KB)
, whereas
Screenshot_20210104-162826(1).png (2×1 px, 331 KB)
Ring Ring is missing the infobox as XanonymusX mentioned.

I'm going to pull this onto the board for further investigation by our excellent developers.

@Dbrant , please feel free to move it if we should reconsider its priority.

Observation:
This doesn't seem to be happening on EN or FR

Screenshot_20210104-165719.png (2×1 px, 643 KB)

Screenshot_20210104-165744.png (2×1 px, 357 KB)

Screenshot_20210104-165651.png (2×1 px, 231 KB)

A question that does come to mind is how many articles are likely impacted by this workaround and the LOE to fix it for our users.

JTannerWMF added a subscriber: sdkim.

After checking in with @Dbrant and reviewing it on Mobile-HTML, it appears this is a bug for #product-infrastructure-team-backlog.

CC: @sdkim

Have updated it, now both Android and iOS app are affected!

We remove infoboxes that are also div elements. The reasoning behind that is unknown, (fun fact) I traced it back to the origin and this rule exists since the first prototype commit and was never documented.

We could investigate if it's fine to allow this rule to be removed for infoboxes, but for now, this is considered a Template edge case that should be fixed by the template editors. cc/ @ssastry

Well, there is a lot that has never been documented in MobileWeb as well … How should something like this be fixed by template editors? First of all, close to nobody uses the apps (especially among editors), so editors will not notice. Then, in the recommendations for mobile-friendly pages it says that such divs should use the infobox-container class. Would it still be removed in that case (as the class name contains infobox nonetheless)? Atm using that class doesn’t help though, as the current configuration of MoveLeadParagraph won’t recognise it anymore; and Mobile Web is more important than the apps. I recommend deleting that rule altogether.

@XanonymusX thanks for the information, these are very useful.

Well, there is a lot that has never been documented in MobileWeb as well … How should something like this be fixed by template editors? First of all, close to nobody uses the apps (especially among editors), so editors will not notice.

I agree with you, we should put some effort to document the best practices for template editors regarding the outputs of the mobile apps (iOS and Android) and find a proper venue to ventilate this information among editors and guidance on how to preview it.

Then, in the recommendations for mobile-friendly pages, it says that such divs should use the infobox-container class. Would it still be removed in that case (as the class name contains infobox nonetheless)? Atm using that class doesn’t help though, as the current configuration of MoveLeadParagraph won’t recognize it anymore; and Mobile Web is more important than the apps. I recommend deleting that rule altogether.

I believe a further investigation in favor of removing the rule is worth it here since infoboxes have a more consistent behavior through different wikis.

I just want to align expectations regarding the possible fix. The project is currently under maintenance and template-specific behaviors will be considered low priority.

MSantos renamed this task from Infoboxes in div not shown in Android app to Enable DIV infoboxes to be shown in mobile-html.Mar 31 2021, 12:41 PM
MSantos updated the task description. (Show Details)

div.infobox elements are now activated since this patch has been merged. I've checked div.infobox usage in other wiki's environment. Noted that only DiscussionTool, wikistats and MobileFrontend extensions use it in some cases that should not be reflected in the mobileapps. More details from the similar issue here - https://phabricator.wikimedia.org/T262581#7281577.

Collapse table (div) from the Dutch wiki works fine. -https://de.wikipedia.org/api/rest_v1/page/mobile-html/Ring_Ring?theme=black, because div.infobox are now available along with table.ifobox