Commit graph

10 commits

Author SHA1 Message Date
bwang a78546a19e Handle clipped blockquote by adding blockquote fade out effect
- Added styling to apply a psuedoelement to the blockquote
- Added a storybook story to cover blockquotes

Bug: T213107
Change-Id: I09706137fec00b3bff649180a559f4f663b71d90
2021-08-25 17:05:08 +00:00
Clare Ming 48df0cbaea Fix popup preview regressions, add story
- Fix margin for page preview flipped-x.
- Fix margins for generic previews.
- Add error story to storybook.
- Fix minor typo, pageIds in MODELS.

Bug: T281170
Change-Id: I5b96719c1d08518cbd977590171974796fd10986
2021-08-13 13:50:13 -06:00
jdlrobson 7be869649d Storybook: Capture "panorama" style portrait and landscape examples
Reduce min-height per explanation in:
https://phabricator.wikimedia.org/T255549#7266861

Bug: T255549
Change-Id: I2871e8d0377268edb50a6de98ca6a247e9a794b9
2021-08-12 11:39:29 -07:00
Thiemo Kreuz a01c31efd7 Show medium size (<320 wide, but >=250 high) images as well
The requirement for landscape images is to be at least 320px
wide. The requirement for portrait images is more relaxed,
only 250px high. Images that fall between these two
requirements currently don't show a thumbnail, even if they
could.

This change affects a very specific group of images:
* Square images from 250 x 250 to 319 x 319.
* Landscape images from 251 x 250 to 319 x 250.
* Landscape images from 319 x 250 to 319 x 318.

The most extreme ratio is 319 x 250. This will be cut to
203 x 250. I.e. the absolute extreme are 58px missing left
and right, but never more.

Requested at https://www.mediawiki.org/wiki/Topic:Vwl97pm6as9fuf6k

Additional stories for testing more extreme small images:
* Small Tall - 300x1000px
* Small Short - 300x200px

Update tests accordingly.

Bug: T268999
Change-Id: I811f1c0e7e9b0c30280b36a61cc7831a5b9e58c8
2021-08-03 13:17:06 -06:00
jdlrobson f97d29923b Add reference previews to storybook
Change-Id: I8e9e2db66fa94b33abcf7c9cbaff8defe5003ef6
2021-07-22 23:59:26 +00:00
Jan Drewniak afda9e4574 [Storybook] Fixing missing images
At certain screen densities, Popups may request images of a certain size
which were previously unavailable.Changes a missing image in models.js
as well.

Bug: T271763
Change-Id: I6400de9be35c3f0cab116ceb76e52f8f2a4a8164
2021-07-14 16:26:20 +00:00
jdlrobson 1803ac5b2d Storybook: Images should be relative uris
Follow up to I58493db15b27f148fcc1cf42ab0b0148ee291eb6

Bug: T236589
Change-Id: I305badda5a3f93684270bfe07d6cc19c92df3e07
2019-12-13 01:42:13 +00:00
jdlrobson 44239076af Use local files for storybook
Currently images do not display on docs.wikimedia.org
These need to be local due to the security restrictions there.

Bug: T213223
Bug: T236589
Change-Id: I58493db15b27f148fcc1cf42ab0b0148ee291eb6
2019-12-12 11:28:27 -08:00
Jan Drewniak da369d09ae Improving RTL support for the Storybook app
- Adds CSSJanus support on a story-by-story basis for the Storybook app.
- Adds an extra RTL portrait thumbnail test-case.
- Adds an extra RTL 'thin' portrait thumbnail test-case.
- Removes the `createContextualFragment` wrapper from stories,
  as well as the wrapper divs.

Bug: T204627
Change-Id: I22195c6ddc73d69f15dc8e24c33b49ef28d9b0be
2019-03-25 11:19:15 +01:00
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