The clip-path SVG property was conditionally set in thumbnail.js and
also conditionally set or removed in renderer.js. This patch refactors
the logic to occur in a single place, renderer.js.
The refactor was made with the following considerations:
• The one condition under which thumbnail.js would set clip-path was,
given a thumbnail exists, the thumbnail was not tall and clip-path
would be set to `url(#mwe-popups-mask)`. Otherwise, thumbnail.js would
not set clip-path.
• The logic in renderer.js for setting the attribute doesn't change
since overwriting the clip-path is equivalent to not having a
preexisting value. The case for removing the attribute itself is
replaced by inverting the condition, `flippedY`, and combining it with
the thumbnail.js condition, `!isTall`. The operation is only valid for
an existing thumbnail so the `hasThumbnail` remains unchanged.
This patch also clarifies that the "flipped" classes are exclusively set
by using an if / else chain instead of reconsidering all inputs for each
condition.
Bug: T190831
Change-Id: I4062ec7068dcadecbdbc4791447ea2ed1ce2a1de
Remove popups-redirects and popups-send-feedback, which are unused. They
appear to be remnants of the code before the rewrite:
- popups-redirects was removed in I42fb9cc1a8b26eaf6807243e4e7bdbf0b56dc35c
- send-feedback was removed in If545873bb97b1da8ea5001dce575b1ef512903fb
Also, add detail to prefs-reading qqq string.
Change-Id: I072d416b2805a2a05e76aa28f083db730e0a523a
This moves the footer icon into the ResourceLoaderImage module
providing us a consistent way of serving image assets.
This means we no longer need to provide PNGs for icons
However, given mw-ui-icon-large is not large enough for the given
use case we do have to wrestle with icon styles and override them
to get the desired result. I think this is a small price to pay given
icons are now discoverable
Change-Id: I38b62c01fd930dcbfb73b95e6128885cb483f86e
This should be a noop since edits only relate
to documentation changes but is done to avoid
confusion
Change-Id: I9b4a4924a301e0cdec617d89b9b7d817941a95ef
We are using EventLogging to track page views not user behaviour.
This is an exception to the rule and requires special handling.
Bug: T190188
Change-Id: If096ccaf0ac884d57744ed57e2f26b51446de2d7
On all wikis Popups use Restbase as default gateway. In that case we
do not require the TextExtracts nor PageImages extensions. Code should
reflect that.
Bug: T190818
Change-Id: If4ce8f709b2ca1bb3cc381afa5e80e978adf2498
40kb seems a good time to pause and reflect on the total size.
The current maximum is impossible to meet without no further
changes to the code.
12kb is also more flexible than 11.5
Change-Id: I5ee8c236d90542afacc0e8de513a45a15ccd529b
We already use pixels to define font sizes in the pixels so rather
fight Vector's styles explicitly declare the font size in the header
(which it controls) instead for more readable code.
Also copy across several rules that are implied by Vector but needed
for the settings dialog so that this renders nicely in Monobook and
Minerva.
Change-Id: I196b8af23fe6ebcdb472c059cf1536d251a5b978
Comment became a bit stale. This updates it to reflect reality and
normalizes the verb forms for consistency.
Noticed as part of https://gerrit.wikimedia.org/r/c/420839/2/src/index.js#167
Additional changes:
* Merged all the const statements in L63 into one, for consistency.
Before, some were merged and some were independent.
Change-Id: I23aa824bb811f03a3630b4695e84c468bd9cd8b5
Add architectural decision record for replacing Mustache.js with ES6
template literals. Also, fix the date format on a previous ADR to be
consistent with the others.
Bug: T165036
Change-Id: I561ab4aaf6258e27cb12787b370407626547d48c
In I7395e3438836149becdd576942bdaf6f21b4163f the settings templates
were rewritten so that they no longer displayed an image.
descriptionText and images were dropped from the template but not from
the template provider. These are artifacts from relating to that patch
and are no longer used.
Change-Id: I1be7ef288d37f338e83dab3cf041e628a06608d2
Use i18n close label in the settings dialog since we have it instead of
hardcoding English. A cross is shown instead of the text so this change
may not be visible in all browsers.
Change-Id: I66284b04fe905cc8e460ea10b56c88cacd66ed28
When resources/dist was removed or modified, the diff check erroneously
complained that the resources differed. This could be resolved by simply
running the tests again. This patch fixes the issue by leveraging Git to
do the diffs which eliminates the need for a temporary test-build
directory and has the side-effect of improving the grep experience for
the repo.
Change-Id: Idf33f4d52aab6a2907debf6a7d6c7be5c83d9ee6
- `///` is not used in any linted files.
It is/was used in webpack dist, but those are not and should not
be passed through ESLint.
- `QUnit` was presumably added prematurely on the assumption
that overly long test names should not be broken over multiple
lines. However, being strings, they are already ignored.
- `// (?!eslint..)` was redundant. Ignoring warnings from max-len
about an eslint-disable line has no influence on the actual
parsing of those lines by ESLint.
Follows-up 807100b.
Bug: T185295
Change-Id: I2be2492848190b53d45240b38a08784b4a370819
Upgrade JSDoc from v3.4.3 to 3.5.5:
- v3.5.0 JSDoc can parse any JavaScript that is supported by Babel
compiler.
- v3.5.1 fixes an incompatibility bug in Node.js < v5.10.0
- v3.5.5 fixes an incompatibility bug in Node.js v8.5.0
Prior to this change, object shorthand caused the following errors:
jsdoc -c jsdoc.json
fs.js:1979
binding.copyFile(src, dest, flags);
^
Error: EISDIR: illegal operation on a directory, copyfile '/home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/templates/default/static/fonts/OpenSans-Bold-webfont.eot' -> 'doc/autogenerated/fonts'
at Object.fs.copyFileSync (fs.js:1979:11)
at /home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/templates/default/publish.js:471:12
at Array.forEach (<anonymous>)
at Object.exports.publish (/home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/templates/default/publish.js:468:17)
at Object.module.exports.cli.generateDocs (/home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/cli.js:430:39)
at Object.module.exports.cli.processParseResults (/home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/cli.js:383:20)
at module.exports.cli.main (/home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/cli.js:227:14)
at Object.module.exports.cli.runCommand (/home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/cli.js:180:5)
at /home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/jsdoc.js:103:9
at Object.<anonymous> (/home/stephen/dev/wmf/vagrant2/mediawiki/extensions/Popups/node_modules/jsdoc/jsdoc.js:104:3)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Function.Module.runMain (module.js:703:10)
https://github.com/jsdoc3/jsdoc/releases/tag/3.5.0https://github.com/jsdoc3/jsdoc/releases/tag/3.5.1https://github.com/jsdoc3/jsdoc/releases/tag/3.5.2https://github.com/jsdoc3/jsdoc/releases/tag/3.5.3https://github.com/jsdoc3/jsdoc/releases/tag/3.5.4https://github.com/jsdoc3/jsdoc/releases/tag/3.5.5
Bug: T165036
Change-Id: Ic7a22b6992d45fa0ea3d011a9ad5200d7cc73b80