2017-07-12 15:12:40 +00:00
|
|
|
<div id="mw-mf-viewport">
|
|
|
|
<div id="mw-mf-page-center">
|
2020-02-03 08:15:44 +00:00
|
|
|
<a class="mw-mf-page-center__mask" href="#"></a>
|
2018-08-08 19:16:37 +00:00
|
|
|
<header class="header-container header-chrome">
|
2021-07-19 20:50:06 +00:00
|
|
|
<form class="minerva-header" action="{{wgScript}}" method="get">
|
2019-12-18 19:23:09 +00:00
|
|
|
<nav class="navigation-drawer toggle-list view-border-box">
|
|
|
|
<input type="checkbox" id="main-menu-input" class="toggle-list__checkbox" role="button" aria-labelledby="mw-mf-main-menu-button">
|
2020-03-27 22:53:26 +00:00
|
|
|
<label for="main-menu-input" id="mw-mf-main-menu-button"
|
2020-03-25 02:02:02 +00:00
|
|
|
class="mw-ui-icon mw-ui-icon-element mw-ui-icon-wikimedia-menu-base20 mw-ui-icon-flush-left toggle-list__toggle"
|
2020-03-27 22:53:26 +00:00
|
|
|
title="{{main-menu-tooltip}}" data-event-name="ui.mainmenu">{{main-menu-tooltip}}</label>
|
|
|
|
{{#data-main-menu}}{{>menu}}{{/data-main-menu}}
|
2019-12-18 19:23:09 +00:00
|
|
|
<label class="main-menu-mask" for="main-menu-input"></label>
|
|
|
|
</nav>
|
2017-07-12 15:12:40 +00:00
|
|
|
<div class="branding-box">
|
2018-08-08 19:16:37 +00:00
|
|
|
<a href="{{mainPageURL}}">
|
2020-10-02 20:19:36 +00:00
|
|
|
<span>{{>Logo}}</span>
|
2018-11-14 20:39:26 +00:00
|
|
|
{{#isBeta}}<sup>β</sup>{{/isBeta}}
|
2018-08-08 19:16:37 +00:00
|
|
|
</a>
|
2017-07-12 15:12:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="search-box">
|
2021-03-24 14:23:26 +00:00
|
|
|
<input type="hidden" name="title" value="{{searchPageTitle}}"/>
|
2019-07-09 19:12:51 +00:00
|
|
|
<input class="search mw-ui-background-icon-search skin-minerva-search-trigger" type="search" name="search" id="searchInput"
|
2019-06-20 19:17:50 +00:00
|
|
|
autocomplete="off" placeholder="{{placeholder}}" aria-label="{{placeholder}}"
|
|
|
|
value="{{search}}">
|
2017-07-12 15:12:40 +00:00
|
|
|
</div>
|
2020-01-10 22:23:04 +00:00
|
|
|
<nav class="minerva-user-navigation" aria-label="{{userNavigationLabel}}">
|
[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-06-25 20:12:58 +00:00
|
|
|
<div>{{{searchButton}}}</div>
|
|
|
|
{{^isAnon}}
|
2019-10-01 21:40:49 +00:00
|
|
|
<div class="minerva-user-notifications" id="pt-notifications-alert">
|
|
|
|
{{{userNotificationsHTML}}}
|
[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-06-25 20:12:58 +00:00
|
|
|
</div>
|
|
|
|
{{/isAnon}}
|
|
|
|
{{#userMenuHTML}}{{{userMenuHTML}}}{{/userMenuHTML}}
|
|
|
|
</nav>
|
2017-07-12 15:12:40 +00:00
|
|
|
</form>
|
2018-08-08 19:16:37 +00:00
|
|
|
</header>
|
|
|
|
<main id="content" class="mw-body">
|
2018-09-27 18:34:48 +00:00
|
|
|
<div class="banner-container">
|
|
|
|
{{>banners}}
|
|
|
|
</div>
|
2019-01-10 21:41:55 +00:00
|
|
|
{{#hasheadingholder}}
|
2019-02-07 20:29:00 +00:00
|
|
|
<div class="pre-content heading-holder">
|
2019-02-19 10:20:25 +00:00
|
|
|
<div class="page-heading">
|
|
|
|
{{{headinghtml}}}
|
|
|
|
{{{taglinehtml}}}
|
|
|
|
</div>
|
2019-01-10 22:59:56 +00:00
|
|
|
{{#tabs}}
|
2019-06-14 17:32:17 +00:00
|
|
|
<div class="minerva__tab-container">
|
|
|
|
{{#items}}
|
2019-08-08 21:43:04 +00:00
|
|
|
<a href="{{href}}" rel="{{rel}}" class="minerva__tab {{class}}" data-event-name="tabs.{{context}}">{{text}}</a>
|
2019-06-14 17:32:17 +00:00
|
|
|
{{/items}}
|
|
|
|
</div>
|
2019-01-10 22:59:56 +00:00
|
|
|
{{/tabs}}
|
2019-02-07 20:02:18 +00:00
|
|
|
{{{pageactionshtml}}}
|
2019-02-13 18:55:30 +00:00
|
|
|
{{{postheadinghtml}}}
|
2021-08-19 19:26:48 +00:00
|
|
|
<div class="minerva__subtitle">{{{html-subtitle}}}</div>
|
2019-01-10 21:41:55 +00:00
|
|
|
</div>
|
|
|
|
{{/hasheadingholder}}
|
2017-07-12 15:12:40 +00:00
|
|
|
{{{contenthtml}}}
|
2019-01-10 21:41:55 +00:00
|
|
|
<div class="post-content" id="page-secondary-actions">
|
|
|
|
{{{secondaryactionshtml}}}
|
|
|
|
</div>
|
2021-04-28 21:58:51 +00:00
|
|
|
{{#html-categories}}
|
|
|
|
<div class="post-content">{{{.}}}</div>
|
|
|
|
{{/html-categories}}
|
2018-08-08 19:16:37 +00:00
|
|
|
</main>
|
2017-07-12 15:12:40 +00:00
|
|
|
{{>footer}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-31 16:59:24 +00:00
|
|
|
<div class="mw-notification-area" data-mw="interface"></div>
|
2021-02-10 23:35:17 +00:00
|
|
|
<!-- v:8.3.1 -->
|