Commit Graph

1999 Commits

Author SHA1 Message Date
jdlrobson c0ccbcb6f8 Prefer local data to parent data (attempt 2)
There was some confusion during the code review of
4dbe4076d6

In the case of array_merge, anything defined as the second parameter
with the same key as the first will override the data in the first. This
means the current situation is that parent data replaces any local data.

However, we want the local data to be preferred.
Specifically, the call to  $this->getFooterData() must override
the data set parent::getTemplateData. This is not happening with the current
ordering.

Without this change, Ib2af1f72c0508870b20321dffc8af2158d0dbd55
will result in the footer not rendering.

Bug: T262730
Change-Id: Iaf701c054314f210e40a82b5277e9914edccc493
2020-09-29 22:20:09 +00:00
jdlrobson 1982411128 Make VectorIsSearchInHeader the default
The configuration is not dropped as the A/B test has not been completed
yet.

Depends-On: I24e672e86af6fdbedf615d8159dd6ca5f578066a
Change-Id: I6228d34560d036a0dbbe9b506388f85dbb9b6949
2020-09-29 22:15:14 +00:00
jdlrobson 711a41812a Use newly available Skin::getPortletData method to get mw-portlet class
Kept as simple as possible for now. The new class is added but no classes
are removed. This will be done in a follow up.

Bug: T256897
Bug: T253938
Change-Id: Ib31a9d8f2ac14e63b63e82abd4a9aa1fcb956f45
2020-09-29 00:09:26 +00:00
jdlrobson 4dbe4076d6 Prefer local data to parent data
The + operator will drop any existing keys. The data from
Vector should have precedence as the data coming from core may be
in a different format.

Noticed while upstreaming data for footer.

Change-Id: Icc772733577e0b165acdbc8a9b6143bd5410c33a
2020-09-29 00:09:15 +00:00
jenkins-bot c9645fe691 Merge "Prevent Vector tabs from overlapping search loader" 2020-09-28 13:31:09 +00:00
Jan Drewniak 422955e160 Prevent Vector tabs from overlapping search loader
Bug: T254695
Change-Id: I8391407b8efa5b8165f8b2c33de8849de642ecb5
2020-09-28 12:15:13 +02:00
Translation updater bot 1d5ea3259a Localisation updates from https://translatewiki.net.
Change-Id: I2f4d22f294dd6146a79ecd4a3f497df558a71f5a
2020-09-28 08:33:45 +02:00
jenkins-bot 26e914dd22 Merge "[Storybook] Fix PNG/SVG asset resolution." 2020-09-25 18:35:56 +00:00
jenkins-bot 0b63179fb5 Merge "SearchBox: Fix data-search-loc attribute" 2020-09-25 16:26:12 +00:00
Sam Smith 58c1c9ddf5 SearchBox: Fix data-search-loc attribute
Following on from I0edbd89, set the data-search-loc attribute to
"header-navigation" for legacy Vector.

Bug: T256100
Change-Id: I113c56ac9b18df46ebc13b9985aea03ba82419bd
2020-09-25 14:42:08 +01:00
Jan Drewniak 6907c81a15 [Storybook] Fix PNG/SVG asset resolution.
Fixes the missing images in the Logo story.

The current method of downloading the images into
docs/ui/assets and treating them as static assets
(with the start-storybook -s option) could be problematic
if that directory is deleted or "cleaned" before the
storybook build.

Instead, the images are now downloaded into
./storybook/resolve-imports and imported explicitly in the
code in Logo.stories.data.js.

* ./storybook/resolve-less-imports renamed to resolve-imports
* .gitignore is updated to reflect that
* Webpack config is updated with the `resolve-imports` path
* static option (-s) is removed from npm start script
* Images are explicitly imported in Logo.stories.data.js
* Type definitions are added for .svg and .png files

Change-Id: I242d229242c86a5784d6d4611d0b9c7049712dac
2020-09-25 12:52:05 +02:00
Translation updater bot 4d80e9e477 Localisation updates from https://translatewiki.net.
Change-Id: I8546964fd1a3f679b83fea2db9b61aca0f5aa949
2020-09-25 08:23:23 +02:00
Translation updater bot e7c07665ff Localisation updates from https://translatewiki.net.
Change-Id: Ib7f1d8671577402a1743e7076b11972b3de1a5e6
2020-09-24 08:32:00 +02:00
Ammar Abdulhamid ef45378c01 Remove ULS extension hack and anon placeholder code
The anon placeholder is now provided by core. The styles will remain to
style it to suit Vector needs.

This ULS hack is no longer needed as the extension is already using array
plus operator which does set union, so it only appends the right-hand array
to the left-hand array. Some string concatenation that prevented it from
working correctly has now been resolved by Ice379cd in core.

Bug: T263382
Change-Id: I5691529ab8c59f4053cff38ea6f7dd01c326c074
2020-09-23 21:23:04 +01:00
jenkins-bot 57e069ba81 Merge "[styles] Make Trident workaround value a variable" 2020-09-22 15:06:25 +00:00
Translation updater bot 76bc064ed4 Localisation updates from https://translatewiki.net.
Change-Id: I4d92792ab187523ce84edd1bc110795cd8c375cb
2020-09-22 08:37:00 +02:00
jenkins-bot b0bdcedb7e Merge "Follow-up I673c28c2: Only apply clearfix to main content area" 2020-09-21 22:04:54 +00:00
jenkins-bot 3990781dd2 Merge "Allow for expansion of styles with addition of table of contents code" 2020-09-21 21:29:59 +00:00
jdlrobson 155a3bb242 Allow for expansion of styles with addition of table of contents code
Bug: T252774
Change-Id: I98b7e49b8a3bcba31284385d2f45e0164df2fbb4
2020-09-21 21:06:02 +00:00
jenkins-bot 05b6753937 Merge "Clarify documentation of SkinVector::__construct()" 2020-09-21 21:04:00 +00:00
Ammar Abdulhamid cf895f19e2 Clarify documentation of SkinVector::__construct()
With I5772eb7 merged in core, it's no longer accurate to say that the
$options param is optional.

It's important to note this now, before someone report it as a bug.

Since the method is a public API and technically does not require a
parameter, no one will expect that following the rules (providing no
argument, as in `$skin = new SkinVector`) will throw fatal exception.

Bug: T262233
Change-Id: I771e5cc8ff205943016a26854da18088817b9238
2020-09-21 16:59:04 +00:00
Ed Sanders 21d4716612 Follow-up I673c28c2: Only apply clearfix to main content area
Bug: T254195
Bug: T263445
Change-Id: I693cd3d4d32501a2a4ab20140a662943fba22bb6
2020-09-21 13:23:48 +01:00
jenkins-bot a69323a9df Merge "Vector should use opt-in policy for ResourceLoaderSkinModule features" 2020-09-21 09:33:16 +00:00
Translation updater bot abe9d22306 Localisation updates from https://translatewiki.net.
Change-Id: I309fd1c2ca164a017f9532c5d916286a60caaa97
2020-09-21 08:33:30 +02:00
jdlrobson 5095b5c2f1 Vector supports language variant logos
Given I7184f2f5dd7fdb49fb928265bbf711ef9fd555c9 we can now
use the data generated by core which has the benefit of being
configurable per language variant.

Bug: T261153
Change-Id: I7a77f164da53c362da225ae3d13635f9ddca529f
2020-09-18 10:59:23 -07:00
jdlrobson dbf5d7084a Tests: `name` option is now required
Since SkinVector provides name via skin.json the name must be
passed in the test constructor.

This will be required as part of
I5772eb760e4fc56d2062a333ba4d7ca6995f3db2

Change-Id: I4087deb8b0726c9959ac15d77a0ed2442e4890f6
2020-09-18 08:55:45 -07:00
jenkins-bot 7a7f80c09a Merge "SearchBox: Add data-search-loc attribute" 2020-09-17 18:46:42 +00:00
Sam Smith 7cbc30ebac SearchBox: Add data-search-loc attribute
The mediawiki.searchSuggest protocol part of the SearchSatisfaction
instrumentation reads the value of an element with the "data-search-loc"
attribute and sets the event's inputLocation property accordingly.

Set the appropriate value for the attribute in
SkinVector::getTemplateData and render the attribute in
the SearchBox.mustache template.

Bug: T256100
Change-Id: I0edbd8906a042072b2055adc2889b083b2c6cac4
2020-09-17 18:24:24 +00:00
Volker E f9821b508d docs: Expand on curl options in Storybook setup script
Change-Id: I7bba4773d27e17e42f2670242f226517e24b33d8
2020-09-17 03:07:41 -07:00
jenkins-bot 6d62be5a3f Merge "Fix the storybook instance" 2020-09-17 09:04:41 +00:00
Translation updater bot ae8f980ed6 Localisation updates from https://translatewiki.net.
Change-Id: I76f0d2e13aa3d03ed74ff02ab3e9b1c3b942efe2
2020-09-17 08:35:20 +02:00
Nikki Nikkhoui da158807b6 Use setTemporaryHook() in SkinVectorTest
The MediaWikiIntegrationTestCase::setTemporaryHook() function was
recently updated in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/622400
to work with the new hook system. Use the new function in Vector tests, as
some extensions that use the new Hooks system are failing to pass the Vector
tests that run in their Jenkins CI tests
(https://gerrit.wikimedia.org/r/c/mediawiki/extensions/examples/+/603569).

Bug: T254381
Change-Id: If8289b2bf47a35140e2fef72234ffad7aae37c90
2020-09-16 23:17:07 +00:00
jdlrobson 34e70d44fc Fix the storybook instance
* Use `cp` over `ln` - the node resolver appears to
get tripped up by linked files.
* Fix a story referencing the wrong class

Follow up to I47da3046678117d5214354d1efe635f32f307dad

Bug: T263064
Change-Id: I80cb33ad70f9e6757dbe7f71b00539bec28abca9
2020-09-16 22:13:34 +00:00
DannyS712 76ee2c2813 variables.less - replace tab with space
Change-Id: Iaaa22d4f727892b0240360e6452d91b191ba87e8
2020-09-16 21:29:20 +00:00
Timo Tijhof 7e0731de48 Implement mediawiki.skin.variables.less for Vector
For now, only define:

- @font-family-sans
- @border-radius-base

Bug: T112747
Depends-On: Icf86c930a3b5524254bb549624737d3b9dccb032
Change-Id: I47da3046678117d5214354d1efe635f32f307dad
2020-09-16 08:39:13 -07:00
Translation updater bot aa9d46f937 Localisation updates from https://translatewiki.net.
Change-Id: Ie025d7be618d1878eee42485f82ba95dea846200
2020-09-16 09:12:14 +02:00
jdlrobson 7f801afa07 Vector should use opt-in policy for ResourceLoaderSkinModule features
Bug:  T252774
Change-Id: I50afd035360ff2eccd5a934a02a218d093f9583d
2020-09-14 15:20:07 -07:00
jenkins-bot 3bc308039c Merge "Make max-width the default for modern Vector" 2020-09-14 20:55:35 +00:00
jdlrobson 7449c7fdf6 A/B test of search in header for logged in users
A new config flag is added that buckets 50% of users into the old
header and the 50% into the new header.

Bug: T249363
Change-Id: I8b4fa475f9cd7e61ad2989e2a1485e7e64c8ab3f
2020-09-14 14:22:46 +01:00
jenkins-bot d72b0daa24 Merge "Use feature management for search in header" 2020-09-14 12:50:16 +00:00
Translation updater bot 8780a080f1 Localisation updates from https://translatewiki.net.
Change-Id: I8410528f5bc8a9bf45198e08606a7f1b4d22acd0
2020-09-14 09:22:58 +02:00
jdlrobson c8642b2fbe Use feature management for search in header
This will allow us to add the A/B testing requirement for logged in
users.

In preparation for the new A/B test requirement, a custom requirement
is added as the feature management system does not
support OR operations and the desired effect is the case where:

* the SearchInHeader feature flag has been enabled
* OR the SearchInHeaderABTest feature flag has been enabled and the user is bucketed

Bug: T259250
Change-Id: If948603bd598e1b5597345f4268736417f4c3a24
2020-09-13 23:00:16 +00:00
Umherirrender db254ab4b3 Remove trailing spaces from json
Change-Id: I2aa33372d47efb9b797df534eacb724a65da10f7
2020-09-11 22:50:04 +02:00
jenkins-bot e7d3728666 Merge "Fix order of expected/actual in SkinVectorTest" 2020-09-11 16:49:08 +00:00
DannyS712 837f529177 Fix order of expected/actual in SkinVectorTest
* expected is the first parameter not the second.

Change-Id: I825b10154ab59a754cdce400a4a0aa273747ae15
2020-09-11 16:29:08 +00:00
jdlrobson 9b31740514 Reduce max-width and adjust margin-left
* The margin-left should only be auto at small resolutions - otherwise on large
monitors it becomes visually separated from the logo
* the margin left should be larger
* and max width should be smaller.

Bug: T261686
Change-Id: Ia1331f51764a34f113e3336735e6cfd5fde1d49d
2020-09-11 14:54:58 +00:00
Translation updater bot 8a4e390be4 Localisation updates from https://translatewiki.net.
Change-Id: I8071dbefa6504cee8dc9382545385ec5c8c29ce1
2020-09-11 09:42:00 +02:00
libraryupgrader 1f385f74ad build: Updating node-fetch to 2.6.1
* https://npmjs.com/advisories/1556
* CVE-2020-15168

Change-Id: I6590e57425546f93589838288844d0a2dcf7095b
2020-09-10 23:28:46 +00:00
jdlrobson 905ad68bc2 Make max-width the default for modern Vector
Drop max width feature flag.
Max-width will continue to not apply on special pages.

This saves us development effort by not needing to worry about
the case where the flag is not enabled. This flag is not false
in any production wikis.

Change-Id: I7ace4046e6b93ce63dd804da32e576a709485bfb
2020-09-10 20:14:38 +00:00
Jan Drewniak df3954eff8 [IE9] Layout flex-box adjustments
Minor visual fix for IE9 for modern mode with search not in header.
i.e. with these settings:

    $wgVectorIsSearchInHeader = false;
    $wgVectorDefaultSkinVersion = 2;

Slight refactor of CSS. Removes block of styles that "reset" floats.
These were uneccessary because as flex-children, the floats were
ignored on those elements anyway.

Moves flex-wrap on .mw-header from layout-search-header.less
to layout-default.less since that's where display:flex is defined
and the rule is general enough that it should apply for different layouts.

Remove the @supports block with the `float:none;`. That is unnecessary
because flex-children are not affected by floats.

Change-Id: Ida3d2a7bc2b2f70238129df876714228fe5cdf84
2020-09-10 20:10:19 +00:00