Page MenuHomePhabricator

In the news card needs updating for bswiki
Closed, ResolvedPublicBUG REPORT

Description

Since we changed the way "In the News" is formatted on bs.wiki, the mobile card broke a bit.

Here's what it looks like right now:

feed1.png (1×720 px, 275 KB)

... and when you tap on a card:

feed2.png (1×720 px, 101 KB)

There shouldn't be a link to the date (i.e. 1. februar in the second image), and I'm pretty sure there shouldn't be a link to the date when you're scrolling through the items in the card; i.e. it should be rendered as:

"KK Spars Realway u finalu košarkaškog Kupa Mirza Delibašić pobjedio KK Igokeu i osvojio svoj prvi trofej."
"Evropska svemirska agencija lansirala Solar Orbiter koji će detaljno proučavati heliosferu Sunca, a prvi put će biti snimljeni i Sunčevi polovi."

... instead of ...

"16. februar – KK Spars Realway u finalu košarkaškog Kupa Mirza Delibašić pobjedio KK Igokeu i osvojio svoj prvi trofej."
"10. februar – Evropska svemirska agencija lansirala Solar Orbiter koji će detaljno proučavati heliosferu Sunca, a prvi put će biti snimljeni i Sunčevi polovi."

Event Timeline

Note: It might be a good idea to strip (''na slici'') as it's equvivalent to (pictured) on the English Wikipedia.

@Srdjan_m The new format on https://bs.wikipedia.org/api/rest_v1/page/html/%C5%A0ablon:Vijesti is harder to parse than before because the date and the news story are in the same DOM element.
If you really want to keep the date on the same line as the news story I would suggest to add a <span> element around the story.

Extra credit if you add a class of itn-story to it, like on this test page. Then the selector for this would be simpler and more stable.

E.g.:

* [[date]] – Some news story

becomes

* [[date]] – <span class="itn-story">Some news story</span>

or (if you want to add a new template for it)

* [[date]] – {{ItnStory|Some news story}}

@Srdjan_m That looks much better. Thank you! I will need to update to code to use this.

Change 580975 had a related patch set uploaded (by BearND; owner: BearND):
[mediawiki/services/wikifeeds@master] Update Bosnian news parsing to use .itn-story

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

Change 580975 merged by jenkins-bot:
[mediawiki/services/wikifeeds@master] Update Bosnian news parsing to use .itn-story

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

Already deployed. I think this was done on April 9 based on changes in deployment-charts.