Commit graph

9 commits

Author SHA1 Message Date
Jan Drewniak 83a28d177f Storybook.js for Popups
Storybook.js provides a framework for
viewing and working with UI components.
https://storybook.js.org/

This patch adds the Storybook.js UI library to Popups for
the purposes of viewing multiple previews at once.
This enables viewing page previews in the following states:

- with thumbnails
- without thumbnails
- with SVG thumbnails
- with narrow thumbnails
- with white background thumbnails
- in RTL languages
- in non-latin languages
- disambiguation popups

Storybook also allows users to change the image or text
of a popup through a GUI.

This patch sets up Storybook as a "mini" repo inside
the.storybook folder with a seperate package.json file
to avoid incompatibilities with the current webpack/babel
(or even Node) versions used in the Popups repo.

Storybook requires at least Node v8.3 to run.
(an .nvmrc file with 11.3.0 has been added to the .stories dir).

To start:
`cd .storybook && npm install && npm run start`.

Bug: T205989
Change-Id: I041e46c4f0cf173950015067e2dce81c023d3fdd
2019-01-08 14:19:00 +01:00
Stephen Niedzielski 4d44390a4b Hygiene: enable ESLint caching
Copy ESLint caching configuration from MinervaNeue.

eead7c9382%5E%21/

Change-Id: Ifee0f67392f73c1285da7767a949998520bf4a0d
2018-10-17 16:45:35 -06:00
Stephen Niedzielski 8ba5c0f773 Hygiene: make JSDoc configs consistent
Make the Popups, MobileFrontend, and MinervaNeue JSDocs consistent. For
Popups, specify package.json, readme, and default template options and
moved doc/ to docs/ and autogenerated JavaScript documentation from
doc/autogenerated to docs/js.

http://usejsdoc.org/about-configuring-jsdoc.html
http://usejsdoc.org/about-commandline.html
http://usejsdoc.org/about-configuring-default-template.html

Bug: T188261
Change-Id: I81e64f06265f1ecc4e2ee159deef9b204ea7e957
2018-07-23 14:45:14 -05:00
Stephen Niedzielski 95047ba360 Fix: code coverage
Replace Istanbul with nyc, Istanbul's CLI. nyc appears to have some
bugs that this patch works around:

  - When all files in the project are considered, not just those
    imported via tests, the coverage rates and line numbers vary between
    runs. This patch disables the `all` option for now and points to the
    bug:
    https://github.com/istanbuljs/nyc/issues/537#issuecomment-390814662.

  - Source map line numbers appear to be incorrect except when `all` is
    enabled and working correctly (see previous bullet).

  - `sourceMap` must be disabled to avoid ENAMETOOLONG errors when nyc
    tries to include them as encoded strings. The patch disables the
    setting and points to: https://github.com/istanbuljs/nyc/issues/847.
    Using babel-plugin-istanbul and source-map-support appears to have
    no effect (the former in tests/node-qunit/run.js and .babelrc).

  - CI fails with
    `Error: EACCES: permission denied, mkdir '/nonexistent'`. Specify
    `SPAWN_WRAP_SHIM_ROOT` instead of constructing a subdirectory from a
    nonexistent home directory.

Bug: T196952
Bug: T193519
Change-Id: Idf2e3accd4a6277cbef91c1156fcd206c9e7d882
2018-06-19 18:10:02 -05:00
Piotr Miazga 4e60909171 Generate docs inside doc folder
Currently we have two docs folders:
 * doc which contains human-made documentation
 * docs which contains autogenerated documentation
To clean-up I moved the jsdoc target to doc/autogenerated so
we have only one documentation folder

Bug: T158236
Change-Id: I33166a84a4856e506e574e4194fa0c596b630b34
2017-05-30 10:16:57 -04:00
joakin 04fbc9dea2 Add code coverage reports npm script
Generate code coverage reports based on the node-qunit tests with
istanbul.

Changes:
* Update README with npm run coverage
* Add .istanbul.yml to configure istanbul
* Add npm script "coverage" that runs istanbul and generates the reports

Example report: http://popups-coverage.surge.sh/lcov-report/index.html

Change-Id: I9be8c04b858a3ce6f4e29af2685b79253e3b4dca
2017-03-03 13:34:33 +01:00
Paladox a087ea3334 Add composer.json
Test entry point for CI. Just composer install && composer test

This can later on let us easily add support for PHP CodeSniffer.

Also normalized /.gitignore

Signed-off-by: Antoine Musso <hashar@free.fr>
Change-Id: I827d29abedb32e59627fcdaf0a90815fe52efd20
2015-11-19 14:30:20 +01:00
Prateek Saxena 07d76da27e Setup jsduck to run on 'npm run doc'
Change-Id: If49922acd1d8af9caac54ed46360ff6c780833ce
2015-08-03 15:54:25 +05:30
Kunal Mehta 47d5daf74d build: Configure banana-checker and jsonlint
Change-Id: Id3f1d601f6b99e9646c7a1c6b430b1dd777e952b
2015-06-19 22:09:03 -07:00