Page MenuHomePhabricator

OOjs UI documentation: Improve docs for $overlay config parameter
Closed, ResolvedPublic

Description

DropdownWidget and several others have an $overlay config parameter, but the documentation about it is not optimal:

Event Timeline

matmarex triaged this task as Medium priority.

I think I'm going to write a section (or maybe separate page) about this on mediawiki.org, and just link to that from the code documentation. We have '$overlay' config options in a bunch of otherwise unrelated widgets, it would be silly to multiplicate the documentation and it would be silly to try to centralize it somewhere arbitrary.

For other situations (e.g. BookletLayout) I actually don't know what element to use. E.g. using $( 'body' ) has all sorts of strange behaviour, and I don't know whether these are bugs in OOjs UI, or whether I shouldn't even think about using the body as overlay element.

You might have been running into T130169 (recently fixed in ac505a282a1c3f233a82966c89ea8767c19739eb) or some similar problem. It would be helpful to know the specific strange behaviors. Using $( 'body' ) for overlay doesn't strike me as unreasonable.

I still have issues on beta.wmflabs, I will report them once I succeeded to reduce them to a sensible minimal example.

I documented this on https://www.mediawiki.org/wiki/OOjs_UI/Concepts#Overlays, which is now linked from the index and documentation for specific widgets (https://www.mediawiki.org/wiki/Special:WhatLinksHere/OOjs_UI/Concepts). Sorry, there really was no reason for this to take me this long to do.

I note there's still no documentation of the availability of the $overlay property on https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.Window.

Change 349885 had a related patch set uploaded (by Bartosz Dziewoński):
[oojs/ui@master] docs: Document Window#$overlay property

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

Thanks for the reminder, done.

Change 349885 merged by jenkins-bot:
[oojs/ui@master] docs: Document Window#$overlay property

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