More hackery!
This adds some tests and ensures that our own icons are mapped to the
existing template icons.
Bug: T187916
Change-Id: I49073f22995c6730369235d6039939915ba2079c
In T182162 these were removed incorrectly. They should only have
been partially removed.
Bug: T187222
Change-Id: Ia3fb34250714fe4ccb10c32a7027fda167e06a16
With the introduction of the FeaturesManager the
getConfigVariable method will disappear.
(I535b24803341dc3912aed4bef06970e2861fe3ad)
That change cannot be merged until Minerva stops using the
method.
This temporary fix ensures it resolves to false when the method
doesn't exist.
Bug: T182217
Change-Id: I619fd8fac47a98d1ff8f3646d61b8e285246a17f
A horizontal line shows in popup previews in the MinervaNeue skin
just above the setting icon due to a css rule that affect all footer
elements. Removing this effect to apply only for the MN skin.
Bug: T184560
Change-Id: Idb0c40c3fc24e4ec2d32cb2de9520952448da77a
Follows-up 2c01147c13be, 429f557cc7f68a46.
The array is already copied by value once returned from getLanguages().
Setting it by reference within the QuickTemplate instance doens't
have any effect, but does logically break the concept of pushing
data in a single direction through the skin.
Remove use of setRef in preparation for restricting skins only
consuming data as given, without the ability to change data
in other parts of the system.
Bug: T140664
Change-Id: I0978dd5c123fda57f45534a8d2e51b7e65e55223
Changes:
* MinervaUI will now prefix any icons with `minerva`
* Update definitions in skin.json, retaining selectors for cached
HTML for icons that are rendered via PHP.
* In I9021c53c2c04bdd7ce395eed33d89986acbfea6d watch and watched
and arrow are moved to MobileFrontend so are removed from the RL module
skins.minerva.icons.images.scripts as they are not
used directly in this repo. user and anonymous are no longer used
so also removed.
* Presentation of userpage now belongs to MobileFrontend. Icons
are styles were moved there in depends on. They are retained in
skin.json to support cached HTML as user pages are subject to
cache. They can be removed in a week.
* In code review we noticed the anonymous icon was badly named. We
rename to login. No caching implications.
* Main menu icons are now prefixed with minerva rather than mf to
reflect where they come from.
Depends-On: I9021c53c2c04bdd7ce395eed33d89986acbfea6d
Bug: T182162
Change-Id: I93264024f4915fc910c792b1905b89cdc6b8b546
Important note: Make sure to distinguish unseen from unread
One way to reproduce minerva and non-minerva notification inconsistencies:
- Have all your alerts and notices seen. This is displayed with grayed out
number on vector skin or no number at all, if you have (marked as) read.
- Generate new alert or notice (one is enough) in your preferred way.
- You can check minerva and non-minerva at this step. Both should be in sync.
But don't perform any additional action.
- Open the notification popup in some non-minerva skin (I have tried with
vector and monobook), marking it as seen.
- Check the notification icon in minerva. At this point, you should see
notification displayed as unseen.
The reason bug appeared in the first place is that alert/notice timestamps
were mixed up when seen time is obtained. We get seen time from
EchoSeenTime class, where we get smaller of the two timestamps,
using PHP method `min()`. See I27109ee6a248. Then, we get last unread
notification timestamp (which can be either alert or notice), and compare
that to seen time. That leads to the situation when you have only one of
alerts or notices with unread items, smaller timestamp is used for seen,
and most recent for unread, at which point we compare timestamps for
two separate things.
Previous behavior of getting seen timestamps (using max instead of min) would
probably solve the problem, but some other inconsistencies might arrise.
This should prevent any weird and unpredictable behavior to happen.
Bug: T183076
Change-Id: I20bbd6c590086b1c3eccf82983aad59eb3144a7a
After Ie92b223a48 removed $flags parameter from EchoSeenTime::getTime(),
we got 0 as $format passed to the method, which caused mismatch in
timestamp string formats when comparing to $notifLastUnreadTime timestamp,
which caused notifications to appear always as unseen (although that's
unpredictable, because of wrong format used).
Bug: T183076
Change-Id: Ia4ff0bc4c3b7ed80b5a22a9ca0052f1909469180
Adjust tagline margin per Nirzar:
https://phabricator.wikimedia.org/T180095#3801719
Note, this will enable the tagline everywhere.
Change-Id: I3bce2a3472ab2e53261965c953572f35cc740eed
Bug: T180095
This will use the srcset attrribute which was introduced with HTML5,
in order to load the svg image on supported browsers.
Should fix the bug after merging change 394820.
Bug: T166684
Change-Id: I2337b750c80e79c816dc817dfe230e063eed0345
The MinervaDownloadIcon config option is replaced with a
more specific wgMinervaDownloadNamespaces config option.
If the list is empty then the download button will not be
shown.
Since the download icon is enabled everywhere in production now
this is good as it means Minerva reflects the production value.
Bug: T181152
Change-Id: Id78c1de9e8e9013530106bc0d45d3cf0297897b5
* Create several sub functions to manage complexity of the history link
* Clean up MinervaTemplate to use data directly and remove isMainPage
template variable which is no longer being used.
Change-Id: I124aec9637f3635a335c58e559e578b2a56eb4c5
If FlaggedRevisions is being used then older revisions will be
shown as if they are the current revision of the page. This causes
problems as it makes it hard to give a true indication of when
something was last modified - do you show the last time someone
made an edit or the last time someone approved an edit?
The same issue applies on revisions and we attempted to fix this
earlier in T153125 but in doing so caused this problem.
Bug: T180116
Change-Id: I6d47adf272c99791d4af9f97afa02799d495887e
When the print button is clicked, load all images from the page
before calling window.print
Add a timeout to make sure the user doesnt wait too long.
Change-Id: Ie922d239f9c5b5757237dc10b673fb500ff203ad
Depends-on: Id7f21606be3db22fe8dfde2db675f9905547cfea
Bug: T180058
Passing null to wfTimestamp will result in the current time.
Protect against that happening
Bug: T180103
Change-Id: I6ef9577bf52609bf387b0146f1d8a4a53be58cd7
Title may be null when accessed via this->getTitle()
If this is the case we should assume the skin is being used by someone
who is not a reader and in these circumstances, not try to render any
page actions.
Bug: T179833
Change-Id: Ia47fd9b059101bf22b5d31be7df3a332b35d6b24
Use the standard way of doing it by adding an autoloader entry, and putting
the class_alias() call into the same file as the class.
Change-Id: I93e19ebcf3dd7d9815623de5e24861949fd0269a
Fontchanger code now runs on all skins under the `mobile` target.
All the code will now live in MobileFrontend meaning developers
can operate inside one code base.
Depends-On: I857cfe2d9be9fe49c04c860bc234384c787239b2
Change-Id: I2759455cb6d7ddf13798e94452cb74baf502bafe
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
The talk page JavaScript progressively enhances an
existing button in the page.
Remove the frontend logic and rely entirely on whether
the button is in the page or not.
Additional change:
* The browser tests incorrectly suggest a user needs
5 edits to be able to use the talk feature. This is not
true. They just need to be logged in. Update that logic.
Bug: T167728
Change-Id: Iacedea30bdd0775b3d785db5b143abafd7a18b39
The locked edit icon will now show on protected pages.
Additional changes:
* userpage and userNormal was not minified. This has been fixed.
Bug: T174105
Change-Id: I0ef9c4cf3ea6cd1c550023fdf99581b665b459b2
Changes:
* Minerva now maintains a MinervaUI - a simplified version of
MobileUI that provides iconClass and buttonClass helpers.
* Minerva now maintains its own ResourceLoaderParserMessageModule
Remaining issues:
* Main menu links to '#'
* Unknown dependency errors are thrown due to the missing
JS libraries e.g. mobile.watchstar
thus JS based UI components are unusable e.g. search autocomplete,
and edit button
* Language button navigates to a missing special page without
MobileFrontend (see T104660)
Bug: T169569
Change-Id: I89e2e15faabab73b0cba91afc2f2c5e785edef29
MobilePage is provided by MobileFrontend and replicates functionality
in core. Let's invest more in those core interfaces. It's a bit of a
maze, so I think there's probably a cleaner way of doing this...
Change-Id: Iea0a3121841c4774eb117168b1cfc8c2e1e24a0c
The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.OneClassPerFile.MultipleFound
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.SpacingAfterParamType
* MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage
Change-Id: I0689ff20133a2a23d6389aa50487349c6ed3797b
We no longer need to keep this as a separate entry point now we do not
feature flag our print styles
Please enter the commit message for your changes. Lines starting
Change-Id: I6bf12980aa929e84f239931beb0a505809231830
Do not allow editing via JavaScript on non-wikitext content models
For these pages ?action=edit will be used
Bug: T173800
Change-Id: Ic62a0c1397ab8a6a59e5382c2999b63b3c60a19f
This is handled by MobileFrontend now, just as it should do.
We rely on skinStyles where possible.
Depends-On: I665f6fe60939475249786fdc951149c38473fda6
Bug: T173597
Change-Id: I0fe9efcf98bbd8e188d91a29d4cfda897d47808d
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