Commit graph

91 commits

Author SHA1 Message Date
Jon Robson b079031b0a Send a toast notification if night mode is not available
Add a skin-night-mode-page-disabled class to the HTML element when
a page was disabled by the new MinervaNightModeOptions configuration
flag.

Bug: T356653
Change-Id: I7a6582ef8f66e78cc6f07da06bc4d2a3277cfcf0
2024-02-14 01:51:23 +00:00
Jon Robson db8e3b09af Document messages and add hours and minute units
Follow up to I5a4a2588da3d701be87690038c2c9b2bc1aa0365

Change-Id: I6ea2b98bd3d03e586cc58307d3f2f0f1119059e3
2023-10-30 23:37:12 +00:00
Translation updater bot 23259829af Localisation updates from https://translatewiki.net.
Change-Id: I77835f48ca322b99e95afa8d796934d7f23a222b
2023-10-30 18:01:27 +01:00
Jon Robson a3f03245fd Style the desktop diff and history page of Minerva to look like mobile pages
Depends-On: Ie8ac1aab6d2fe5f4575a6891c36efe497458e093
Bug: T305113
Bug: T240624
Change-Id: I5a4a2588da3d701be87690038c2c9b2bc1aa0365
2023-10-20 18:35:10 +00:00
Translation updater bot 47b528c0e2 Localisation updates from https://translatewiki.net.
Change-Id: I49af1ab1ce47512d4920b0a2f9d2e33b7bacd368
2023-08-29 08:30:45 +02:00
David Lynch 956baf5b55 Add "edit full page" to the minerva overflow menu
Bug: T203151
Change-Id: I2777a8346ab672ce2b4fcf37b19fd12ab5541224
2023-07-21 20:00:15 -05:00
Translation updater bot 31e4a207ff Localisation updates from https://translatewiki.net.
Change-Id: I35a493a7df83d385ab78c7ec118627e0828a7c8c
2023-05-22 08:49:27 +02:00
Jon Robson 132a2ab7e8 Standardize user overflow menu
Make it behave just like the normal page actions menu, taking
its data from the core toolbox definition. This will allow it to
be extensible by extensions who declare an icon field for their
menu item.

Follow up to Ifd10da690a33e7fc5790a7b444b62fbfd1b95d98

Depends-On: I6881785676e2909434991b633ac181d05a272352
Bug: T335603
Change-Id: I88ac38acf22fbce0c3e0a4f4c6efcaef4ca49907
2023-04-28 19:33:43 +00:00
Bartosz Dziewoński 8c0f0c578e Remove talk page tools
Bug: T319145
Change-Id: Ib432564e1049f18334653e5eb3981f0f051582b3
2023-03-13 18:21:52 +00:00
Translation updater bot b584bdd60f Localisation updates from https://translatewiki.net.
Change-Id: Iec6a00ecfd092ed0ba94cdf3111e028a59c2c970
2022-12-29 10:05:46 +01:00
suecarmol 207705fced User menu overflow: add change block and unblock
Added the "Change block" and "Unblock user" to the array of possible menu entries for the overflow menu. These buttons will only appear when a user is already blocked.

Bug: T308570
Change-Id: I987083cfeb20a0c691d3fc631a9c844647fec9bf
Depends-On: If60a1194d63fff2b7b5ae1565be25a3b7b44fdf1
2022-07-01 12:21:33 -05:00
suecarmol 6df66f31ce Add discussion link next to MinervaNeue skin option
Added a message that links to Moderator Tool's talk page so users can add feedback to the changes made in mobile moderator tools. It is shown before the Preview link.

Bug: T308653
Change-Id: I2922a346fbbb2ce211212e9926b47780fda4be9f
2022-06-01 18:30:42 -05:00
jsn 7959e9fa08 Add block button to user namespace overflow
Bug: T307341
Change-Id: Ib8bcca0ab284900eff01468a416177435f02e7aa
2022-05-04 10:59:16 -05:00
jdlrobson f9a8703a64 Minerva uses core page title handling
Bug: T265892
Change-Id: I2ffdedd64414ffb3c6e441391a75fd6e744847a4
2021-12-20 19:39:42 +00:00
jdlrobson 894364a3eb Restore title to mobile skin without logo
Bug: T290525
Change-Id: I6eb120a08d15b308d2a4df99900ab86042612b0c
2021-10-21 15:16:14 +00:00
Translation updater bot 6b952c3ffb Localisation updates from https://translatewiki.net.
Change-Id: I47845b84c3e7031171fb6f593154715466057748
2021-10-21 08:24:26 +02:00
Nicholas Ray 6df49e3da4 Add alt attribute to logo
* Adds alt attribute with a value of the `mobile-frontend-sitename`
(previously called `mobile-frontend-footer-sitename`). The message was
changed because this affects both the footer and the header's logo.

* Adds a `minerva-footer-logo` class to the logo in footer.mustache in
preparation for changing that element from an h2 to a div. Given caching
issues (old CSS with new HTML; new CSS with old HTML are both
possibilities), we need to do this in two separate deploy cycles.

Bug: T288362
Change-Id: I3ecbf8fdcae72a0ded7f60c559259f312b8ef15d
2021-09-22 02:01:42 +00:00
Derick A 4009065cea
Menu: Add "unprotect" action when current user is an admin
Accidentally via T231291, a regression was introduced such that,
in AMC mode, when a page is protected to be edited only by admins,
a corresponding unprotect action is not avaiable to reverse the
protect action.

This patch fixes that regression. Have tested locally and it works
as expected.

Bug: T285567
Change-Id: Ie20ca5d9c43fa54dff5d699eb59679585283bdb5
2021-06-30 20:51:57 +01:00
Jdlrobson 8651df02bb Replace categories button with HTML rendering
Bug: T246049
Change-Id: Id8c7493a525844b43c1628a1f4f09ae716ece2ba
2021-05-14 20:34:59 +00:00
Translation updater bot e195c92cbe Localisation updates from https://translatewiki.net.
Change-Id: Ic6433b90bd8143042dc322da59c6cacb5d1d5a2a
2021-05-06 08:56:58 +02:00
Translation updater bot 4deedb2baf Localisation updates from https://translatewiki.net.
Change-Id: I4f9678251a4a44579f697ee46633010c23452515
2021-04-28 08:51:39 +02:00
ZabeMath 4cdd0af8bf Allow Users with permissions to do expanded actions in Minerva on mobile
Allow Users with the needed permissions to delete, protect or move pages in Minerva on mobile version.

Bug: T231291
Change-Id: I1e438b7d3683d288a8a6c5a9f5dcea6b3b3d9f71
2021-04-26 18:51:32 +00:00
Translation updater bot 706365406e Localisation updates from https://translatewiki.net.
Change-Id: Idcf218fd058b4989cd9435954362ee99536cfd73
2021-01-18 08:44:37 +01:00
Translation updater bot 91238200d8 Localisation updates from https://translatewiki.net.
Change-Id: I3e51374f7c2859f49334357ad40e2bc922d1ff7e
2020-10-05 08:47:40 +02:00
Translation updater bot c8b9876992 Localisation updates from https://translatewiki.net.
Change-Id: Ibcc9c4bcf24b440184b4d7134ccd64bbffe3874a
2020-08-14 08:43:02 +02:00
Translation updater bot 36384b6050 Localisation updates from https://translatewiki.net.
Change-Id: Icd47334a5d9bb896dfff3e3ccd92daa66c799ba1
2020-06-29 16:28:32 +02:00
Translation updater bot 1cea3db996 Localisation updates from https://translatewiki.net.
Change-Id: I03dd342f7789c3200e16d1817971c42c3e6c5ded
2020-04-08 09:06:46 +02:00
Translation updater bot b7ccd6413b Localisation updates from https://translatewiki.net.
Change-Id: I2070c71f50d38a9a128f2f5f69620fdb03eb79b0
2020-02-26 07:59:08 +01:00
Volker E 62f6b8a17a Unify messages for skin specific CSS/JS overrides
This should probably be following the same logic as other skins.
Similar to Ib40a38dba553bf10.

Change-Id: I881e46478b754a1322357493bea597e754fef63b
2020-02-25 11:47:54 -08:00
Stephen Niedzielski 83432ba8b5 Fix: user navigation label when AMC is disabled
At some point I introduced a bad label aria ID,
minerva-user-menu-toggle, for the user navigation. This was the
incorrect text and ID to use. Further, the ID is not present in non-AMC
mode (which is what search engines use). This patches adds a new string,
minerva-user-navigation, and replaces the aria-labelledby attribute with
a direct aria-label.

Bug: T242281
Change-Id: Ic247eb77609862b62025dc5e6af550c079df26d9
2020-01-10 15:23:04 -07:00
Ammar Abdulhamid 898b048d1c Discontinue back-to-top feature
Bug: T237290
Change-Id: I06a6823bd3d1985a1d76384bb65c9d2ddf334a21
2019-12-11 05:12:43 +00:00
Translation updater bot 8394359cfb Localisation updates from https://translatewiki.net.
Change-Id: I26742aa343d6aa17a10c2f58d4b84c8eeb3d49ed
2019-11-07 08:52:21 +01:00
Nicholas Ray 2d579183c9 Render talk page as a tab instead of an overlay
Following up on Jon's POC, this will get rid of the talk board component in
favor of linking to the server rendered talk page.

Additional Changes:

* Cleaned up talk selenium tests. Removed talk_steps.rb which doesn't appear
to be used anymore.

* Changed talk add button classes to a single class

* Moved "Add discussion" button to postheadinghtml per design mock

* Added  "...talk-explained", "...talk-explained-empty" messages to
postheadinghtml per design mock

* Due to undesirable jumps in window scroll caused by the section anchor
& Toggler.js code when opening the TalkSectionOverlay (read fixme in
code), a Promise is always returned from OverlayManager route to reset
the scroll position to the top when the section overlay is opened.

* Moved
"mobile-frontend-talk-fullpage",
"mobile-frontend-talk-reply-success",
"mobile-frontend-talk-topic-feedback",
"mobile-frontend-talk-explained"
"mobile-frontend-talk-explained-empty"
messages to minerva as minerva is
the one who initiates those messages now.

* Limited $talk selector to only `.talk` elements since amc talk tab
does not need to be targeted

* After saving a reply from TalkSectionOverlay, the DOM that is not
part of the overlay becomes out of sync since a new reply was created.
To get around this, an `onSaveComplete` callback was passed (similar to
the TalkSectionAddOverlay) to execute a full page refresh. Although this
is clunky, it is the easiest way to resync.

Bug: T230695
Depends-On: I80201394fd7015db6700446142b0b4b20829f12e
Change-Id: I243f1193bce0da9fa710fc3b5379f90b2d079680
2019-11-05 09:51:43 -07:00
Translation updater bot c8df4cad7b Localisation updates from https://translatewiki.net.
Change-Id: I68fdd8153e522dea41b2cdd64bf46f5f641f9412
2019-11-05 09:02:57 +01:00
Translation updater bot c2aca28052 Localisation updates from https://translatewiki.net.
Change-Id: I3d5d14530522b30ba4ab0b12a44d67925c905eaf
2019-11-04 08:41:15 +01:00
Piotr Miazga f9c055e7f5 Remove Share feature
The feature got into Beta in over a year ago and never made into
the beta mode. For most of the time it was disabled for all users.
There is no need to keep this code as it is dead code now.

Change-Id: I9037f58b97373195e9d1b9f57789a6c531f42831
2019-10-28 12:54:14 -07:00
Jan Drewniak 575a835e66 Shorten labels for page-actions menu items
Updates the labels for: language, history, dropdown menu
buttons in the page-actions menu

Bug: T226562
Change-Id: I1141d570cf17d659a943659e8f44ebcdd166ca3c
2019-10-28 19:53:16 +00:00
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