mediawiki-extensions-Echo/modules/mobile/overlay.less
jdlrobson d3c0494a17 Dormant mobile notifications overlay lives in Echo
This code will be enabled when Iba1d7863171268066bf7597182c57a0a2041497f
relinquishes the responsibility for rendering the Echo notification badge
and wiring up of the related JS.

It makes 3 assumptions:
1) Minerva will expose a VERSION property on the skins.minerva.scripts module
to tell Echo it can begin control of the functionality
2) A new hook `SkinMinervaReplaceNotificationsBadge` will run on the server side
allowing Echo extension to render the Notifications badge in Minerva.
3) A new client side hook (echo.mobile) will fire whenever the Echo dialog is opened or
closed.

All code relating to Echo inside MobileFrontend and Minerva is
moved here.
CSS for the modules is kept in Minerva as skinStyles

This code remains dormant until Iba1d7863171268066bf7597182c57a0a2041497f lands.
It pre-registers a "to-be-created" hook SkinMinervaReplaceNotificationsBadge that
substitutes the Minerva badge.

It also watches the export value of skins.minerva.scripts for a VERSION value - when
this appears it will take the signal that it should manage the frontend code.

In the new system the mobile specific code is limited to the mobile version of
Minerva. The desktop version of Echo loads on Minerva desktop - presenting an
opportunity in future to consolidate both implementations to use the same component.
The mobile version of Vector and Timeless for example will load the mobile overlay
(with existing styling issues that we don't need to worry about right now given
we don't officially support skins other than Minerva as mobile)

Testers:
* Check require( 'ext.echo.mobile' )(); inside initMobile
inside ext.echo.init does not fire until
Iba1d7863171268066bf7597182c57a0a2041497f is checked out.

Depends-On:  I1a66939d2b596094b419de40b370e79f09c85581
Bug: T221007
Change-Id: I09c27a084100b223662f84de6cbe01bebe1fe774
2019-10-09 12:36:11 -07:00

62 lines
1.3 KiB
Plaintext

// FIXME: some of this could be removed if we reused .page-list styling
@import 'mediawiki.ui/variables.less';
@import 'mediawiki.mixins.less';
.notifications-overlay {
// position: fixed + sliding drawer causes weird rendering bugs in Android
// Browser (tested on 4.0.4 and 4.2.1)
padding-top: 0;
&-header-markAllRead {
padding-right: 1em;
}
&-overlay {
position: absolute;
bottom: 3em;
right: 0;
left: 0;
z-index: 1;
.mw-echo-ui-actionMenuPopupWidget-menu {
padding: 0.5em;
font-size: 1.5em;
box-shadow: none;
border: 1px solid @colorGray10;
// Override the positioning of the menu
// so it is "stuck" on the bottom of the
// notification overlay panel
position: static !important;
bottom: 0 !important;
left: 0 !important;
width: 100% !important;
height: auto !important;
top: auto !important;
}
}
.overlay-content {
// this is needed not only on iOS, that's why we repeat it here even though
// it's in Overlay.less too
overflow-y: scroll; // has to be scroll, not auto
position: absolute;
width: 100%;
padding-top: 0;
padding-bottom: 0;
max-width: none; // T219320
.mw-echo-ui-notificationsWidget {
height: 100%;
}
}
.user-button {
position: absolute;
right: 0;
top: 0;
padding-right: 0;
// Should correspond to @z-indexOverOverlay in MobileFrontend
z-index: 2;
}
}