Page MenuHomePhabricator

Span node title attribute not (always?) rendered properly in mobile
Closed, InvalidPublic

Description

At https://ru.wikipedia.org/wiki/%D0%92%D0%B7%D1%80%D1%8B%D0%B2_%D0%BD%D0%B5%D1%84%D1%82%D1%8F%D0%BD%D0%BE%D0%B9_%D0%BF%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D1%8B_Deepwater_Horizon

We have the wiki code:

{{Comment|5 миллионов [[Баррель (американский нефтяной)|баррелей]]|795 000 кубических метров}}

Which renders:

<span class="ts-comment-commentedText" title="795 000 кубических метров">5 миллионов <a href="/wiki/%D0%91%D0%B0%D1%80%D1%80%D0%B5%D0%BB%D1%8C_(%D0%B0%D0%BC%D0%B5%D1%80%D0%B8%D0%BA%D0%B0%D0%BD%D1%81%D0%BA%D0%B8%D0%B9_%D0%BD%D0%B5%D1%84%D1%82%D1%8F%D0%BD%D0%BE%D0%B9)" title="Баррель (американский нефтяной)">баррелей</a></span>

span node as a proper title attribute.

Desktop Parsoid render does it right as well:
https://ru.wikipedia.org/api/rest_v1/page/html/%D0%92%D0%B7%D1%80%D1%8B%D0%B2_%D0%BD%D0%B5%D1%84%D1%82%D1%8F%D0%BD%D0%BE%D0%B9_%D0%BF%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D1%8B_Deepwater_Horizon

But Parsoid Mobile does not:
https://ru.wikipedia.org/api/rest_v1/page/mobile-sections-lead/%D0%92%D0%B7%D1%80%D1%8B%D0%B2_%D0%BD%D0%B5%D1%84%D1%82%D1%8F%D0%BD%D0%BE%D0%B9_%D0%BF%D0%BB%D0%B0%D1%82%D1%84%D0%BE%D1%80%D0%BC%D1%8B_Deepwater_Horizon

which gives something like:

<span class="ts-comment-commentedText">5 миллионов <a href="/wiki/Баррель_(американский_нефтяной)" title="Баррель (американский нефтяной)">баррелей</a></span>

The title attribute has disappeared and it should not IMO.

Maybe this is a feature, but then class="ts-comment-commentedText" should be removed as well.

Report first at https://github.com/openzim/mwoffliner/issues/1132

Event Timeline

Desktop Parsoid render does it right as well:
...
But Parsoid Mobile does not:

Parsoid itself only produces what you're referring to as the desktop render. The mobile endpoints are built on top of that, through various transforms, by the Mobile-Content-Service and Page Content Service.

@Kelson As per docs for this template the tip should not be rendered on the mobile app. And it actually doesn't - see the shot. Not sure whether we need to do extra actions here.

comment-template.jpg (1×647 px, 132 KB)

@vadim-kovalenko Thx for coming back with this insightfull comment. Does that mean that the Wikipedians behind this template have chosen to do so... or does that mean this is not their choice (it's a feature/bug in Mediawiki) and they complain as well about it?

@Kelson I've just asked a question about this in the template discussion thread. I'll keep you posted if get any updates.

@JMcLeod_WMF I've just checked the conversation, I haven't gotten any response to my question about this issue for now.

Jgiannelos subscribed.

It looks like the mobile-html response works properly according to the template docs and there is some inactivity on the conversation. Closing this one for now, feel free to reopen when we have more clarity for the issue.