Commit graph

54 commits

Author SHA1 Message Date
Translation updater bot 85da15e8a4 Localisation updates from https://translatewiki.net.
Change-Id: Ib6c61d5d2b9624a107646fbfaab18fb3924660f3
2019-10-16 09:29:39 +02:00
jdlrobson bf8d325388 Use core watchstar code
Apply the mediawiki core watchstar to the
Minerva skin. Note, watchstars in search and other locations will
continue to be provided by the MobileFrontend library (see
follow up patch I7b748dc87089389400b0035c62a3b9a00c2e43f9)

Bug: T234970
Change-Id: I11bbe976412b50dba76a55f37887e4c9235d0be1
2019-10-15 15:33:25 -07:00
Translation updater bot 783e391bb9 Localisation updates from https://translatewiki.net.
Change-Id: Ia6dcefe907e6a953f2914cb0d36b2a08c99d8e33
2019-10-02 08:28:01 +02:00
Ammar 6a0192bf37 Remove "uploads" link from userpages
*This commit also removes it from tests and references

Bug: T233985
Change-Id: I0d7eb72a2663f1d1138afe09124a154ad0502498
2019-10-02 00:11:13 +01:00
Translation updater bot 715d8ec0fe Localisation updates from https://translatewiki.net.
Change-Id: I5ffe7409382f2436dbe2de9fdfeeab341116a9c0
2019-09-17 08:25:05 +02:00
Piotr Miazga add29651b0 Rename UserRights to UserGroups
The "User Rights" is called "User groups" on desktop. The Mobile site
should not provide it's onw naming but use the same names as desktop.

Bug: T230694
Depends-On: Ic9b7033e3f52f415ec8aec845a65a8452d0e5d8f
Change-Id: Iaf116a5cc54cc400451550d9fa958adbbccc35c5
2019-09-12 15:58:51 +02:00
Piotr Miazga 7b5e210ed8 Show warning when user tries to use enhanced RecentChanges view
Bug: T228516
Change-Id: I16e3d69b410f20a3f70f4bb213a279664613f725
2019-07-31 15:32:58 +00:00
Stephen Niedzielski 0a4f5b6126 [UI] [new] add user menu
Add new user menu. The changes required include:

- Break up AuthMenuEntry into reusable components. They're now simple,
  independent, static functions in AuthUtil that are easy to reason
  about and compose.

  There's lots of verbose code because of the builder and director
  patterns. That is, most of the code is for building the thing we
  actually want to build instead of just building it. It's easy to write
  but no fun to read--even simple configurations are extremely verbose
  expressions that must be threaded through the system.

  These builders are also single purpose and unlikely to be reusable
  unlike a URI builder, for example. As objects, they're not especially
  composable either.

- Similarly, break up Menu/DefaultBuilder into BuilderUtil and ban
  inheritance. Inheritance has not worked well on the frontend of
  MobileFrontend. I don't think it's going to work well here. E.g., I
  could have made changes to the base class' getPersonalTools() method
  such that the client passes a parameter for the advanced config or
  maybe I just override it in the subclass. In either case, I think it
  makes the whole hierarchy nuanced and harder to reason about for
  something that should be simple.

- Add ProfileMenuEntry and LogOutMenuEntry for the user menu.

- Rename insertLogInOutMenuItem() to insertAuthMenuItem() which matches
  the entry name, AuthMenuEntry.

- Extension:SandboxLink is needed to display the sandbox link in the
  user menu.

- Performance note: the toolbar is now processed in MinervaTemplate,
  which corresponds to removing the buildPersonalUrls() override.

- To mimic the design of main menu, the following steps would be
  necessary:

  1. Create a user/Default and user/Advanced user menu builder and also
     a user/IBuilder interface.
  2. Create a user/Director.
  3. Create a service entry for Minerva.Menu.UserDirector in
     ServiceWiring. The Director is actually powerless and doesn't get
     to make any decisions--the appropriate builder is passed in from
     ServiceWiring which checks the mode.
  4. Access the service in SkinMinerva to set a userMenuHTML data member
     on the Minerva QuickTemplate.
  5. In MinervaTemplate, access the userMenuHTML QuickTemplate member
     and do the usual song and dance of inflating a Mustache template.

  This patch does everything except add a service, which was agreed to
  be unnecessary, so that logic is now in SkinMinerva.

- Wrap the existing echo user notifications button and new user menu
  button in a nav element. This seems like a semantic improvement.

- The existing styling and logic for the search bar and search overlay
  are pretty messy and delicate. Changes made to that LESS endeavored to
  be surgical. There's lots of room for improvement in the toolbar but
  it's out of scope.

- Rename logout icon to logOut.

Bug: T214540
Change-Id: Ib517864fcf4e4d611e05525a6358ee6662fe4e05
2019-07-24 18:24:07 +00:00
Piotr Miazga dee1c197b9 On user pages, move language icon from Toolbar to Overflow menu
The Language icon is not useful on user pages as most probably there
are no translated user pages, thus there is no need to show all-time
disabled Language icon.

If overflow menu is available, don't show Language switcher icon in
toolbar, show it as first item in the overflow menu.

Bug: T224735
Follow-Up: I46d58758356e870c408a74b2c087a42d6ad0ddea
Change-Id: I05be9e6457257a1f2eb224ca9ec5808814bc9ed7
2019-07-16 17:51:11 +00:00
Nicholas Ray 162f8aa95c Add wikidata link to overflow menu
The director is now passed the array from `BaseTemplate::getToolbox()`
as all of the server rendered links we show in the main namespace/user
namespace overflow menus (including wikibase) will be in the toolbox
array except for the "Uploads" link in the User overflow menu which is
added in the UserNamespaceOverflowBuilder.

Bug: T222630
Change-Id: I280537c6b8b32036d68a5a004571bb5a41c2e703
2019-06-12 19:50:48 -06:00
Stephen Niedzielski 815f3386e3 Update: add secondary page actions submenu in AMC mode
When advanced mobile contributions mode is enabled and
`$wgMinervaOverflowInPageActions` is set, show a secondary overflow menu
on main namespace articles and user namespace pages. The menu content
varies for each namespace. The new submenu is *disabled* by default,
even when AMC is active. This feature should not be deployed until
instrumentation is available.

The secondary menu is rendered in PHP using the existing menu system
with some changes to the template. The checkbox hack is needed for no-
JavaScript keyboard navigation until :focus-within is supported. CSS
additions are documented in the source.

All client side toolbar execution occurs in Toolbar.js. Enhancements are
documented in the source.

Minor changes to the existing download button:
- Move download and edit button initialization to Toolbar.
- Update copy (not visible) from "Download" to "Download PDF".
- When the overflow menu is present, use the "hasText" / label style.

Wikimedia UI icons are copied from OOUI at d00a0ac and seem useful to
expose as HTTP URIs (not data URIs).

The overflow menu does not show for pages provided by the content proxy
since its entries depend on $tpl->data['nav_urls'] being populated.

Bug: T216418
Depends-On: I0781151a8232b6a7b52f79a34298afcecb8e4271
Change-Id: I4b50a0e519024a7ab91dae6ab40b23cf14a03861
2019-04-19 14:51:17 +00:00
Stephen Niedzielski 8d67044f3d Hygiene: remove unused string
Remove mobile-frontend-language-change which does not appear to be used
by Minerva or other repos.

Change-Id: I3a6e3bff921a46575b1c3cc7d914ace35a321b35
2019-02-05 11:30:29 -07:00
jdlrobson 97fd861a63 page issues is feature flagged
* New feature/skin option is added and value is read inside
the pageIssues setup code
* issues-group-a class is added to page on server side to remove
the flash of unstyled content
* issues-group-A class is dropped (it's not doing anything!)
* The minerva-issues flag will now accept any value to avoid confusion.
It is used to override the default setting of wgMinervaPageIssuesNewTreatment
A note has been added that this can be removed in future.

Bug: T206179
Change-Id: I3d98fd8f8e1adc818ea03589d2c8f68fe991e861
2018-11-20 12:41:41 -08:00
Bartosz Dziewoński b17d3f70da Remove 'skins.minerva.editor' module (moved to MobileFrontend)
Added in MobileFrontend in Iaaed72c32b9c4f4e15c320b79e29e9af3609069a.

(The module's name is included in cached page HTML, so to avoid
breaking them, 'skins.minerva.editor' must temporarily remain as an
alias for 'mobile.editor'. It is otherwise unused and can be removed
after caches expire on Wikimedia wikis.)

Depends-On: Iaaed72c32b9c4f4e15c320b79e29e9af3609069a
Bug: T198765
Change-Id: I52c4e0941dcf8f176e3ac32d8a1f72a0f8e1d6a6
2018-11-13 23:27:29 +01:00
Umherirrender f78c1aa4e6 Revert "Localisation updates from https://translatewiki.net."
Removed message key is still in en.json

This reverts commit 77ab4f66b4.

Change-Id: I7bef45396ecff24c3197a23b85bf93d81f2c3d49
2018-11-03 14:43:56 +00:00
Translation updater bot 77ab4f66b4 Localisation updates from https://translatewiki.net.
Change-Id: I53b71b49ee310f55aa78d4943de5ebdc90073c18
2018-11-03 10:39:58 +01:00
Bjornskjald 10978e5022
Add drawer when user is not logged in and anonymous edits are disabled
Bug: T206823
Change-Id: Ibd77ff0966f2d4b86e61f66caaafb94e85b02235
2018-11-02 23:01:22 +01:00
Piotr Miazga 5822ac58b4 Hygiene: improve texts for share button
We need to add an information that share feature is available
on supported browsers only.

Change-Id: I398165310cf11949d17f86acedf7193d4cad55b2
2018-10-12 22:56:01 +02:00
Piotr Miazga 51b6e8209b Add share icon as mobile web beta feature
Add a new beta feature - share icon. When user opts into beta
the share icon will be visible on supported devices (Android OS
and Chrome browser).

Bug: T181195
Change-Id: Ie4b9dd05eea9b63422bd174048d8b1251cb02bf4
2018-10-12 22:08:28 +02:00
Bartosz Dziewoński cada514ded Remove code related to no-anonymous-editing mode of MobileFrontend
All of this would only be used with the configuration setting
`$wgMFEditorOptions['anonymousEditing'] = false;`.

Removed features:
* Call-to-action popup in skins.minerva.editor (note that anonymous
  editors still get a CTA from MobileFrontend's EditorOverlay code)
* Pointer towards the edit button shown after registering via the CTA
  (entire skins.minerva.newusers module)

Bug: T205382
Change-Id: I66c7035f7a23581811dda87c911dea41d4a8e5da
2018-10-10 19:03:53 +00:00
Bartosz Dziewoński 1b61a14535 When browser doesn't support mobile editor, use fallback editor rather than none
Change-Id: I41bd554c3e979061dd8b1846a6412efb3284e7e9
2018-09-27 20:12:49 +00:00
Bartosz Dziewoński b6672a4f9f Less harsh failure mode when attempting to undo in mobile editor
The fancy mobile editor doesn't support undo, but we can just use the
fallback (no-JS) editor. The experience is not very friendly (e.g. due
to two-column diff), but it works.

Previously we showed an old-school alert() message and then loaded the
fancy editor as if it was a normal edit, ignoring the undo parameters.

The whole thing is rather hypothetical, since there are no links to undo
in the mobile interface. See T191706.

Bug: T191706
Change-Id: I5147ada9e85d9188f19ae898fdd411985d19182f
2018-09-25 22:01:36 +00:00
Bartosz Dziewoński f114f81d42 Remove fancy block info popups (move to MobileFrontend)
We only used them for registered users, but MobileFrontend's
EditorOverlay code can use them for anonymous users as well.

Remove code for looking up block details in wgMinervaUserBlockInfo,
now we only care whether the user is blocked at all to display a
different icon. MobileFrontend looks up the same information via API
already.

Remove unused message 'mobile-frontend-editor-blocked-info-loggedin',
it was only used by non-fancy popups, which were removed in favor of
the new ones in f51cf7db7b.

Bug: T193754
Bug: T198765
Depends-On: I80564c3e6e2d0f4d7eae754f206780fb4054f254
Change-Id: I64be24845b4fee76d6b4a8e481a218f2160fced6
2018-07-26 23:44:28 +02:00
jdlrobson dfc29032b5 Section issues overlay has different heading
Per https://phabricator.wikimedia.org/T197932#4417319
Note that given talk/category overlay does not use or
display section issues, to simplify things any section other
than 0 or all will use this heading.

Bug: T197932
Change-Id: I737fb07aaadcea7772d0b08f8b0652dcf2f4623d
2018-07-12 15:07:22 -07:00
jenkins-bot 6037e61bc9 Merge "Revert "Suppress display of wikitext editor on action=edit"" 2018-06-22 19:23:37 +00:00
Bartosz Dziewoński 645ffa46f8 Revert "Suppress display of wikitext editor on action=edit"
This reverts commit b8c0e4ff30.

Bug: T196915
Bug: T197834
Change-Id: I875854ab65f8b76929285938d2dbaa996caf3546
2018-06-22 19:11:13 +00:00
Translation updater bot 890c525878 Localisation updates from https://translatewiki.net.
Change-Id: Idc278b8ae7afea3768ead707718612908868964f
2018-06-20 22:56:18 +02:00
jenkins-bot d5cd6950b0 Merge "Suppress display of wikitext editor on action=edit" 2018-06-20 09:45:57 +00:00
jdlrobson a231525112 Mobile page issues - visual styling changes
Changes:
* Introduce Jan's beautifully documented $wgMinervaABSamplingRate
Set to 1 to A/B test 50% of the population
* Split out ambox template styles into a separate file referenced
by hacks.less
* Update cleanuptemplates setup script to consider two buckets

Test pages:
* Shqiponja_Partizane
* World_War_II_in_Albania
* Liberation_of_Tirana
* French_Consulate
* Abd_ar-Rahman_IV
* M109_howitzer
* Aimoin
* Transport_in_Brazil
* Transport_in_Cape_Verde

Bug: T191303
Change-Id: I8d11e655ccb847b7999e64dda57b225ad8b1c23a
2018-06-19 14:11:19 -07:00
David Lynch b8c0e4ff30 Suppress display of wikitext editor on action=edit
As I6c7e3443756fd72749964d1eda37e3d123b201b3 gives full-page editing on
action=edit, suppress the display of the original wikitext editor so there's
not a flash of a different editor before the overlay appears. Provide a
fallback so that in cases of no-JS the wikitext editor can still be reached.

Bug: T196915
Change-Id: I7dd3de984ead4d70e977e5607bb07606d341db54
2018-06-14 11:57:18 -05:00
Piotr Miazga 5a1a9c1b03 Add gender support to skin-minerva-blocked-drawer-creator-header
Bug: T194868
Change-Id: If0ab25dd349a8fc90a7818fc6af257199b5f7f99
2018-05-28 22:51:12 +02:00
David Barratt f51cf7db7b
Use a Drawer for Block Notices
When a user is blocked, the toast message provides insufficent information to
the user. To provide more information, as well as a better design, the block
message will be moved into a drawer.

Bug: T165535
Change-Id: Ib025db3a8a4d1fd7bd05b69f9b5326943288372f
Depends-On: I926918d0bd7f2176f188a2154dc5e99f6a8a7ad1
2018-05-08 13:20:00 -04:00
Translation updater bot de6cebe54d Localisation updates from https://translatewiki.net.
Change-Id: I68f58148c6140f16db5b543aedc323477b2ca0f7
2018-02-09 08:35:35 +01:00
jdlrobson 3047f3e0fa Merge remote-tracking branch 'gerrit/master' into specialpages
Change-Id: I1bc48ac546865f515df65e9d7f0c75e7f5c6d684
2018-02-01 11:35:11 -08:00
jdlrobson 6b801b8c5c Console recruit message has been moved to MobileFrontend
Change-Id: I48eb8ac7471f7e17ed10ac326230cf2ffed467d1
Depends-On: I3ee0c34139ec658566e8d324a3c8c28a80e930fd
2018-02-01 00:48:13 +00:00
jdlrobson dede844830 Minerva should use FeatureManagers class
Bug: T182362
Depends-On: I6cc4a2ebcd75c054294daf329d94d35a02e50f8e
Change-Id: I6ba5bf49b9060c31ad2224a437072b3426a45619
2018-01-09 14:38:33 -08:00
Translation updater bot dec165bf37 Localisation updates from https://translatewiki.net.
Change-Id: I709cc4f913507d679dc3bcdb45db368d3a8fc860
2017-10-31 21:58:41 +01:00
Translation updater bot af20b6670e Localisation updates from https://translatewiki.net.
Change-Id: I7f5675ef6aa0a851580d809b2666eb01168f768e
2017-10-30 22:07:06 +01:00
jdlrobson 5cb46fe9d2 Hygiene: Minerva owns PointerOverlay
The only usage is inside Minerva so we will move this module here.

Change-Id: If6859f0c8f855c6b116b254c58a6814f54b7c36d
2017-10-30 18:00:02 +00:00
Translation updater bot 8a82f30dab Localisation updates from https://translatewiki.net.
Change-Id: Ic02a1cbb91ccdfdc10baa51a2b7491ab0c7c86ba
2017-10-26 21:57:18 +02:00
jdlrobson 45a1b3b423 Add feature flagged DownloadIcon
Shortcut for print. Disabled by default and controlled by
wgMinervaDownloadIcon

Note that with lazy images enabled, images will not appear
in the printed article. This can be easily addressed inside
the onClick function in a later patchset with a few modifications
to the Skin class.

Currently the flag when enabled will show on all browsers. There
are some open questions on the ticket about how we want to limit
the feature. This shouldn't block review or merging.

Bug: T177215
Change-Id: I49f1736870c743990b3fb9916247e07a597b2f59
2017-10-23 18:12:20 +00:00
Translation updater bot 5d5702fdc4 Localisation updates from https://translatewiki.net.
Change-Id: I992a5b95ffb10d51263fae02288c21b63f99f1c3
2017-10-13 22:00:21 +02:00
jdlrobson 7b8530a2b2 Standardise on MinervaNeue's skin name (minerva)
We will standardise on the key "minerva" and the styles
in MediaWiki:Minerva.css for desktop since this is what is
used for mobile. The name will however appear as MinervaNeue
to be consistent with the skin repo name (not the code).

Please merge I5fdb21243e0b599b07aa228107fd4b8c306c696c
shortly after merging this to remove the remaining logic
relating to this from MobileFrontend as otherwise two skins
will appear in user preferences.

Any existing users of MinervaNeue (key minervaneue on desktop)
will be thrown back into the Vector skin and will need to opt
into the MinervaNeue skin again. This is a minor disruption
given the low amount of users and instability of the skin.

Bug: T171644
Change-Id: Ieffb6334168047dcf05dcb60281865ab47056dc0
2017-10-12 15:04:13 -07:00
Translation updater bot 06d9c5c9d4 Localisation updates from https://translatewiki.net.
Change-Id: I19ffd875f99d57b577b6bcfb9676bcea2b5abce6
2017-09-08 23:23:19 +02:00
Translation updater bot 65ff225ae8 Localisation updates from https://translatewiki.net.
Change-Id: I48e03ab8a54f98cbbe31361a0e758be4ff3fd0ad
2017-08-17 08:52:03 +02:00
jdlrobson 5146a90590 i18n: Add Minerva specific message key for last modified bar
This is currently defined in MobileFrontend which uses it for
Special:MobileWatchlist.

We shouldn't use two messages for 2 purposes so let's give it
its own dedicated message.

Change-Id: Id5df6aad20815b88b8bd2685514e7eb3237a5b3b
2017-08-16 14:56:00 -05:00
Amire80 928a62400f Add skinname-minervaneue for translation
Bug: T173242
Change-Id: I1f60acaa525eaba3451ff1b407e6e5c46ec2db3b
2017-08-13 09:06:43 -04:00
Translation updater bot e81e5cd11d Localisation updates from https://translatewiki.net.
Change-Id: Iaeefb43cbf364545db4b426d44f5bf99cb993802
2017-07-24 22:29:00 +02:00
Translation updater bot 07828dcdae Localisation updates from https://translatewiki.net.
Change-Id: I8f0d5240a7acab01724730cd24c45d8a312f2e20
2017-07-21 22:05:53 +02:00
jdlrobson a81c87b897 Add missing Minerva skin description message key
Change-Id: I61457e709caa0bfa94a627236f1d04a16f94a166
2017-07-13 14:03:00 -07:00