mediawiki-skins-MinervaNeue/resources/skins.minerva.mainMenu.icons
Stephen Niedzielski 0a4f5b6126 [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-07-24 18:24:07 +00:00
..
communityportal-ltr.svg Updating icons for AMC mode 2019-06-07 00:25:21 +02:00
communityportal-rtl.svg Updating icons for AMC mode 2019-06-07 00:25:21 +02:00
communityportal.svg Add Community Portal link to Mobile Main Menu 2019-04-16 11:21:43 +00:00
contributions-ltr.svg Updating icons for AMC mode 2019-06-07 00:25:21 +02:00
contributions-rtl.svg Updating icons for AMC mode 2019-06-07 00:25:21 +02:00
home.svg
login.svg Prefix icons in Minerva 2018-01-19 15:30:03 -08:00
logOut-ltr.svg [UI] [new] add user menu 2019-07-24 18:24:07 +00:00
logOut-rtl.svg [UI] [new] add user menu 2019-07-24 18:24:07 +00:00
logout.svg
nearby.svg
random.svg
settings.svg
specialpages-ltr.svg Updating icons for AMC mode 2019-06-07 00:25:21 +02:00
specialpages-rtl.svg Updating icons for AMC mode 2019-06-07 00:25:21 +02:00
userSandbox.svg [UI] [new] add user menu 2019-07-24 18:24:07 +00:00
watchlist.svg