Instead of using $group->insert(....)->addComponent() we can define
our own small SingleMenuEntry that defines a standard menu entry with
a label and one icon. The icon name and tracking code by default will
be the same as the menu entry name.
Changes:
- introduced SingleMenuEntry class
- updated Definitions class to use new entry instead of using old
MenuEntry class
- changed the Contributions meny entry name to match icon/tracking
This should simplify code a bit, thanks to this approach we should be
able to remove the Definitions class in some future and keep building
MenuElements in the builders.
Bug: T221792
Change-Id: I1f145e8cd173b72b01a145b2dba3704593f17ab7
The Group shouldn't depend upon concrete MenuEntry definition.
Different Menus can present different MenuElements. Code should
allow easy extensions, not limit only to single MenuEntry
definition.
Changes:
- introduced IMenuEntry interface
- MenuEntry implements IMenuEntry
- removed isJSOnly from logic as it's related only to one menu
element (Watchstar) and Group shouldn't be aware of some special
handling for some elements. The IMenuEntry shouldn't define this
method
- getName, getComponents, getCSSClasses should have defined return
types
Bug: 1221792
Change-Id: I0646df734e869c26bfa8c3a772200e8258a8acce
The check to verify uniqness of the MenuEntry $name existed
twice, in insert() and in insideAfter() methods. To respect
"do not repeat" yourself rule, we should keep this check
in one place only.
Bug: T221792
Change-Id: I973b0427623e579f97ae47f7c80dc2a9db2fcca7
Additional changes to tests:
* pageExists uses brower.call to avoid token error in talk
* use a before rather than beforeEach for creating articles
to avoid an unnecessary API action
Bug: T222517
Change-Id: I44cda7d62e5e4e58ed38b15ae13fdb0c8dc2e900
This means if new content is added to the page, it
will be connected to the media viewer code.
Depends-On: I79caa6d1b83ec2a618ca703607165197add4e100
Change-Id: I9936ee1decaa5de6677bc33ebe726ff6253d6ac5
MinervaNeue doesn't show any sidebar, only MainMenu and
PagetActions menu. There is no need to call original
Skin::buildSidebar() as the result is not used.
Change-Id: Iec60491d4b45b7b6f6ba23525a4f6af08903bb31
This SkinStyle file adds paranthases around the (diff|hist) links
and username(talk|contrib|block) links on special pages.
Bug: T222394
Change-Id: Ic291cb795ccad556a5049d970c0282b2d4c65a11
Looks like Title::newFromText() can return null instead
of Title object. Code has to support this edge case.
Bug: T222407
Change-Id: Ie34a26303df8e27247e51ddc2b13e3c2fa59a435
This selector was changed in I9ded45388dbcb511cc4bf56859f54318e3e168d9
but the tests are still looking for the old selector which makes the
following tests fail:
- Reference popup drawer.Opening and closing the reference drawer
- Reference popup drawer.Opening a nested reference
Bug: T222475
Change-Id: I4ab8a21146dfd8204151659ff587e77bcadcaf9d
The Commmunity Portal main menu element should be handled
same way as Skin::buildSideBar() does:
- it should ignore "-" -> this is how editors disable the
link
- it should use inContentLanguage() to properly support
different languages
Bug: T216152
Change-Id: I41b2373fd1b55d9d4beaba60eeb362e6188d24de
When advanced mobile contributions is enabled and the overflow menu is
shown:
- The initial state should have no transition. This prevents the menu
from flickering initially. Move the transition to the checked state
only.
- The icons should be available for server-side rendered HTML without
JavaScript. Add wikimedia.ui to the SSR modules.
Bug: T216418#5129152
Change-Id: I3b91f6cdefd4b727c2fb512272d8c4282af632bf
In anticipation of the changes in
I30aa36a0cb89988d1bad8256e5d3f737380bc0a7 which removes the
.wikibase-editor selector from the TalkSectionAddOverlay textarea, the
browser tests need to be changed to a more accomodating selector.
Instead of finding the textarea from the .wikitext-editor selector, the
tests now look for the textarea in the overlay (there is only one). This
also makes it more in line with its method for finding the input element
(.talk-overlay input) as well.
Bug: T221624
Change-Id: Ifbba23e9aee6f68033efc3279ed737d519a7bf41
AMC mode is already determined prior to the `trackSubscribe` callback
executing so we can set the sampling rate outside
the callback as well.
Hopefully, this improves readability. If not, I'm happy to abandon this
patch.
Change-Id: Ic1386c0e31ae7fbdd52f18d3b881ec6a5fb5a67c
Amending name to be equal to current CSS class naming scheme,
even if it's not perfect, for simpler maintainability.
Change-Id: Ie1f0dc26dceb92be650d827d63a62092912ac504