NatLibFi / Skosmos-widget-wiki

1 stars 0 forks source link

Wikipedia page title is not shown #13

Open jarmosaarikko opened 1 year ago

jarmosaarikko commented 1 year ago

Problem: The current editorial decision has been not to show the title of the Wikipedia page with the widget view. The "title" is shown as a link at the top of the view as a text " in Wikipedia" example: https://finto.fi/yso-paikat/fi/page/p105024

In some cases this may be confusing as the Wikipedia page content starts immediately without a title. However, the title is visible in this mobile view: https://fi.wikipedia.org/api/rest_v1/page/mobile-html/Aasia <h1 data-id="0" class="pcs-edit-section-title"><span class="mw-page-title-main">Aasia</span></h1>

Suggestion: I suggest to add and show the Wikipedia page title as a <h1> heading also at the top of the Widget view of the Wikipedia page.

joelit commented 1 year ago

When this widget was written, there were fewer options for the choice of APIs for getting the wikipedia page content. This led to a lot of tweaking and preprocessing of the page content, including omitting the page title.

However - I don't think this is a reasonable approach anymore. I'd like the widget to be as compatible a) with the wikipedia content recieved through the API b) with the CSS framework used by Skosmos

Both a & b have changed since the writing of the widget, which has broken the widget slightly. My plan would be to use the wikipedia mobile html content you mentioned in the future - with nothing tweaked or removed.

These are of course a matter of taste, whether something should be tweaked or not (we could then have a new annual issue of "wikipedia page title is not shown" every even year and "wikipedia page title should be removed" every odd year :stuck_out_tongue: ) - I'm looking at the issue purely through the maintainability point of view - simply showing the content as it is recieved and trusting the wikipedia devs that they are sending something reasonable - would be the most robust approach. That being said, you and I both would go in the way of issue #12 for solving this particular case - which kind of makes this issue a duplicate/extra comment of that issue.