Commit graph

2017 commits

Author SHA1 Message Date
jdlrobson 97c157b8e8 Replace .content class with .post-content on last modified bar
We use `.post-content` which has less side effects.

Change-Id: I40ce9b2c7410c4c361554b5b32d9c1178a59e234
2019-12-05 21:01:23 +00:00
jenkins-bot ebd2a32d7f Merge "Remove line-height as a way to create "screen-reader" text for icons." 2019-12-04 18:56:33 +00:00
jenkins-bot 365da706ac Merge "Adding min-width/min-height to icon sizes" 2019-12-04 18:48:33 +00:00
Translation updater bot 9294937f94 Localisation updates from https://translatewiki.net.
Change-Id: Ic0e5ccf4390a1cafe21161277af5430388122d36
2019-12-04 08:34:26 +01:00
Jan Drewniak 61e9b0d247 Remove line-height as a way to create "screen-reader" text for icons.
Line-height was used as an alternative to text-indent to push
text inside icon elements off-screen. This method sometimes
caused the pseudo-element to be positioned off-screen
because it is displayed as inline-block.

Now transparent color, combined with nowrap and ellipses are used
to achieve screen-reader only text instead.

Bug: T239304
Change-Id: Ic8eea3f8a1c6e87a35c36e209663e9ab643f7900
2019-12-04 01:48:34 +01:00
Jan Drewniak 0a865d244a Adding min-width/min-height to icon sizes
Bug: T238681
Change-Id: I18c09436232a34bd47afa0aebdff9d1d10a622a0
2019-12-04 01:10:38 +01:00
jenkins-bot 2e264b4f68 Merge "username should appear on its own line on RecentChanges and Watchlist" 2019-12-03 23:10:33 +00:00
jenkins-bot 2880fa63eb Merge "Replace #content selector by .mw-body" 2019-12-03 18:49:33 +00:00
jenkins-bot 1f22955461 Merge "Enable stylelint 'selector-max-id' rule and disable only on occurrence" 2019-12-03 18:48:13 +00:00
Volker E a62ca4412f Replace #content selector by .mw-body
Has been replaced in other skins, `.mw-body` is exclusively used on
`#content`.

Change-Id: I56ca92a683a2f9f4181e7708a312e691448ce230
2019-12-03 11:36:18 -07:00
Translation updater bot f9db5a83c7 Localisation updates from https://translatewiki.net.
Change-Id: Ib07847b7e5f0bc4005bce87ae36379f948270515
2019-12-02 08:35:38 +01:00
Translation updater bot 98ed5dcd1d Localisation updates from https://translatewiki.net.
Change-Id: Ic7cadf036cdf1fb65a3048596ac8264a0ee23593
2019-11-29 08:44:34 +01:00
jenkins-bot 2022b35a2f Merge "Remove obsolete CSS after cache has cleared" 2019-11-28 08:18:41 +00:00
Volker E 52f37a5f2a Enable stylelint 'selector-max-id' rule and disable only on occurrence
Enabling 'selector-max-id' rule, and changing in rare exceptions like
`#bodyContent` to `.mw-body > .content` where there's only one less
specific option.

Bug: T239183
Change-Id: I9d929eaae09475b2e20d96cb19081aba3aec5877
2019-11-27 17:36:59 -08:00
Volker E 1a5a80df6f Remove obsolete CSS after cache has cleared
Introduced in I27658477aaeed3290aced844caa64fc5e1c34fbd

Change-Id: I8273272fe087d83bcaade5a33bd23908228ac4b7
2019-11-27 15:58:36 -08:00
Volker E 3bd0a4cfaf Replace #toc id selector by .toc class
Replacing id CSS selector by lower specific class selector, if needed
with `.client-js` prefix.
We have already been there once in Ib1a874b644, we need to enable
`selector-max-id` stylelint rule in a follow-up in order to make
devs not introduce without clear need.

Change-Id: Id16d89280d2ef080907fca5871dca701554087fd
2019-11-26 22:56:33 +00:00
Piotr Miazga 99f3c97c3c Logout users via API Ajax call to prevent extra step on Special:Logout
Currently the Special:Logout page will ask "do you want to logout"
even if we pass the logout token. To avoid that first let's log out
user via API Ajax call.

Bug: T232734
Change-Id: Ia4cc4253b99254d7a893a55d9e05918c5d8c87e5
2019-11-26 14:45:21 -08:00
Piotr Miazga 244fcdd332 Hygiene: Remove PageActionMenuEntry
There is no need to keep the PageActionMenuEntry as the code
is almost the same as SingleMenuEntry. Both classes were written
around the same time and there was no clue if those can be
merged together. Now it looks like it can be easily achieved.
So DRY.

Bug: T232734
Change-Id: I7ecf7440a241a18aac749b84dc86ff0f07910539
2019-11-26 22:26:24 +00:00
jdlrobson e901bc593e username should appear on its own line on RecentChanges and Watchlist
This shouldn't apply to history or contributions which use the
same stylesheet.

Bug: T236328
Change-Id: I30aba290bd7a47cc2c1f7af665bfabe3f8797b80
2019-11-26 17:57:20 +00:00
Translation updater bot eb8a6cf16a Localisation updates from https://translatewiki.net.
Change-Id: I01431db14e910677c00545c62c0c10d0addfbcf3
2019-11-26 08:35:42 +01:00
jenkins-bot 0a2408bb61 Merge "Talk overlays should be synchronous" 2019-11-25 23:13:58 +00:00
jenkins-bot d1f0beb7eb Merge "Rename LESS variable for unified naming scheme" 2019-11-25 23:08:02 +00:00
jdlrobson f1b9c909d7 Talk overlays should be synchronous
Talk overlays are only needed on talk pages, so we can now
unconditionally load them on talk pages and drop usage of
the ResourceLoader loading module.

When binding the section click handlers, the ids of the
associated headings are now removed to avoid ambiguity in
their behaviour.

Bug: T230695
Change-Id: I9b0ef7c5bc389209ed79761582e2f8aa3058c39d
2019-11-25 14:55:50 -08:00
Volker E 2ac6ee0309 Rename LESS variable for unified naming scheme
Change-Id: I89342b7dd01e9aba1b5761bad6cb44ab930d8ceb
2019-11-25 22:54:30 +00:00
Nicholas Ray 9a2f66fe1f Make talk page explained message only appear on wikitext content model
talk pages

As T238474 shows
(https://commons.m.wikimedia.beta.wmflabs.org/wiki/Talk:Test), an
additional check is needed to see if the content model is wikitext.

As an aside: The SkinOptions::SIMPLIFIED_TALK option is badly named as
it is not the source of truth for whether the simplified talk page is
enabled. It merely tells minerva that the MobileFormatter ran. I plan to
address this in a follow up.

Bug: T238474
Change-Id: Id4b558033165069d03a8c650d0f7a6cf8647fb27
2019-11-25 15:41:01 -07:00
Kosta Harlan e8e8c6cf80 Check if title can have talk page before accessing prefixed text
Loading Special:Homepage on mobile betalabs currently results in an error,
`TypeError: currentPage.titleObj.getTalkPage(...) is null`. The call to
canHaveTalkPage results in false because Special:Homepage is in a lower
namespace number than what canHaveTalkPage() checks for.

Before setting talkTitle, check to see if getTalkPage doesn't fail.
Theoretically we might want to wrap other usages of talkTitle to check if it's
undefined but it seems safe to leave them as is.

Bug: T239101
Change-Id: I913fc309458e014b84da054e25e636492e3ed12a
2019-11-25 19:27:00 +00:00
Volker E 9262b6bb09 Remove obsolete toc selector
Removing obsolete code, now that cache has definitely expired from
I720e62a578f0c7a14f4b5a698004471c85e54bc8.

Change-Id: I4f8dc279ed7eeb185e0591b64b91e68c135cf235
2019-11-25 07:31:41 -08:00
Translation updater bot 3c2de2d0db Localisation updates from https://translatewiki.net.
Change-Id: I4b08c32c6cf03fba07427e18245193417d499771
2019-11-25 08:29:51 +01:00
Nicholas Ray 071aa7a0c9 Enable Simplified Talk Page only on Pages With Expandable Sections
This patch should knock out two bugs we were seeing with the simplified
talk page:

1) Removes the "Add discussion" button and "There are no discussions"
message from appearing on Flow enabled talk pages.

2) Removes the "Read as wiki page" and "Active Discussions"/"There
are no discussions" message we were seeing on Minerva desktop talk
pages.

To address when the "There are no dicussions"/"Active Discussions"
message and "Read as wikipage" button are displayed, Minerva now listens
to MobileFrontend's `MobileFrontendBeforeDOM` hook and turns on the
simplified talk page (via a skin option) when this hook runs.

To address when the "Add discussion" button is added, a check was added
to SkinMinerva which only adds it to a talk page if the content model is
wikipage. Unfortunately, we can't just check the skin option because we
also want to display the button on desktop minerva.

Other changes:

* Moves around the logic in `getTalkPagePostHeadingHTML` for improved
readability

Bug: T237589
Bug: T237597
Change-Id: I83fd5cab174d90b24a5335f2b30c912c3b68040a
2019-11-20 21:41:43 +00:00
jenkins-bot 4002196952 Merge "Set overflow-y to scroll to avoid reflow" 2019-11-19 14:24:52 +00:00
Translation updater bot b3bfe7fed7 Localisation updates from https://translatewiki.net.
Change-Id: I6272ea6e23fbaa6852105935faad6a3297e2307f
2019-11-19 08:49:50 +01:00
Volker E 6dac1b0bc0 Set overflow-y to scroll to avoid reflow
Setting `overflow-y: scroll` to prevent reflow as soon as content
comes in. Adding it to `body` as there might be side-effects when
it's set on both, `html` and `body` and latter seems to be the
place where volunteers or third parties would have set it already.

Bug: T204084
Change-Id: I08e8ceeaea4d8488bc9aee23d26f7791ceaa7ee0
2019-11-18 15:07:49 -08:00
Translation updater bot 95a5f0ed89 Localisation updates from https://translatewiki.net.
Change-Id: Iacdedadd608a6e7572174af4dc5a4f4d5627b3e8
2019-11-18 08:35:26 +01:00
Translation updater bot 3e26cb560b Localisation updates from https://translatewiki.net.
Change-Id: I93d7087c4694065647948d14d37cbe3927896d7e
2019-11-13 08:40:03 +01:00
Translation updater bot 01adcca96e Localisation updates from https://translatewiki.net.
Change-Id: I67a0c5ea0100dd5c62fec565a0ae6956e638b32e
2019-11-12 08:52:47 +01:00
jenkins-bot 4b3a793228 Merge "Hygiene: Drop optional parameters from SingleMenuEntry constructor" 2019-11-11 21:23:28 +00:00
Translation updater bot 2336a7467f Localisation updates from https://translatewiki.net.
Change-Id: I94e5ab790d62072c91725ab1538d7cf4b1cb0f3f
2019-11-11 08:40:40 +01:00
jenkins-bot 112e95da93 Merge "Enable Categories button in AMC" 2019-11-08 21:55:20 +00:00
Translation updater bot fc72e68578 Localisation updates from https://translatewiki.net.
Change-Id: I27f9a297cab3be11521d0e9a28ec942f5045857b
2019-11-08 08:46:56 +01:00
Ammar Abdulhamid c2592508b3 Enable Categories button in AMC
Bug: T237290
Change-Id: Icc1b44070031bab08a2dc18e19cda52ef090946f
2019-11-08 07:01:03 +01:00
Piotr Miazga 4c224d2657 Hygiene: Drop optional parameters from SingleMenuEntry constructor
The SingleMenuEntry constructor has too many optional parameters
which makes it confusing and dificult to use.
Instead system should provide a named constructor `create` that
creates new menu entry instance with Icon and click tracking enabled.
If developer wants to override event tracking/change icon it is
possible via calling `trackClicks` and `setIcon` method calls.

This is a first refactoring step to simplify the SingleMenuEntry,
the next follow-up will remove unnecessary PageActionsDirector.

Bug: T232734
Change-Id: I7a631a635a5c5932845639123c285d1d18df1b5d
2019-11-07 19:04:21 +01:00
Translation updater bot 8394359cfb Localisation updates from https://translatewiki.net.
Change-Id: I26742aa343d6aa17a10c2f58d4b84c8eeb3d49ed
2019-11-07 08:52:21 +01:00
Jdlrobson 10defb5aa1 Merge "Do not jump to the top of the page when the reference drawer is closed" 2019-11-05 19:57:04 +00:00
jenkins-bot 84bc822a4c Merge "Make label for the PDF button in the page-actions menu appear on desktop size" 2019-11-05 19:05:24 +00:00
Jan Drewniak 96ced4d6e3 Make label for the PDF button in the page-actions menu appear on desktop size
Bug: T226562
Change-Id: I60b0f2030b2519a36a2c5bbdc256885980de6420
2019-11-05 19:52:01 +01:00
jdlrobson b4f03d475f Do not jump to the top of the page when the reference drawer is closed
The default behaviour is only needed for the main menu and notification
drawer. In the case of a references drawer where no URL navigation has
occurred, do not reset the hash.

history.replaceState cannot be used here as that interferes with the
OverlayManager's work.

Bug: T237015
Change-Id: I51b8c755933f33a3274aa77dc4e4c0b929d872ec
2019-11-05 17:58:00 +00:00
Nicholas Ray 3a6729841b Remove eventbus usage in talk.js
Now that we have refactored TalkSectionAddOverlay to not use the
eventbus and instead exclusively use the passed in onSaveComplete
callback in I75158ff363d56d55ae385687baf64f8b9d5ca8b0, we can remove the
references in talk.js.

Bug: T230695
Depends-On: I75158ff363d56d55ae385687baf64f8b9d5ca8b0
Change-Id: Ia874fa04c125b00fd1997aa4be8b781d76a18763
2019-11-05 09:51:43 -07: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
jdlrobson b7aaf0c3d8 Icon background should disappear on touch devices after click
A simple fix. Extensive documentation!

Bug: T233046
Change-Id: I378943a663a8947c8a03f807974829c66236a7ff
2019-11-04 21:27:06 +00:00