When $adjustLength is false, truncation will only happen
when the string is longer than the limit + the length of
the ellipsis to avoid the case where the ellipsis make
the string longer than the original.
Bug: T121822
Change-Id: I731a3c38b96ede6c6510f64771be0b9662dcba43
Also added the force (-f) option to
bypass the confirmation. Very useful
when using the script in a loop.
Change-Id: I98c3e0408033903f8e2fb0afab773d4952a4e6d3
It's terrible that in groupbysection mode, you still have to pass
messageunreadfirst and alertunreadfirst separately, but at least
this way the unreadfirst feature is available at all in the
non-grouped mode.
Change-Id: Ifb0707be484bda8e33810c888bae1d008cac2d9f
API requests with notgroupbysection disabled but notsection set
to 'alert' would return foreign notification bundles for both
alerts and messages, separately.
The frontend always pasess notgroupbysection=1 in practice because
notmessageunreadfirst=1 doesn't work without it; but regardless of
that, the API module shouldn't return a foreign notification bundle
for messages when only alerts are requested.
Change-Id: I9fa6d1411a8c121591ce6dd75ee8052bcdcb478b
Using wiki names in the header is problematic because the messages
we were using weren't designed to be used in a sentence, only in headings.
This removes the wiki names from the sentence in the header, and
instead puts a comma-separated list (with "and") of wikis in the body.
The messages keep $3 and $4 for backwards compatibility, so translations
of the form "from Commons and 2 other wikis" will keep working.
Bug: T121936
Change-Id: Ideeba794e260b3c388fa29226b53197c050162ef
This whole class is a terrible hack, and we should instead implement
a proper facility for what we need in OOUI.
Bug: T128436
Change-Id: I8777a6e36d238dc13c9060b74b7a72c6933082f6
07c5850b changed the widget used for the "mark as read"
menu item from OO.ui.ButtonOptionWidget to mw.echo.ui.MenuItemWidget.
While this makes sense, it also broke its functionality, because
mw.echo.ui.MenuItemWidgets are unselectable so if you click them
the 'choose' event isn't emitted.
However, we also can't make these widgets selectable, because
that breaks the links inside these widgets (the containing MenuSelectWidget
intercepts mouse events and prevents default). So instead,
make mw.echo.ui.MenuItemWidgets only be unselectable if they are
links (have config.url set), so that both use cases work.
Bug: T128432
Change-Id: I8374e3ae61a005ec7d25c2eb95b1391cbb191d60
Use dir=auto instead of wrapping in <bdi>.
They have the same effect, except that the latter produces
strange-looking truncation behavior with LTR body text in an RTL
interface because text-overflow: ellipsis; is set on the <div>,
not on the <bdi> node.
Bug: T127407
Change-Id: Id58a70f5b88a10c827e61d9e16aae1a81938709a
* Transform the action bar to table layout even in non-bundle
notifications.
* Increase the padding on the side for consistency
Bug: T125909
Bug: T125969
Bug: T126686
Change-Id: I26ba5b7a21a1f36774749154d3f95d61254c5ce2
It wasn't meant to be there, and flow-mention doesn't have it either.
We also don't have any other notification types with
three prioritized secondary links.
Bug: T125949
Change-Id: Icbffa185b1116b1a6beb9bb3585339fdf7e82cdd
The approach here is to use $msg->escaped() to
remove all markup and then replace new lines
with a single space.
Bug: T128062
Change-Id: I1d5a6e57fbae9b6a441671beff1c60720b9445d5