diff --git a/.storybook/mocks/models.js b/.storybook/mocks/models.js index e24b094a2..13e754c8f 100644 --- a/.storybook/mocks/models.js +++ b/.storybook/mocks/models.js @@ -2,7 +2,7 @@ * Various Page Preview models used for different configurations. * PreviewModel is defined in 'src/preview/model.js`. * -* In produciton, thumbnail size is determined by the gateway before fetching +* In production, thumbnail size is determined by the gateway before fetching * from the server. Here, thumbnails are defined statically so they * must be scaled down for low-dpi display, using `helpers/scaleDownThumbnails.js`. * @@ -176,7 +176,7 @@ MODELS.THUMBNAIL_SMALL_TALL = { width: 300, height: 1000 }, - pageId: 8246305 + pageId: 18842359 }; MODELS.THUMBNAIL_SMALL_SHORT = { title: "Full Moon", @@ -191,7 +191,7 @@ MODELS.THUMBNAIL_SMALL_SHORT = { width: 300, height: 200 }, - pageId: 2486305 + pageId: 11432 }; MODELS.LONG_WORD_1 = { title: "Pneumonoultramicroscopicsilicovolcanoconiosis", @@ -558,4 +558,12 @@ MODELS.TYPE_REFERENCE_GENERIC_COLLAPSIBLE = { extract: `

This is a reference.

` }; +MODELS.ERROR = { + title: "Error Preview", + url: "Error Preview", + languageCode: "en", + languageDirection: "ltr", + type: 'generic', +}; + export default MODELS; diff --git a/.storybook/stories/index.stories.js b/.storybook/stories/index.stories.js index 77849ce1d..7b66c855f 100644 --- a/.storybook/stories/index.stories.js +++ b/.storybook/stories/index.stories.js @@ -306,6 +306,17 @@ storiesOf( 'Non-latin', module ) `; } ) +storiesOf( 'Error', module ) +.add( 'generic', () => { + modifyStorybookHead( MODELS.ERROR.languageCode, MODELS.ERROR.languageDirection ) + return ` + ${createPopup( MODELS.ERROR, { flippedX: false, flippedY: false } )} + ${createPopup( MODELS.ERROR, { flippedX: true, flippedY: false } )} + ${createPopup( MODELS.ERROR, { flippedX: false, flippedY: true } )} + ${createPopup( MODELS.ERROR, { flippedX: true, flippedY: true } )} + `; +} ); + storiesOf( 'assets', module ) .add( 'SVG Masks', () => { const parser = new DOMParser(), diff --git a/src/ui/templates/popup/popup.less b/src/ui/templates/popup/popup.less index a36cb6a2b..46b4b0d09 100644 --- a/src/ui/templates/popup/popup.less +++ b/src/ui/templates/popup/popup.less @@ -294,6 +294,10 @@ z-index: @zIndexThumbnailMask; right: 0; } + + .mwe-popups-extract { + margin-top: 8px; + } } &.flipped-x-y { @@ -495,6 +499,7 @@ padding-top: var( --pointer-height ); } + &.mwe-popups-type-generic:not( .flipped-y ):not( .flipped-x-y ), &.mwe-popups-type-disambiguation:not( .flipped-y ):not( .flipped-x-y ) { .mwe-popups-container { padding-top: var( --pointer-height );