Commit graph

3 commits

Author SHA1 Message Date
Roan Kattouw dc48dfa022 Follow-up 07c5850b: unbreak "mark as read" menu item
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
2016-02-29 18:34:02 -08:00
Stephane Bisson 74879c39fb Truncate secondary link labels
Bug: T121822
Change-Id: I3e36a6cd4bc8da96879158e1d7b65fd3a1d582fb
2016-02-18 06:55:36 -05:00
Moriel Schottlender 3937857bd8 Convert secondary actions to their own class
This makes the actions more consistent, and also allows for separating
the two behaviors: The one where we need a link to a destination
(User page, diff, etc) and one where we have an action the code needs
to take care of ("Mark as read" or, in the future, volume control, etc)

Also, this allows for adding descriptions to the secondary links in
the dotdotdot menu.

It also fixes the bug where the links did not work.

Bug: T125160
Change-Id: I0ebf3fc62425f86e2e7f1e96b67f8dc34db83efb
2016-02-10 20:12:58 +00:00