Page MenuHomePhabricator

Syntax error in OOUI documentations
Closed, ResolvedPublic

Description

On https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.MenuLayout the example code provided contains a syntax error; if you try the live preview you will get this: SyntaxError: missing ) after argument list

Event Timeline

To fix it, you need to remove two semicolons. I have shown where it is below:

...
menuLayout.$menu.append(
    menuPanel.$element.append( '<b>Menu panel</b>', select.$element );   <=  THIS SEMICOLON
);
menuLayout.$content.append(
    contentPanel.$element.append(
        '<b>Content panel</b>',
        '<p>Note that the menu is positioned relative to the content panel: ' +
        'top, bottom, after, before.</p>'
     );   <=    THIS ONE TOO
);
...

Change 501126 had a related patch set uploaded (by Huji; owner: Huji):
[oojs/ui@master] Fix syntax error in OOUI documentations

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

Huji added a subscriber: Mahveotm.

It bothers me a lot, so I'm posting a fix.

Volker_E edited projects, added OOUI (OOUI-0.31.3); removed OOUI.

Change 501126 merged by jenkins-bot:
[oojs/ui@master] docs: Fix syntax errors in MenuLayout

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

Change 501429 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/core@master] Update OOUI to v0.31.3

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

Change 501429 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.31.3

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