Commit graph

1526 commits

Author SHA1 Message Date
DannyS712 6ac9079202 VectorTemplate: SkinTemplateToolboxEnd hook isn't deprecated
Bug: T252906
Change-Id: I6eedc41d02b9f64cefb9c8d749226489ada6aae2
2020-05-15 20:56:24 +00:00
Stephen Niedzielski 0fac9045ac [dev][Legacy] split sidebar Mustache and Less
Split out the sidebar in advance of significant Latest mode only
changes.

The Less split was made by adding a new Sidebar.less file that imports
the Legacy implementation.

The Mustache split was made by file copying the existing implementation
into a legacy/ subfolder. Both the Legacy and Latest implementations
were then stripped of templates not applicable to their modes.

These changes are aligned with the splits for JavaScript.

Bug: T246419
Change-Id: Ib82769ea16bfc09efe8a088220aab55bdde0d381
2020-05-15 18:05:30 +00:00
jenkins-bot 9d9ed35629 Merge "Show empty language portal if HTML has been added after portal" 2020-05-14 23:05:32 +00:00
jdlrobson 4086d850e5 Show empty language portal if HTML has been added after portal
Bug: T252800
Change-Id: Iefe0ed2728b6fd08da8f3e58edbfaae7d27d1a2d
2020-05-14 15:25:38 -07:00
Volker E 3cb19a771e Increase footer font size slightly to 12px
Up from `11.2px` in order to address possible legibility and
accessibility issues.

Bug: T252267
Change-Id: I6f3564c065eae25ed2386c15e64bfa6e0cea311c
2020-05-14 15:19:50 -07:00
jdlrobson 0846c8463d Allow plain text labels in side bar
Follow up to I2549af3e24e5d51c09e9a88ca50a0d9b2e154c3f

Bug: T252727
Change-Id: I91e6e535e2da672b41d31cee709084beb87af47a
2020-05-14 08:23:49 -07:00
Volker E de788c6446 [dev] Remove white-space attribute from personal menu
Removing `white-space` on `.vector-menu` as we couldn't find any
use case of this any more and it's breaking DRY-ed up Menu in portals on
modern Vector.

Bug: T252717
Change-Id: I87a64e64c02a6690a7ecea93ce7712619457d575
2020-05-13 15:22:10 -07:00
jenkins-bot 4fb5f4e903 Merge "Show half-star when the page is temporarily watched" 2020-05-13 19:28:16 +00:00
jenkins-bot 8950f60eba Merge "[modern] Center the logo tagline beneath the wordmark" 2020-05-13 17:55:37 +00:00
Translation updater bot 640c894a71 Localisation updates from https://translatewiki.net.
Change-Id: I8bbe21385d98372dbc56845e8ce77ffad40d7452
2020-05-13 08:44:57 +02:00
AronDemian 450f7d237a [modern] Center the logo tagline beneath the wordmark
Bug: T252430
Change-Id: If16fa9e70c52a8cb51b4f297d0ed7db8e72cebcb
2020-05-13 05:33:49 +00:00
jdlrobson e048c2a729 Refactor: Simplify and standardize menu definitions
* Standardise the menu markup. This means all menus in Vector will now
be wrapped in a div and will have a heading.
* All menus now have the vector-menu class. Styles specific to personal tools
are moved to layout since these are concerned with placement.
* The ul class will always have menu class.
* emptyPortal class is generalised into vector-menu-empty for consistency
with other classes and moved from common.less into Menu.less
* Standardise hooks - BaseTemplateAfterPortlet can now be run on any
menu.

Changes to HTML:
* lang and dir attributes are moved from the h3 up to the div element
.vectorTabs, .portal(s) and #p-personal now has hidden span element inside h3
* for non portals ul.menu" is now wrapped in a div.vector-menu-content

This change does impact the following CSS selectors which will need to be updated:

I see no matches for these selectors in code search.

```
 #p-variants > ul
 #p-namespaces > ul
 #p-personal > ul
 #p-views > ul
 #p-cactions > ul

```
Using global-search.toolforge.org I see one match
for p-variants, 26 for p-namespaces, 30 for p-personal,
36 for p-views and 7 for p-cactions. I see this as acceptable
breakage provided a user notice is sent out which it has been
(T252447)

Bug: T249372
Change-Id: Id59234aa6b822a24848386bdc04d8d7ed37ca145
2020-05-12 15:17:38 -07:00
jenkins-bot 4e661112e8 Merge "[dev][Legacy][JS] Split Legacy mode JavaScript into new ResourceLoader module" 2020-05-12 22:05:18 +00:00
Stephen Niedzielski 14abeb0c2f [dev][Storybook] move to start script; report errors not status
Storybook seems to be our primary stackless development workflow. Move
the `storybook` script to `start` to support the standard `npm start`
command expected in every NPM repo.

Debugging Storybook tooling is the rare case that informational messages
(perhaps even more verbose than default) are wanted. Feature development
is the common workflow that should be optimized for.

Storybook's design philosophy seems to favor incredibly verbose output
by default, both for the CLI and the [browser console]. This is at odds
with Unix's rule of silence, sometimes expressed as "silence is golden."
That is, only report warnings and errors unless told otherwise.

This patch reduces the verbosity of the Storybook [CLIs] as able and its
setup script:

- Only report warnings and errors while building.
- Suppress build informational output when launching.
- Only report curl errors, not progress.

[browser console]: https://github.com/storybookjs/storybook/issues/8461
[CLIs]: https://storybook.js.org/docs/configurations/cli-options/

Change-Id: Ie38ae14e304f7f88f445c0c0fb3f2fbba49d134a
2020-05-12 13:42:01 -07:00
MusikAnimal ca71f762fa Show half-star when the page is temporarily watched
Bug: T248495
Depends-On: I61b24fddf6aaf5233f426602bfa1cc4fafce942b
Change-Id: I712af9a0646d22c3b7873bbf77dba363c5770181
2020-05-12 00:06:16 +00:00
Volker E 9581bdaa09 Revert "Use semantic HTML5 elements where applicable"
This reverts commit 125af06692.

Change-Id: I21fa5460017235c43f6ccf0ce815364d50bf1e34
2020-05-12 00:05:30 +00:00
jdlrobson 4679efc000 [build] Disable phan rule (for now)
This unblocks reverting HTML5 elements.
A longer term fix is brewing in
If6b10b0ddcbd4b21dd13a2813e60b604c3a23415

Change-Id: I85659d22dc2f2a803c2a7b1e57033b18900353df
2020-05-11 23:09:24 +00:00
Stephen Niedzielski 108393daf1 [dev][Legacy][JS] Split Legacy mode JavaScript into new ResourceLoader module
The collapsible sidebar adds a new JavaScript dependency and behavior to
Latest mode only. There are a number of ways of to make the deviation
but we think now is the time to start splitting by module.

This patch adds a new ResourceLoader module, skins.vector.legacy.js, and
moves the existing JavaScript into it. The old module, skins.vector.js,
has been given a currently matching index.js entry point that references
the collapsible tabs' files by reaching across directories. It's not
quite ideal as usually ResourceLoader modules and directory structures
strive for 1:1 correspondence but this patch makes the bold assertions
that it's better than a file copy, better than a new
"skins.vector.common.js" ResourceLoader module, more compatible than a
symlink, and the existing jQuery tabs implementation will eventually be
replaced in Latest mode.

A "Legacy" module was added instead of a "Latest" with the assumption
that active development should generally be considered "latest" and
Legacy an intentional distinction.

Bug: T246419
Change-Id: I9980403f1ee5897c27ac0331f0b51a5bcbdff778
2020-05-11 15:29:56 -06:00
Translation updater bot 185d9b28df Localisation updates from https://translatewiki.net.
Change-Id: If61268a2a60aa54f08445d58f9967eb7d85e2505
2020-05-11 08:41:47 +02:00
AronDemian c42739a200 [legacy] Merge 'background-gradient.less' into 'layout.less'
Bug: T249073
Change-Id: Icb4ef65fbc72b5793061d97194ef4b88836c0fe2
2020-05-08 20:05:56 +00:00
AronDemian 015bfa74d9 [modern] Move up color and background-color rule from content to body
Bug: T251583
Change-Id: I93e4ef82210e0f8c559f4476480a3c3b0b6474c8
2020-05-08 20:05:46 +00:00
Nicholas Ray 2a7dc60cc4 Remove stray quote from logged out menu story
This stray quote has been bugging me for hours if not years. I thought
my monitor had a speck of dust on it, but it turns out it is simply a
misplaced quote.

Change-Id: I93b408eb22830590d1f06ff5326cee9be0f5330a
2020-05-08 13:20:43 -06:00
AronDemian b4ce8210ca [modern] Drop the background gradient
Move content border rules to layout (will be removed).

Bug: T251583
Change-Id: I28b7a3fdd3f89a0aef93e64c1ae12f39ae430e66
2020-05-08 18:25:31 +00:00
jdlrobson ace1ffaba1 Minor: Remove unused Portal.mustache
Should have been removed in
I2549af3e24e5d51c09e9a88ca50a0d9b2e154c3f

Presumably got readded while addressing a rebase conflict

Bug: T249372
Change-Id: Iaff98d8b4770e82277463f39800dd7571e1ed50b
2020-05-08 10:05:18 -07:00
jenkins-bot 60a13aa4ac Merge "Don't "break" the variants by breaking early" 2020-05-08 15:29:49 +00:00
AronDemian b0281fa450 Add CSS class on body to mark the skin version
Adds class 'skin-vector-legacy' for legacy layout.

Bug: T251648
Change-Id: I52938689fc7d99a710510349aaa573a87864a367
2020-05-08 16:30:26 +02:00
jdlrobson 01dbda42ca Don't "break" the variants by breaking early
Hope you enjoyed the pun, as this is an unfortunate bug to have
slipped into production.

While previously we breaked after finding the selected items
prior to I098e6921e8f7ef65dacacf09b9c25f70c945e58e we shouldn't do
that any more as we're using the same loop to iterate through and
generate our items!

Bug: T251521
Change-Id: I92c28e8fba684d7977dfd207ff939ac07a7a07af
2020-05-08 07:21:59 -07:00
Translation updater bot 36f68d37d3 Localisation updates from https://translatewiki.net.
Change-Id: I59b8b5ba7fd6aef5c14220393166d78e2a351d1c
2020-05-08 09:30:13 +02:00
jdlrobson 9f2ca0d072 Refactor: Portal is also a Menu
To complete the refactor, the Portal is also refactored
as a Menu using the getMenu function.

An old code path supporting portals outputted by hooks with
strings is marked as deprecated to simplify this code in future.

array-portals-first -> data-portals-first (the value is not
an array)

Changes:
* $this->getLanguages and  $this->getToolbox() always returns an array (see BaseTemplate)
but we previously supported portals made using raw HTML. Let's move away from that
behaviour and deprecate it.
* Hooks are moved into buildSidebarProps and marked as deprecated where possible
(SkinTemplateToolboxEnd). SidebarBeforeOutput can be used instead.

Bug: T249372
Change-Id: I2549af3e24e5d51c09e9a88ca50a0d9b2e154c3f
2020-05-07 16:56:59 -07:00
jdlrobson e4a4050b81 Organize CSS by common, layout, typography and components
Moving styles from the existing styles to common/layout
or components stylesheets they should be associated with.

Components are identified using PascalCase. Lowercase names are used for things
that are not components. This distinction should help us reason with the code
better and make it clearer where CSS belongs, saving us lots of wasted
effort discussing conventions.

Patch isn't making actual CSS changes themselves - for testing purposes this
should be a NOOP.

In preparation for the gradient removal,
'background-gradient.less' is marked as legacy.

Merged 'externalLinks.less' into content.less, they belong to content.

Bug: T249073
Change-Id: I8dbc29b7a19f7613b57b0984a8befaeae9c08798
2020-05-07 22:57:13 +00:00
jenkins-bot 6f57028553 Merge "Use semantic HTML5 elements where applicable" 2020-05-07 22:14:50 +00:00
jenkins-bot 85e162caea Merge "Class names with hyphens preferred over camel case" 2020-05-07 22:12:51 +00:00
Volker E 125af06692 Use semantic HTML5 elements where applicable
Also remove superflous `role` attributes in modern Vector. Only leaving
`role="contentinfo"` on `footer` to address a known VoiceOver bug.
And leaving `role="main"` in legacy Vector due to possible old
Internet Explorer and screenreader combinations, which we can
test specifically for with this separation.

Bug: T66477
Bug: T252090
Change-Id: I422ef2a4cf7aa94e5cac4d95efb4b2d2c8c6617d
2020-05-07 14:45:35 -07:00
jdlrobson 4dfe4a97c9 Class names with hyphens preferred over camel case
The classes were recently changed so provided this is merged before
next branch cut no need to worry about cached HTML.

Bug: T249073
Change-Id: Ib20c7a359bda858df89ebb245e682d321dd5acd0
2020-05-07 14:43:13 -07:00
jenkins-bot c913a7ee23 Merge "Remove #footer selectors now that cache has expired" 2020-05-07 18:44:54 +00:00
Translation updater bot 0ac61e7ae5 Localisation updates from https://translatewiki.net.
Change-Id: Ie5ef3a30a952cca610b64436ac424ed65ef5988b
2020-05-07 08:37:24 +02:00
Volker E 9934783544 Remove #footer selectors now that cache has expired
Following-up Ica9f8c43617c624648fa12dc86ebb3daa10f0409.

Change-Id: I6f698ff98b9c474085bf7370ecaa78db3a3617e8
2020-05-06 18:55:50 -07:00
jdlrobson 9cd47c5339 Refactor: VectorMenu merged in to Menu
Bug: T249372
Change-Id: Ifaf78b507c12aa251228213c89751cbb4d111d9a
2020-05-06 16:09:22 -07:00
jenkins-bot 397da708e1 Merge "Refactor: Merge VectorTabs into Menu" 2020-05-06 22:54:46 +00:00
jenkins-bot 688ea75bfa Merge "Refactor: Generalise personal menu" 2020-05-06 22:31:13 +00:00
jdlrobson a43e79c1d3 Refactor: Merge VectorTabs into Menu
Bug: T249372
Change-Id: Ib6ae191b31564dc23a3b1d6aedf48cbaaad006af
2020-05-06 10:23:58 -07:00
Translation updater bot 718d0fe312 Localisation updates from https://translatewiki.net.
Change-Id: I577e47ec7c2f205d273443e34bebccf4b8950f7d
2020-05-06 08:34:34 +02:00
jdlrobson a3bb097cf8 Refactor: Generalise personal menu
the PersonalMenu should be generalised. In future we will use it as
the template for all menus

Bug: T249372
Change-Id: Id1c43d2e9eefef1d7aec45f0137e27f10ad935df
2020-05-05 17:34:44 -07:00
jenkins-bot 4086a4c824 Merge "Refactor: Remove indirection (where alternatives exist)" 2020-05-05 20:34:03 +00:00
jdlrobson 7efe7c3468 Refactor: Remove indirection (where alternatives exist)
The get method while well intended, adds an unnecessary level of
indirection to our code and can't be easily typechecked. Using
the methods directly (which if you review core code, these all
directly map to those methods) makes the code much more of a pleasure
to read.

Bug: T251212
Change-Id: Ibb2a69801d3b004a0a174308d3ac04d1d228807c
2020-05-05 13:07:14 -07:00
Nicholas Ray 91c25bc253 Add title attribute to opt-out link
The opt-out link was missing a tooltip which is important for
accessibility and to help people gain more context as to what it does.

Bug: T250093
Change-Id: Ie6cbaf5c941615d1662700415b8f1823987a563d
2020-05-05 09:52:20 -06:00
jenkins-bot 027af8656f Merge "Tests: Always set Skin" 2020-05-04 19:20:00 +00:00
Stephen Niedzielski 8a915e6829 [config] Temporarily default to Legacy mode
For all accounts, temporarily default to the Legacy skin version. This
is to prevent regressions for third-parties until master has a complete
logo and is in a shippable state. This change should be reverted as soon
as interim changes in Latest mode are finished.

Do these defaults need to be set elsewhere for development?

Change-Id: I3c39352efe276b8574ab5d27fdab22901bc30b46
2020-05-04 07:25:38 -06:00
Translation updater bot 3cba63147e Localisation updates from https://translatewiki.net.
Change-Id: Icd8591c3b3ecd100d27db2825a3134ee5e810f92
2020-05-04 09:19:17 +02:00
jdlrobson 6d9e7c07e5 Tests: Always set Skin
VectorTemplate relies on many of SkinVector's methods. To future
proof these tests we need to set the skin in the mocked object.

Bug: T251212
Change-Id: Ifd9bbc9c909626ecfe8ccd085673bc777423d560
2020-05-02 16:57:04 -07:00