Commit graph

159 commits

Author SHA1 Message Date
Volker E 19b1ea2297 Unify transition values across board
Using newly introduced variables instead of fixed values.
Also adding `transition` to property blacklist to ensure using
mediawiki.mixin.

Bug: T236224
Change-Id: I3d2d05f4e50e7b6bba0fe84fae1dde5de5b75492
2019-10-24 12:11:52 -07:00
jenkins-bot 6dd4142113 Merge "Add standard transition to icon elements" 2019-10-24 18:13:53 +00:00
Volker E 3d6b2b29bd Add standard transition to icon elements
While working on I05c4e5f7a8b18a3 I've noticed the missing transition.
Also adding standard WikimediaUI variables in support of this.

Change-Id: I30c75ed306bf826ae40db3703ef423dfad85fa74
2019-10-24 16:51:05 +00:00
Volker E 22d4d095f1 Remove unneeded vertical-alignment property
It's ignored as `float: left` is also set on the same selector.
Resulting from I06422cbe27afeab.

Change-Id: Ibb755c7b71ea5f3006abd178cdeaa540862f862d
2019-10-23 14:29:13 -07:00
jdlrobson 72d4a103fd Consistent undo/rollback links across changelist pages
Move styles from history page into changeslist stylesheet. These
rules will continue to apply but will also apply to other pages
e.g. Special:Watchlist

Remove style for a.mw-rollback-link which does not look like its
 possible - link is always inside a mw-rollback-link container -
according to includes/Linker.php

Bug: T232284
Change-Id: Ifd04adeba74f010161b88f044ff4282636246e7a
2019-10-09 16:11:02 -07:00
jenkins-bot 38b5591c8c Merge "Echo is removed from Minerva" 2019-10-09 19:51:00 +00:00
jdlrobson ab61dbb173 Echo is removed from Minerva
Managing the transition from old implementation to new:
* A version number is exported from skins.minerva.scripts to
tell dormant code added to Echo in I09c27a084100b223662f84de6cbe01bebe1fe774
to begin running.
* A skinStyle is added for the new `ext.echo.mobile` module.
`mobile.notifications.overlay` will soon cease to exist but is kept registered for
backwards compatibility reasons
- Drop ev.preventDefault call from onSkinClick - it is no longer necessary and will ensure
notifications overlay closes when shield is clicked while it is open.

Integration:
* A server side hook SkinMinervaReplaceNotificationsBadge allows Echo to replace
the current Minerva notification badge
* A to-be-created client side hook is subscribed to to deal with the navigations drawer
like functionality using the mainMenu code
* id and class names are added to the container for the NotificationBadge for compatibility with
ext.echo.init in Minerva's desktop mode (it will work like Vector)

See I09c27a084100b223662f84de6cbe01bebe1fe774 for understanding the bigger
picture.

Depends-On:  I09c27a084100b223662f84de6cbe01bebe1fe774
Bug: T221007
Change-Id: I4c11f1b241d629e1b294ebaec17472fbf944f8c7
2019-10-08 23:21:12 +00:00
jenkins-bot b40b29988c Merge "Adding a static width/height for mw-ui-icon background images." 2019-10-08 18:26:12 +00:00
Jan Drewniak c703e94fd3 Adding a static width/height for mw-ui-icon background images.
Adds a static width/height for icon background images as well
as min width/height for situation where flexbox layout
is at play.

Bug: T233521
Change-Id: I3a4ced61dac78df7a3411a5d8510949b491c8591
2019-10-08 19:35:08 +02:00
jdlrobson 59b093a889 Specify LESS suffix in import statements
Follow up to I379334d7729e587a2a0029550e30e7c46a4f7a7a

Change-Id: I549b1400904c7b1d4e40f5418dd665a759728f93
2019-10-07 18:06:57 +00:00
jenkins-bot 18b483b6ea Merge "Revert "MainMenu is a controller not a View and server rendered"" 2019-10-04 15:18:11 +00:00
Jdlrobson 93b16db1c5 Revert "MainMenu is a controller not a View and server rendered"
This reverts commit 111757970e.

Although I cannot replicate the performance issue, the menu doesn't seem to be rendering at all on cached HTML so this is a deal breaker. Back to the drawing board..

Bug: T234599
Change-Id: Idadc5a079340f44ec66d20a38259b6b337d2dcee
2019-10-04 15:03:19 +00:00
jenkins-bot 3c6fd24f00 Merge "MainMenu is a controller not a View and server rendered" 2019-10-03 20:30:02 +00:00
jdlrobson 111757970e MainMenu is a controller not a View and server rendered
As Stephen pointed out somewhere, this is a bit of a micro-optimisation
Let's simplify this code by always rendering it in the HTML. MainMenu.js
as a result becomes a controller that just decides when to show it.

The geolocation check for Nearby is removed given the fact that all
grade A browsers for mediawiki have Geolocation support

Additional changes
* Browser support suggests "animations" class is redundant now
* `open` event no longer filed - not being used anywhere
* Transparent shield is now managed by the MainMenu controller not
the skin (which was confusing)
* Test geolocation using a simple feature tests
rather than abstracting it away inside Browser
* The main menu button is always hidden under either a translucent shield
and/or the main menu itself when it has been opened
so so it's not possible to ever click it while the menu is open
 - the click handler is thus simplified
removing a check for the class of the button

Depends-On: I7fd243366cceae780bd46e1aef2c08dae073f647
Change-Id: I3892afb5ed3df628e2845043cf3bbc22a9928921
2019-10-03 13:13:09 -07:00
jdlrobson 5b3572ee39 Style rollback link on RecentChanges, Contributions and Watchlist
Bug: T232284
Change-Id: I8c38bb3715b5acaaf49333fcd50bac534dd6eef5
2019-10-02 23:20:23 +00:00
jenkins-bot 9152466474 Merge "Use consistent small font sizes" 2019-10-01 23:21:01 +00:00
jdlrobson 81bbd6eb48 Use consistent small font sizes
* Add @font-size-minerva-smallest and use it in place
of font-size: 0.8em across the site so that we get a round
number for our font sizes.

Bug: T229568
Change-Id: I4270225c07941b4c164d5e044f70d4b131dbc19d
2019-10-01 22:29:55 +00:00
Nicholas Ray e3560b1f93 Remove mobile diff page drawer margin on mobile screens
Although alignment of things on tablet is still anyone's guess, this
commit focuses on fixing the alignment of the contents in the mobile
diff drawer on mobile screen sizes only per [1] by setting the margin to
0.

[1] https://phabricator.wikimedia.org/T233151#5537879

Bug: T233151
Change-Id: Ic3a47cf98380c501709df3f443cd43f37ce1abe8
2019-10-01 14:34:10 -06:00
Nicholas Ray 2b9929a5f9 Vertically center clear icon within search form element
Rely on css top/transform to center it instead of calculations.

I84fc4224d5107188265d8ec0a26c0388664949a5 should be merged shortly after
this one.

Bug: T233156
Change-Id: I6e00f851ecb4e1ba8c1ef5d90bcc4310d66a820e
2019-09-30 16:58:25 -06:00
jenkins-bot 4ec857c2c4 Merge "Fix Recent Changes Comment alignment on deleted pages" 2019-09-27 20:58:39 +00:00
Nicholas Ray 54ec3653b8 Fix Recent Changes Comment alignment on deleted pages
On deleted pages, the comment was being floated making it appear out of
order and misaligned with the rest of the text. This commit fixes that
by removing the float and padding on deletion comments.

Bug: T232955
Change-Id: I3f07128f58ae032c628192f8fc0159aff2c30016
2019-09-27 12:32:30 -06:00
Jan Drewniak 51049c0ceb Refactor "last-modified" bar to use flexbox layout.
Brings the last-modified toolbar (links to history page at the bottom
of articles) in line with recent icon changes. Removes the icon
class from the toolbar itself and by employing a flexbox layout,
reducing the amount of CSS required for this toolbar.

Bug: T233172
Change-Id: I27658477aaeed3290aced844caa64fc5e1c34fbd
2019-09-27 00:03:14 +00:00
jenkins-bot 060c163b24 Merge "[ICONS] Remove padding from .mw-ui-icon-small class" 2019-09-26 23:45:48 +00:00
Jan Drewniak 6e6cdd74c4 [ICONS] Remove padding from .mw-ui-icon-small class
The `.mw-ui-icon-small` class shouldn't include the padding that comes
with `.mw-ui-icon-element`, it should instead render a small icon
without padding.

The right-margin for mw-ui-icon-before is also changed to be
the @icon-padding size instead of a static 1em.

Includes a fix for the "last-modified" bar cause by this change.
This temporarily breaks the reference drawer with error state but that
will be swiftly fixed in I229dd5ae04bde96ba8d5622097ff09ea4324ab0e

Change-Id: Ia44b3157ecec6a036f3bd6287d4b8096748d4afa
2019-09-26 23:07:03 +00:00
jdlrobson cd688eb197 Avoid flash of unstyled content on Special:Watchlist
Bug: T225127
Change-Id: I9b96627b1d48dddc30006fc52fc1816fbe8b29ac
2019-09-26 21:47:27 +00:00
jdlrobson b15fa199a2 Clear search alignment
* Refactor less variables to make icon touch-area sizes flexible 
* Search input is bumped up 1px to an even number

Bug: T233156
Change-Id: I156d09bfca8db9506c0e9cee21e4d6e0a2e91689
2019-09-25 22:15:21 +00:00
jenkins-bot 98f957219e Merge "Labels for mw-ui-icon-before elements should be vertically aligned inside" 2019-09-20 18:10:36 +00:00
jdlrobson 2a76493a56 Labels for mw-ui-icon-before elements should be vertically aligned inside
This also resolves the issue with the language menu item being grayed out
for pages without languages

Bug: T233167
Bug: T233050
Change-Id: I05c54c0d35e4990717a8c3dc4ab42841349535f1
2019-09-20 10:37:46 -07:00
jdlrobson 4ac03162f0 Add the mw-ui-icon-flush-top class
Bug: T232837
Change-Id: I285d6c7f26bb160eb4b646d241bf3acd0f567f62
2019-09-19 15:59:03 +00:00
jenkins-bot d61e1f7fb7 Merge "Generalize SearchOverlay styles to all "header-chrome" overlays" 2019-09-17 00:40:47 +00:00
jenkins-bot d2a5907c3e Merge "Only apply padding-top to overlays with headers" 2019-09-16 23:27:08 +00:00
jenkins-bot fde1955293 Merge "Add general messagebox (neutral) styling to shared.css" 2019-09-16 21:48:14 +00:00
Bartosz Dziewoński aadd499753 Generalize SearchOverlay styles to all "header-chrome" overlays
Although in practice, SearchOverlay is the only one.

Change-Id: Ibd70fab0ddf0f9513388c76717392871abd8bf26
2019-09-16 21:29:59 +02:00
Bartosz Dziewoński d8deb264f2 Only apply padding-top to overlays with headers
The incorrect padding-top was causing overlays with no headers to
always be scrollable. The issue was noticeable e.g. on the search
overlay or the editor loading overlay in MobileFrontend.

Change-Id: I28ece81402041eea10124c2076cff5a1cba049cf
2019-09-16 21:22:22 +02:00
Jdlrobson 9ec7217d47 Merge "Adjust notification icon to be the same size as the other icons" 2019-09-13 21:53:37 +00:00
Jdlrobson fd3599b603 Merge "Fix truncated text showing through icons & last-modified bar" 2019-09-13 21:53:27 +00:00
jdlrobson 109b24e0ee Adjust notification icon to be the same size as the other icons
Bug: T232011
Change-Id: I0300685d38551bc9ee2c2bd32d6348f32d4df4de
2019-09-13 13:55:01 -07:00
Jdlrobson 4542840cf6 Merge "Utilize the mw-ui-icon-flush-left/right classes to align icons" 2019-09-13 20:33:55 +00:00
Volker E c2fdf9404e Add general messagebox (neutral) styling to shared.css
Bug: T232553
Change-Id: I274471bad1fa402ede4b273444023ea31d2bd502
2019-09-13 13:24:30 -07:00
Jan Drewniak 633c48bddf Utilize the mw-ui-icon-flush-left/right classes to align icons
Affected icons:
- hamburger menu
- "search|notifications|user" menu in page header
- notification "circle" icon
- page actions menu
- section edit icon

Bug: T229440
Change-Id: I5587855d0d9ecf2fac20ce16845e6749c26ab7c2
2019-09-13 12:09:43 -07:00
Jan Drewniak 35e489de25 Fix truncated text showing through icons & last-modified bar
To accommodate for cached HTML a new class last-modified-bar__text
replaces last-modifier-tagline to help us distinguish between old
out dated HTML and the new HTML.

Bug: T232792
Bug: T232800
Change-Id: I53fa45058dbc81c91089840073e03113ff1a4b9c
2019-09-13 18:35:31 +00:00
jdlrobson 19d8f8896e Drop width declaration on close button
Not necessary or compatible with new icons.
A padding left is needed so that the cancel icon
matches up with the content body.

See "The "X" has too much padding, which is causing two issues:"
in attached issue

Bug: T229440#5490743
Change-Id: If76602436e797f2896004181eb776f049cf52fd5
2019-09-13 17:54:46 +00:00
Jan Drewniak 6223d571bc New mw-ui-icon spec for Minerva
Redefines the mw-ui-icon module from MediaWiki-core for
better mobile support.

The new spec maintains the same interface and class names as core
(mw-ui-icon, mw-ui-icon-element, mw-ui-icon-before etc,)
but ensures that icon sizing is more consistent and
provides larger and more flexible touch-areas to the
`.mw-ui-icon-element` class, which in practice is used to
make icon buttons.

This introduces a temporary defect in which the hamburger and user
menu icons are a little too close to the edges. This will be fixed in
I5587855d0d9ecf2fac20ce16845e6749c26ab7c2

Bug: T229440
Change-Id: I929090848f3e04647a97f4979ec78682623fa070
2019-09-12 21:47:09 +00:00
Jan Drewniak be76f05ebb Prepare for new mw-ui-icon spec for Minerva
Includes icon fixes and removal of some CSS overrides.

This causes the following temporary defects to the skin:
* Last modified bar will temporarily be squashed
* clear search  icon will be misaligned vertically

Depends-On:  Ie811d25595d041c35e6c214190101821f3a5d466
Bug: T229440
Change-Id: I0a3a73421791ad353bbcebaeb8241ad062f67ae4
2019-09-12 18:44:44 +00:00
Bartosz Dziewoński 1015e653d6 SearchOverlay: Fix position of the 'clear' button
Before c0f08790ea, this was defined as
`( @iconSize / 2 ) + @headerVerticalPadding`, which computed to 0.9em.
Restore the old value since it looks wrong now: T215426#5486117.

Change-Id: Ib14a148da305d98f2d1ce9b1c71cb8910d665e44
2019-09-12 01:08:34 +02:00
jenkins-bot 02986e7a85 Merge "Change height of overlay headers to 3em, keep site header unchanged" 2019-09-10 22:58:50 +00:00
jdlrobson c0f08790ea Remove the mw-ui-icon hacks and overrides
Note: this agitates T230232 again - when merging this please
make sure a merge for I929090848f3e04647a97f4979ec78682623fa070
is pending.

In various places we try to override the default mw-ui-icon behaviours
The hacks need to be removed as part of addressing the core problem.

Changes:
* Wherever we use mw-ui-icon-before in PHP - wrap the label with a span
so that label font-size is altered where needed - not the icon
* Where a small icon is needed us isSmall parameter for the Icon component
* Apply font-size to labels of mw-ui-icon-before elements
* The browser tests need a slight update to access the span element inside
a menu item - in the case of the logout button the label is always hidden,
so we need to check the visibility of the parent element (secondary_action)

Bug: T229440
Depends-On:  I3f803ec4c9068b30aa93b803391aa4d65d8310ff
Change-Id: I07e4ae233979636b739f1117dd7703571e0a9366
2019-09-10 10:53:20 -07:00
jdlrobson 6cd0d4b097 Also set bottom attribute on icon glyphs
This ensures that the logout button is centered vertically on
absolutely positioned elements.

Bug: T229440
Change-Id: I4d230c01fc4d32e854b7ed1e7ed5e09c040954b1
2019-09-10 10:41:04 -07:00
jdlrobson 4e5ed825c8 Icon pseudo elements need top: 0 for RTL languages
Document why so it doesn't get removed next time.

Bug: T232260
Change-Id: I09cac0403c913e5ff10dfede9355a08f226f395d
2019-09-09 20:56:15 +00:00
jdlrobson 497044290a MobileFrontend is now managing the toggling code. Remove.
Depends-On: I6bdeb7198082c4b1d0a32960cc4dc679ff4c6762
Change-Id: I1815a730fc12f68c287d58f2de6f92e05db3abd2
2019-09-06 15:50:00 +02:00