The page actions bar should not show on the following
pages:
?action=history
?action=edit
?action=unwatch
?action=watch
Change-Id: Ib54c332a221d4a1b64064807e693c8882ef97938
This module produces 6 icons:
["clock", "profile"] * ["black", "gray", "white"]
of which only 3 are needed: clock-gray, clock-white, profile-gray.
This patch removes the module and moves the "clock" and "profile"
icons into `skins.minerva.icons.images`. Since that module
does not inline SVG's, the additional cost of adding these icons,
which are loaded at startup, is minimal.
The editLocked.svg icon has also been edited to correct its color.
Bug: T218807
Change-Id: Ib54960eb556dfe0c1ae06d2f73d4f350e519e20f
These code cleanups involves the following;
- Consistency in using single quotes as already been
used in the code base for loading resource loader
test modules.
- Remove irrelevant else cases when there is a return
statement in the if cases.
- Remove passing objects as references as they're already
by default passed by references so no need for &.
- Proper call to getLocalURL() instead of getLocalUrl()
though PHP doesn't really care much about the case but
let's use the function names as they are.
- Fix PHPDoc params, remove useless $skin wrongly placed
in the comment.
The changes in this patch doesn't affect the behavior of
the current system in any way.
Change-Id: I9c886c058592486b7190b9567f79c496855f4ae3
Suppress the redlink drawer for User namespace pages. The redlink drawer
prompts the user to create a missing page but this hinders the usual
workflow for User page visits specifically. A User page is connection to
an account's contributions, age, and other activities and encouraging
the creation of a missing User page when trying to view these
connections is a hindrance, especially if the missing User page is not
associated with the current user.
Bug: T201339
Change-Id: I784493a8ecf28176b5a393cb52d7bfa9fa9b1309
This patch refactors the markup and JS associated with the page actions
menu in order to achieve greater flexibility in its presentation.
The menu items are now positioned via flexbox and rendered using a mustache
template in PHP.
The goal of this refactor is to accommodate both AMC mode and default
mode with the same markup. No changes should be visible for non-AMC
users with this refactor. No changes to AMC mode have been made in this
patch either.
This patch includes temporary workarounds to avoid problems caused by HTML caching.
Changes include:
- Changing the data structure of the page_actions property in SkinMinerva.php
- Passing that modified data structure into a new mustache template, PageActionMenu.mustache
- Adding new CSS for the new page actions menu HTML
- changing the query selectors in JS to match the new markup
- Making the JS-modified page-actions compatible with the new markup
- Keeping existing CSS and JS to avoid breaking cached HTML
Bug: T213352
Depends-On: I95cf726c4b6d8c3895a26aa6e07f4b1747ee30fe
Change-Id: I5a7d73b20617cb3c6d6379084ac4bea23ec3bc74
In T214724 the talk tabs were removed from the main page in
AMC mode, however this also removed the talk button
altogether in AMC mode. This updates the logic.
Talk tabs are also
removed from the talk page for the main page
as the tabs come as a pair.
Bug: T214724
Bug: T216514
Change-Id: Ic7d54e323d9428fa222e27a86ec2f9d61ae1e5f5
Even though on most pages the tagline is empty, it still
has a bottom margin associated with it. This patch moves
that bottom margin into a container element that wraps
both the h1 and tagline.
This approach allows us to remove the bottom-margin from the tagline
as well as the top-margin from the AMC tabs in favour of just
one bottom margin on the .page-heading element.
Bug: T214195
Change-Id: I67d3938ab4a75f994acc28a8eefdf19e531c1f3d
I have decided not to worry about cached HTML.
Some pages will display the links inconsistently, but that's
okay.
Bug: T214697
Change-Id: I16f0f999f915aed8316d8a9b4fbbed9a2971d59e
This is no longer needed when Varnish cache has cleared (About a
week from I7e989a3d4553eb3357598a5cad3ccebf51dc9fae being deployed
Bug: T212216
Change-Id: I1afb68f68cc90d89c442907426bd046ddc68f488
- Move page issue view components that do not modify the DOM during
during construction to PageIssueLearnMoreLink.js and PageIssueLink.js.
PascalCase is used optimistically for filenaming in the hopes that
these functions can become something like a JSX component. A "new"
function prefix is used in the meantime.
- Move page issue view logic that munges the existing DOM to
pageIssueFormatter.js. Substitute "create" prefixes for insert so that
clients won't forget that calling the function is a modify operation.
Alternative naming welcome but it shouldn't be confused with more
idealistic components that do not depend on DOM state for
construction.
- Consolidate createPageIssueBanner() and
createPageIssueBannerMultiple() into insertPageIssueBanner() as the
code was quite similar and were it a true component, it would probably
be a single component.
All new files appear under page/ to keep their distinction from the
overlay code clear.
Some view logic remains in pageIssues.js but it shall be difficult to
isolate.
Bug: T212376
Change-Id: Iccce709c34fa8de5a28a5a00098add5775e3dc9a
A new feature/skin option is added that is enabled safely inside
a MobileFrontend available/unavailable hook that changes the skin
to place talk tabs at the top of the page.
These new talk tabs purposely show on the main page, user page
and standard pages and do not show on special pages.
Depends-On: Ie1a583657176acc6f7046c569c2e94fa2f72ff93
Bug: T212216
Change-Id: I57b70cd325666a287678dc897159b5bf9d089b78
These modules can safely be merged.
Since skins.minerva.scripts.top is added via addModules to the HTML it must
be marked as deprecated and remain temporarily as a redirection to skins.minerva.scripts
All modules have been renamed to be in there new home - no deprecation notices are needed
as they are not used outside Minerva.
I leave skins.minerva.mainMenu.styles as it is used by Special:MobileMenu
and needs to continue to do so.
Change-Id: Ie919151630f4389f8e84e808bec003a6d3d07bd9
This was causing lots of problems with the AMC design and seems
unnecessary. It dates back to tablet support added in
I14c8182473c9508ffc38a8d5baf114bcb016a35f in 2014. This no longer
appears to be needed for tablet.
Changing the HTML means we need to be careful about Varnish cached
HTML with new styles. To avoid UI regressions we use a new temporary
class heading-holding--new which will be removed as soon as possible.
The no-page-actions modifier is no longer needed given the new heading
holder doesn't care what's inside it.
Bug: T212216
Change-Id: I7e989a3d4553eb3357598a5cad3ccebf51dc9fae
Main pages do not have page actions, yet the header always adds
bottom padding to compensate for the fact that page actions are
absolutely positioned.
a new class is added adopting BEM notation that informs the client
that no page actions are going to be visible. In conjuction to this
we strip the relevant HTML from the DOM.
Bug: T212216
Change-Id: Ib69991e91160ba7e2ca3beca4475c2a06c4b9cd3
Restore prebodyhtml which was removed in
41b59d4a2b
by mistake in the process wiping out all Wikivoyage banners
on mobile
Change-Id: I6c31363d682ea4a714942fc9f94a9c85e1a8b9d9
From now on we'll make use of ConfirmEdit's styles.
Depends-On: Ic3a8c2cfce92659d5efc4da8799613afba544cea
Bug: T213775
Change-Id: I0a602a20178998ae997b6e5498b6548610936acd
No need for 2 modules that are both loaded on every page load
Provided consumers are loading skins.minerva.base.styles they will
continue to get the same CSS. If any consumers exist that load
skins.minerva.base.reset but not skins.minerva.base.styles they will
need to use their own css reset file
(e.g. https://meyerweb.com/eric/tools/css/reset/)
Change-Id: I599e6d5a84b311cb3bb2da197da1b688e0e6b9d4
This module is unnecessary - it's loaded unconditionally on a page.
Instead bundle the related CSS inside skins.minerva.content.styles
Change-Id: Ieb37d63332ff5b0cf39835b64cc9f0dcaf62c34f
Right now the HTML construction is split between MinervaTemplate
and minerva.mustache
I'd like to move all of this to mustache to make it easier to see
how to make changes.
Additional changes:
* footer-site-heading-html was previously mapped to headinghtml
The template variable has been renamed to avoid confusion.
Change-Id: I1dfe15f6f74b51b152c206e2ea63ae460d704ab6
The Special:Nearby page is only available if wgMFNearby is
enabled so the first 2 checks are identical.
If the page is enabled, we should be able to assume the
sysop knows what they are doing and avoid all these
unnecessary checks. It seems foolish to also check the
existence of Geodata or a NearbyEndpoint
Additional change:
* Don't use deprecated SpecialPageFactory. Use the service
instead.
Change-Id: I3a4b8fa55fc7f29c90f7173d1d973d5f4f759a6b
This experiments with making PageIssuesOverlay an Overlay with
various options.
The appending of children is a little messy and points at a need
to standardise this some way
(see https://phabricator.wikimedia.org/T209647)
TODO:
* Remove the iconString property on PageIssueSummary which is no longer
needed
Bug: T209647
Change-Id: Iadd798a820dca6bbb31edc9a8570b6db7aac237a
The DownloadIcon is reduced to a factory function that
returns an instance of Icon
Depends-On: I4d703eef68d51bbe0b03579c5cca0845e17b8c9d
Depends-On: I4a4129b2cac7c7c49559beef0b8780f3211edf9c
Bug: T205592
Change-Id: Ib87390d17bef6f50842f52cd84c9ce2b162aaff0
* New feature/skin option is added and value is read inside
the pageIssues setup code
* issues-group-a class is added to page on server side to remove
the flash of unstyled content
* issues-group-A class is dropped (it's not doing anything!)
* The minerva-issues flag will now accept any value to avoid confusion.
It is used to override the default setting of wgMinervaPageIssuesNewTreatment
A note has been added that this can be removed in future.
Bug: T206179
Change-Id: I3d98fd8f8e1adc818ea03589d2c8f68fe991e861
Added in MobileFrontend in Iaaed72c32b9c4f4e15c320b79e29e9af3609069a.
(The module's name is included in cached page HTML, so to avoid
breaking them, 'skins.minerva.editor' must temporarily remain as an
alias for 'mobile.editor'. It is otherwise unused and can be removed
after caches expire on Wikimedia wikis.)
Depends-On: Iaaed72c32b9c4f4e15c320b79e29e9af3609069a
Bug: T198765
Change-Id: I52c4e0941dcf8f176e3ac32d8a1f72a0f8e1d6a6