from Wikichase implementation log
-
Create it.
-
I should make sure that link transitions work properly.
- Maybe I can use event handlers with props, similar to forms.
- I wonder if there are any benefits to inheriting from EventHandler.
- Maybe I should just use the existing one.
- React.EventCallback without giving up on any type - Qiita
- I wonder if there are any benefits to inheriting from EventHandler.
- It seems like I can use the
.replace
function (blu3mo).
- Maybe I can use event handlers with props, similar to forms.
-
I wanted to publish it on npm once it’s done, but it’s difficult to accurately support MediaWiki.
- I need to understand the specifications of MediaWiki.
- I don’t have much motivation to go beyond being able to display Wikipedia-like content.
- I need to understand the specifications of MediaWiki.
-
API:Parsing wikitext - MediaWiki
- There are various params (I noticed this thanks to Github Copilot).
-
Create useMediaWikiHTML().
-
Generalize Wikipedia to MediaWiki.
- Instead of inheritance, specialize it by nesting function components.
- Composition vs Inheritance – React
-
I want to use the CSS of MediaWiki.
- https://yamory.io/blog/about-gpl-license/
- If I incorporate it into the code, I need to license the derivative work under the GPL license as well.
- I can pull it from
https://ja.wikipedia.org/w/load.php?lang=ja&modules=ext.cite.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cjquery.makeCollapsible.styles%7Cmediawiki.page.gallery.styles%7Cskins.vector.styles.legacy%7Cwikibase.client.init&only=styles&skin=vector
.- Is this okay?
- I can pull it from
- mediawiki/resources/src at 130b9b05fcd7ee8830ebb55b01ed5c7a814042a5 · wikimedia/mediawiki · GitHub
- There is CSS here.
- Is the URL in 6213c0ce79e1130000943836 bundling these?
- The modules are: _
ext.cite.styles
ext.uls.interlanguage
ext.visualEditor.desktopArticleTarget.noscript
ext.wikimediaBadges
jquery.makeCollapsible.styles
mediawiki.page.gallery.styles
skins.vector.styles.legacy
wikibase.client.init
- The 5th and 6th lines are referencing [https://github.com/wikimedia/mediawiki/tree/130b9b05fcd7ee8830ebb55b01ed5c7a814042a5/resources/src](https://github.com/wikimedia/mediawiki/tree/130b9b05fcd7ee8830ebb55b01ed5c7a814042a5/resources/src).
- Is `wikibase.client.init` this?
- [Extension:Wikibase Client - MediaWiki](https://www.mediawiki.org/wiki/Extension:Wikibase_Client/ja)
- And is just `skins.vector.styles.legacy` enough?
- What are the other module's CSS for?
- If I notice that "Hey, this is different from Wikipedia," I can look it up.
- In the MediaWiki page, it says `skins.vector.icons,styles`.
- Just `skins.vector.styles` should be enough.
- I'm not sure, but it's probably better not to use the legacy version.
- So, where is the source?
- Let's find out what the Skin of [[MediaWiki]] is.
- Ah, there's a Skin called Vector.
- [https://www.mediawiki.org/wiki/Skin:Vector/en](https://www.mediawiki.org/wiki/Skin:Vector/en)
- > GNU General Public License 2.0 or later
- Does Vector CSS overlap with Wikipedia's common.css?
- [https://en.wikipedia.org/wiki/MediaWiki:Common.css](https://en.wikipedia.org/wiki/MediaWiki:Common.css)
- There are some minor differences depending on the language.
- For example, the size of the "citation needed" label is different.
- For now, I'll lazily load the ja.css file to avoid the hassle.
- I'll think about a proper way to load it later using webpack or something.
- Well, ignoring the detailed params, combining Vector and Wikipedia Common.css should make it look like Wikipedia.
- If I specify `site.styles` in the wikipedia.org module, I can get common.css and others.
- So, with `https://wikipedia.org/w/load.php?lang=ja&modules=skins.vector.styles|site.styles&only=styles`, I can get the desired CSS.
- However, the problem is the rights issue.
- The CSS itself seems to be under the GPL license.
- [https://www.gnu.org/licenses/gpl-faq.en.html](https://www.gnu.org/licenses/gpl-faq.en.html)
- > When we say “copy code,” we mean just that: you're taking a section of code from one source, with or without modification, and inserting it into your own program, thus forming a work based on the first section of code. “Use a library” means that you're not copying any source directly, but instead interacting with it through linking, importing, or other typical mechanisms that bind the sources together when you compile or run the code.
- Using a library is treated differently from copying and pasting.
- Oh, but derivative works also need to be released under the [[GPL]] license.- Or rather, does Wikipedia itself have rights to its content?
- Wikipedia:ウィキペディアを二次利用する - Wikipedia
- Is it under CC BY-SA 3.0?
- As long as you give credit, it’s safe.
- There may be different rules for images.
- Oh, really?
- Well, most images can be reused.
- But there’s no guarantee, right? Is it really okay?
- If Wikipedia includes images that have copyright issues, we may get caught up in it.