For now, mw.notify() function does not take "autoHideSeconds" parameter, but notification implements this value. We should add this as option in defaults.
I would recommend against individual uses of mw.notify arbitrarily overriding the duration for notification bubbles. While I recognise the need for an option besides only "stay indefinitely until clicked" and "hide after 5 seconds", I'd rather this be a built-in option to avoid user confusion and set better expectations. I do not expect development of individual features that happen to include notifications to spend adequate time evaluating how long is "appropiate" and consistent with other interfaces. As such, we should provide better defaults so that developers don't have to eyeball this (since we'd make indeterministic guesses).
Previously autoHideSeconds was configurable through defaults, but not overridable per notification. This is by design and I'd like to restore that. Perhaps we can strike a compromise by allowing one of N presets to be used as timeout? E.g. 'short' for 5 seconds (default), and 'long' as 10 seconds (or 30?).