gnosygnu / xowa

xowa offline wiki application
Other
375 stars 41 forks source link

Remove use of id=toctitle #150

Closed Krinkle closed 7 years ago

Krinkle commented 7 years ago

This was for internal use in MediaWiki and deprecated in favour of class=toctitle since https://github.com/wikimedia/mediawiki/commit/1bf5a652.

Any HTML or CSS consumed from Wikipedia after April 2017 will already have both class and ID in both the HTML and the CSS.

The ID will be removed in MediaWiki from the HTML and from CSS in I43cfffdb0807e8 / https://gerrit.wikimedia.org/r/357770 - probably to be deployed next week.

I still see several uses in this search that do not support the class yet. https://github.com/wikimedia/xowa/search?q=toctitle

They appear to be used in the creation of an HTML string. I don't know how these are used exactly in the final application, but if the application uses the live stylesheets from Wikipedia, then soon the table of contents may be styled incompletely or incorrectly as the live stylesheets will now only target class=toctitle, and no longer to id=toctitle as well.

gnosygnu commented 7 years ago

Hi! Thanks for the detailed report!

Yup, your deductions are correct. XOWA does build the HTML with an id=toctitle. Of the 4 results returned in your search, two are for unit tests. The other two will need to be changed:

I'm planning a minor release in the next two weeks after I fix a few issues with the 2017-06 English Wikipedia dump. I'll include the new class=toctitle then. Let me know if you need a version earlier, and I can upload something to my google drive

but if the application uses the live stylesheets from Wikipedia

Yes, XOWA does use the live stylesheet from Wikipedia. If you're interested, the process is as follows:

Thanks again for the report! If it weren't for it, it would've come up as a nasty surprise sometime in the next few weeks!

gnosygnu commented 7 years ago

Tonight's release (v4.5.7.1706) now includes class=toctitle . As such, I'm marking this issue closed.

Thanks again for the report.