Jump to content

Talk:OOUI/Using OOUI in MediaWiki

About this board

syntax: sentence not ended before starting next paragraph

5
Wladek92 (talkcontribs)
Jdforrester (WMF) (talkcontribs)

I think it was a very big mistake to mark this page up for translation. It's now impossible to edit it properly, and so this page will be (even more) abandoned. Please consider reverting your changes, and ask first in future.

Wladek92 (talkcontribs)

It was in translation before I came, so i trust people are responsible enough in what they do here. Now I can hardly accept to revert my changes since it represents days/weeks of work for the community and it cannot be blown out in three sentences. Wish a solution be adopted through consensus if my proposal is not satisfying -- Christian 🇫🇷 FR (talk) 19:05, 23 June 2023 (UTC)

Wladek92 (talkcontribs)
Matma Rex (talkcontribs)

@Wladek92 Yes, I think that's what I meant. Thanks for clarifying it.

@Jdforrester (WMF) I don't mind the translation. It's true that the markup is annoying, but sometimes we must suffer for greatness. The page hasn't really seen changes since 2019, because nothing has changed about how OOUI is used, so I don't think anyone will be annoyed in practice.

Reply to "syntax: sentence not ended before starting next paragraph"
Incnis Mrsi (talkcontribs)

I see an anomaly using examples of scripts from OOUI/Widgets/Buttons_and_Switches and others on this site – not all Wikimedia wikis appear to export the “OO.ui” thing to me. On some pages var btn = new OO.ui.ButtonWidget( { ⋯ } ); (in Scratchpad) runs fine, whereas others (including those from www.mediawiki.org) produce /* Exception: TypeError: OO.ui is undefined @Scratchpad/1:10:5 */

What is the difference?

Jdforrester (WMF) (talkcontribs)
Incnis Mrsi (talkcontribs)

Clear as for “the page happens to already be using OOUI”, but for “should run”… hey, am I looking like a person who can run anything on a production Wikimedia server? Let alone inside any of MediaWiki installations there. Scratchpad is a client-side tool for JavaScript, not a thing that generates HTML pages.

Jdforrester (WMF) (talkcontribs)

Oh, if you're writing a user script or gadget, you should read the gadget-specific instructions.

You'll want to wrap your code in:

mw.loader.using( 'oojs-ui-core' ).done( function () {
    // …
}
Reply to "OO.ui"
There are no older topics