Commit Graph

1260 Commits

Author SHA1 Message Date
Jan Drewniak 98b70067c9 Replace Grunt tasks with npm scripts in package.json
Adds the following npm scripts:
- npm run lint
- npm run lint:js
- npm run lint:styles
- npm run lint:i18n

Bug: T242781
Change-Id: I0c2cfce73a02029b9d0c4d329309aff477cb02d4
2020-02-27 16:32:12 +01:00
Translation updater bot 2dbb1c1721 Localisation updates from https://translatewiki.net.
Change-Id: I7412b9e9ceac048fff33fa5644708eb7f5707fdf
2020-02-25 08:25:50 +01:00
Sam Smith 19fd1a03dc docs: Generate documentation with Doxygen
doc.wikimedia.org is a helpful resource when iterating on a codebase.
Now that the Desktop Improvements Project is underway, Vector will be
iterated on heavily. Like MobileFrontend, generate documentation with
Doxygen so that it can be published on doc.wikimedia.org.

Note well that:

- The CALL_GRAPH and CALLER_GRAPH statements have been removed as they
  were being set to the default value (NO)

- DOT_FONTSIZE was increased from 10 to 12

Bug: T242779
Change-Id: I7cc2eae2cf950293eee0028873bc6f1c89443977
2020-02-24 16:49:38 +00:00
Translation updater bot a6790169a9 Localisation updates from https://translatewiki.net.
Change-Id: I33f52c4d3fd6ac6023dc4eb1794a0873ffa4d9c7
2020-02-24 08:33:17 +01:00
Translation updater bot 37874d4484 Localisation updates from https://translatewiki.net.
Change-Id: I234921da6b7f95a2983330fd7766ba0457067af8
2020-02-21 09:18:41 +01:00
Translation updater bot e19f6da3e0 Localisation updates from https://translatewiki.net.
Change-Id: Ief8b9f4e7a9271bbe9a754e8e95738a932cf5cbb
2020-02-20 09:05:57 +01:00
jenkins-bot c4dc88114c Merge "Unify user messages for Vector.js and Vector.css" 2020-02-19 22:56:07 +00:00
Volker E 5a4a589916 Unify user messages for Vector.js and Vector.css
Those messages have been untouched since introduction, but should be
unified. They are put on top of corresponding pages like
https://en.m.wikipedia.org/wiki/MediaWiki:Vector.js

Change-Id: Ib40a38dba553bf10070fedf368ba8ea581d2b4b9
2020-02-19 14:10:42 -08:00
Volker E bedb0ea8f4 Remove Webkit search cancel button for cross-browser consistency
Use same code as in MinervaNeue. For unknown reason, Chrome
decides in 2020 to suddenly show search cancel button.

Change-Id: I5c813a2ea68929c05f5d061d46c027934853dbf8
2020-02-18 22:30:19 -08:00
James D. Forrester 1cbb7ee653 Follow-up 2dbe4d7: Stop documenting wgVectorPrintLogo, never read
Change-Id: Ia968e72e1672e9afb4a11ddbfc89ef7e891dc0d3
2020-02-18 13:22:35 -08:00
jdlrobson 2d914d04ea Remove renderNavigation function for readability
The renderNavigation function provides an unnecessary level of
abstraction which I'd argue hurts readability of these functions.
Let's remove it.

Change-Id: Iad1c4db606404fecf4d5ae98981df9f05d3f661e
2020-02-17 22:20:18 +00:00
Nicholas Ray a79bb8dff4 build: Replace JSDuck with JSDoc
* jsdoc.json was copied from Minerva. The markdown plugin from that
config was removed since there no usages of that in Vector.

* Added latest jsdoc dependency to package.json

* Copied 'jsdoc' task from Minerva into Vector. Revised storybook output
so that multiple docs (storybook + jsdoc) could be in /docs

* Made collapsibleTabs.js JSDoc compliant (This was really the only
thing using jsduck syntax)

* Modified Gruntfile stylelinter to ignore docs folder

Bug: T239258
Change-Id: Id07d591ffe7bf0ac021109051e89b91ffdcf4c78
2020-02-14 10:29:00 -07:00
Translation updater bot 1609747972 Localisation updates from https://translatewiki.net.
Change-Id: Ie13d077807d8e7a1a8f9ae52b4908a8249275609
2020-02-11 07:56:02 +01:00
Translation updater bot 0662f28024 Localisation updates from https://translatewiki.net.
Change-Id: Ice0d0138a11cd2ad058f49be4d3492080d206440
2020-02-10 07:57:44 +01:00
Translation updater bot 70eb612824 Localisation updates from https://translatewiki.net.
Change-Id: I2f01a3384e2ab9d1812d582702f63c41f94682b2
2020-02-07 08:48:36 +01:00
jenkins-bot fc3ac16b54 Merge "Add Coding Conventions Section to Vector README" 2020-02-06 21:32:13 +00:00
Nicholas Ray 356c976bb3 Add Coding Conventions Section to Vector README
Although the convention of where to put conventions remains somewhat
contentious, the team's desired conventions for Desktop Improvments have
so far been, for the most part, general and could be useful for any
project our team owns (e.g. MobileFrontend, Minerva, etc).

Therefore, I added/made revisions to the
https://www.mediawiki.org/wiki/Reading/Web/Coding_conventions wiki page
as this seems the be the single source of truth of our team specific
conventions that span across repos.

This commit just links to these changes which follows the same pattern
as Minerva and MobileFrontend.

Additional Changes:

* Added installation section similar to Minerva Skin

Bug: T239269
Change-Id: I41c71fba1228086f1830d8bb0808227b62ebf5cd
2020-02-05 15:26:15 -07:00
jdlrobson 2dbe4d7af1 Drop usage of mediawiki.skinning.interface module in favor of SkinModule
Thanks to the dependent change, the print logo is now provided
in core so we can remove the custom Vector ResourceLoader module

ResourceLoaderLessModule is replaced with a ResourceLoaderSkinModule
and gains the features capability replacing the need for
'mediawiki.skinning.interface' making use of the changes added in
6845912bcf1.

Note that for cached HTML both 'mediawiki.skinning.interface'
and skins.vector.styles will be loaded. We can avoid this
by renaming skins.vector.styles if necessary (but I'm not
sure if we'd want to do that)

Bug: T232140
Depends-On: I00899c16c0325f36b671baf17e88c2b5187b3526
Change-Id: I569e0d800e147eabc7852567acd140108613f074
2020-02-05 10:02:47 +08:00
Translation updater bot 1f53b4c99b Localisation updates from https://translatewiki.net.
Change-Id: I7e0c298c35b405dfe4331a6e6a3046f706f20563
2020-02-04 08:10:46 +01:00
Stephen Niedzielski 9f492ad5c9 [fix] [jsduck] Update config JavaScript path
Bug: T242674
Change-Id: Ic9a2395ae67065bb7efee431edf16ebaa41b231b
2020-02-03 09:43:56 -07:00
Translation updater bot 30217757c6 Localisation updates from https://translatewiki.net.
Change-Id: I59525a36df1902d56da2398b725855d0399c2e3e
2020-02-03 08:03:12 +01:00
jenkins-bot c0e7cff97a Merge "Introduce PHPUnit tests in Vector" 2020-01-31 17:30:33 +00:00
polishdeveloper 09671d768f Introduce PHPUnit tests in Vector
To make it happen, we also need to provide a way to
inject different TemplateParser.

Change-Id: I14d8474a2b52f040b688245cbd5bd6f12dddf846
2020-01-31 16:48:43 +01:00
jenkins-bot 0c27e8deb8 Merge "Add storybook to Vector" 2020-01-31 15:01:44 +00:00
jdlrobson ea2bcd44f2 Add storybook to Vector
- Update package.json with the new dependencies.
- A script storybook.sh pulls down CSS and LESS imports from external
dependencies. This copies the approach taken in Popups and MobileFrontend.
- Icons from external repos are maintained within the repo in SVG-only form.
Using load.php modules is also possible, but will pull down other unnecessary icons
and break if any of these modules are changed. Decided that we should manually maintain
these for the time being given there are only 3 icons.
- Several LESS files now import the variables file. I think it's useful for stories
to only import the CSS they use as this encourages us to modularise our CSS. Before these
imports were not necessary as they inherit imports from index.less. This will have no impact
on the bundle size as the LESS compiler silently discards duplicate imports
- stories/utils.js provides a useful placeholder function for generalising our hook entry
points.

Bug: T242674
Change-Id: I722e84d2fb57653a2f96142dc3e5248043261746
2020-01-31 16:59:15 +08:00
libraryupgrader 2adc7af88c build: Updating composer dependencies
* jakub-onderka/php-console-highlighter: 0.3.2 → 0.4.0
* mediawiki/minus-x: 0.3.2 → 1.0.0
* mediawiki/mediawiki-phan-config: 0.9.0 → 0.9.1

Change-Id: I724524483e1f2071fbc839dcd2274b5f78b5da1f
2020-01-30 20:11:34 +00:00
jdlrobson 12e2287894 Simplify logo generation
Use a template variable only for html attributes of the logo
Move static HTML into Navigation.mustache

Change-Id: If37015b9ce4f37e264b6f25956e4d0ca35e8cdff
2020-01-30 02:11:05 +00:00
jdlrobson 0cdf0c238a Dev: Complete initial porting of Vector to Mustache
Bug: T240062
Change-Id: I18cb1fda6850646a38314a7d2dd356103f04ec28
2020-01-29 13:21:34 +00:00
Translation updater bot 052b26f684 Localisation updates from https://translatewiki.net.
Change-Id: I4eada4bdb013b6401333af5f3711d993f36925f4
2020-01-29 07:57:13 +01:00
jenkins-bot 4d18966973 Merge "Dev: Vector is rearranged like other skins and extensions" 2020-01-28 10:54:11 +00:00
jdlrobson 58457f8ae8 Dev: Vector is rearranged like other skins and extensions
A resources folder is the defacto-standard across mediawiki repos.
Vector now mirrors those by describing where files served by ResourceLoader
are located.

Change-Id: Ib7d8575112e8afaaa84221a6f30a15b34b51eb24
2020-01-28 16:57:38 +08:00
polishdeveloper efe0ec6356 Deprecation: Deprecate Vector specific hooks
Vector provides two vector specific hooks:
 - VectorAfterToolbox
 - VectorBeforeToolbox

Instead of supporting Vector specific stuff we should aim
for a nice global skin api and allow other 3rd party to
extend MediaWiki functionality no matter which skin is currently
on.

Bug: T240062
Change-Id: I245f1316e79f814ba04f4e0a0223d4f0596cf39e
2020-01-24 16:20:50 +00:00
jenkins-bot c46dbb573f Merge "Dev: Break Footer out into template" 2020-01-22 18:54:36 +00:00
James D. Forrester 84a95ae650 composer: Stop claiming this skin supports PHP 5.5+, it uses PHP 7.1+ features
Change-Id: I04429c4754d2c13ade8d84e2bcb129be9c644ac9
2020-01-21 08:45:44 -08:00
Translation updater bot 183fef57cb Localisation updates from https://translatewiki.net.
Change-Id: I6b0254a0fb474c1e4b369a1387632f5f3a993aa1
2020-01-21 08:01:51 +01:00
Translation updater bot eedf2f582b Localisation updates from https://translatewiki.net.
Change-Id: I9bc149025518f06128df77e68135ce5f810d1cb4
2020-01-20 08:05:56 +01:00
jdlrobson 80b5ccc634 Dev: Break Footer out into template
Add a new Footer template for modelling the footer of
Vector.

Bug: T240062
Change-Id: I60a243abeb5650542ca6f6fac8401a622faaabac
2020-01-17 13:10:37 -08:00
Stephen Niedzielski 11d60dd88a [hygiene] [skin.json] simplify BeforePageDisplayMobile hook
Since only one hook is specified for the BeforePageDisplayMobile hook,
replace the array of hooks with the single hook used.

Change-Id: Ic89a262f3fdba93c3ee10387b3b05137ce9dc4ad
2020-01-17 20:08:01 +00:00
jdlrobson 9f82f58ea9 Dev: Include closed body and html tags in getTrail
This will allow us to render in Storybook without having issues
with unclosed tags. it also mirrors how html-headelement works
(obscuring the opening of the body and html tags)

Bug: T240062
Bug: T242674
Change-Id: I216a920c68bf3da9de55a75fc53451c68c9cc753
2020-01-17 19:16:32 +00:00
Translation updater bot 746c05a0d1 Localisation updates from https://translatewiki.net.
Change-Id: Ic4bce80e3d543ce4ebcd6fc3df7facb568730b3c
2020-01-16 09:12:02 +01:00
jenkins-bot 4ce1e8c1f2 Merge "SkinTemplateToolboxEnd hook output not displaying in Vector" 2020-01-14 22:58:53 +00:00
jdlrobson f416e21bc5 SkinTemplateToolboxEnd hook output not displaying in Vector
Broken in I882db161e5462cf88aa48c9cfd91448eb97a4a77

Bug: T240062
Change-Id: I94bbf79c6c2743a5769935287593aa48780bfb71
2020-01-14 14:37:12 -08:00
jenkins-bot f1aaa1ec91 Merge "Replaces $user->isWatching call with WatchedItemStore isWatching service call" 2020-01-14 22:30:09 +00:00
Jan Drewniak 361e0d6f71 Extract Portal mustache component from VectorTemplate.php
A Portal (or portlet) in the Vector context is a section of the
sidebar menu (e.g. Tools, Languges etc.).

The hook that places content between the portals (or portlets?)
such as `SkinTemplateToolboxEnd` and `otherlanguages` has been
enclosed inside of an output buffer so that any content it
produces can be passed to a template.

Bug: T239248, T240062
Change-Id: I882db161e5462cf88aa48c9cfd91448eb97a4a77
2020-01-14 22:44:58 +01:00
Jan Drewniak 093cc20ee0 Extract VectorMenu.mustache component from VectorTemplate
Extracts a new VectorMenu mustache component from VectorTemplate.
VectorMenu is the "more" menu that appears at small widths instead of the
Read/Edit/View History menu near the top of the Vector skin.

Bug: T239248, T240062
Change-Id: I41b1ec949d81303abddadb981741445572c939e3
2020-01-14 10:38:46 -08:00
jenkins-bot 9cf4eb0e7e Merge "Hygiene: remove vectorConfig and use the getConfig" 2020-01-13 22:43:12 +00:00
Piotr Miazga 02d4e4929f Hygiene: remove vectorConfig and use the getConfig
The SkinVector implements IContextSource, thus it has to provide
the getConfig() method. Vector skin is currently using
it's own `vectorConfig` in one place and it passes the VectorConfig
to the VectorTemplate class. Sadly the VectorConfig is the same
thing what $this->getConfig() provides. There is no need to make
this code more complex by handling two different config containers
which at the end are the same GlobalVarConfig instances.

If we decide to handle VectorConfigs differently, let's thing it
through, for now we should simplify code and remove all uncessary
logic. Thanks to that, there is also no need to override the
setupTemplate().

Change-Id: I89c8a77f7d96f867c8c72e61f9e104e14d9512d9
2020-01-13 23:01:42 +01:00
jenkins-bot f40247a9d4 Merge "Hygiene: remove SkinVector::setupSkinUserCss" 2020-01-13 19:38:35 +00:00
jenkins-bot 68af887faf Merge "Convert $templateParser in VectorTemplate.php into an instance variable" 2020-01-13 19:37:56 +00:00
jenkins-bot d4bfcd02ce Merge "build: Updating mediawiki/mediawiki-codesniffer to 29.0.0" 2020-01-13 17:07:55 +00:00