Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
de:
pageflow_scrolled:
editor:
content_elements:
imageGallery:
attributes:
displayPeeks:
label: "Anrisse benachbarter Bilder zeigen"
inline_help: "Teile der benachbarten Bilder als Hinweis auf weitere Inhalte anzeigen."
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
en:
pageflow_scrolled:
editor:
content_elements:
imageGallery:
attributes:
displayPeeks:
label: "Display peeks of neighboring images"
inline_help: "Show partial adjacent image previews as navigation cues."
28 changes: 15 additions & 13 deletions entry_types/scrolled/package/spec/support/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function storiesOfContentElement(module, options) {
}

exampleStories(options).forEach(({
title, seed, requireConsentOptIn, cssRules, parameters = {}
title, seed, requireConsentOptIn, cssRules, parameters
}) => {
const consent = Consent.create();

Expand Down Expand Up @@ -189,13 +189,15 @@ function variantsExampleStories({typeName, baseConfiguration, variants}) {
typeName,
name: 'Variants',
examples: variants.map(({
name, permaId, configuration, themeOptions, sectionConfiguration, inlineFileRightsWidgetTypeName
name, permaId, configuration, themeOptions, sectionConfiguration, viewport,
inlineFileRightsWidgetTypeName
}) => ({
name: name,
permaId,
contentElementConfiguration: {...baseConfiguration, ...configuration},
themeOptions,
sectionConfiguration,
viewport,
inlineFileRightsFor: inlineFileRightsWidgetTypeName ? ['audioFiles', 'imageFiles', 'videoFiles'] : [],
widgets: inlineFileRightsWidgetTypeName ? [{
role: 'inlineFileRights',
Expand Down Expand Up @@ -242,16 +244,9 @@ function mobileExampleStories({typeName, baseConfiguration}) {
{
name: 'Default',
contentElementConfiguration: baseConfiguration,
viewport: 'phone'
}
],
parameters: {
viewport: {
defaultViewport: 'iphone6'
},
percy: {
widths: [320]
}
}
]
});
}

Expand Down Expand Up @@ -308,7 +303,7 @@ function inlineFileRightsStories({typeName, inlineFileRights, baseConfiguration}
}

function exampleStoryGroup({
name, typeName, examples, parameters, consentVendors, inlineFileRightsFor, widgets
name, typeName, examples, viewport, consentVendors, inlineFileRightsFor, widgets
}) {
const defaultSectionConfiguration = {transition: 'scroll', backdrop: {image: '#000'}, fullHeight: false};

Expand Down Expand Up @@ -347,7 +342,14 @@ function exampleStoryGroup({
)
}),
requireConsentOptIn: !!consentVendors,
parameters,
parameters: examples[index].viewport === 'phone' ? {
viewport: {
defaultViewport: 'iphone6'
},
percy: {
widths: [320]
}
} : {},
cssRules: themeOptionsCssRules(examples[index].themeOptions)
}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ function Scroller({
{[styles.wide]:
contentElementWidth === contentElementWidths.lg ||
contentElementWidth === contentElementWidths.xl},
{[styles.full]:
contentElementWidth === contentElementWidths.full},
{[styles.clip]: configuration.hidePeeks},
{[styles.customMargin]: customMargin})}>
<div className={styles.leftButton}>
<ScrollButton direction="left"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
justify-content: center;
}

.clip {
--overlap: 0px;
}

.full.clip {
--gutter: 0px;
}

.button {
grid-row: 1;
z-index: 2;
Expand Down Expand Up @@ -61,6 +69,10 @@
scrollbar-width: none;
}

.clip .items {
clip-path: content-box;
}

.items::-webkit-scrollbar {
display: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ editor.contentElementTypes.register('imageGallery', {
this.view(ItemsListView, {
collection: ItemsCollection.forContentElement(this.model.parent, entry)
});
this.input('displayPeeks', CheckBoxInputView, {
storeInverted: 'hidePeeks'
});
this.input('enableFullscreenOnDesktop', CheckBoxInputView, {
disabledBinding: ['position', 'width'],
disabled: () => contentElement.getWidth() === contentElementWidths.full,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './frontend';
import {contentElementWidths} from 'pageflow-scrolled/frontend';
import {storiesOfContentElement, filePermaId} from 'pageflow-scrolled/spec/support/stories';

storiesOfContentElement(module, {
Expand Down Expand Up @@ -43,6 +44,27 @@ storiesOfContentElement(module, {
}
}
},
{
name: 'Full width',
configuration: {
width: contentElementWidths.full
},
viewport: 'phone'
},
{
name: 'Hide peeks',
configuration: {
hidePeeks: true
}
},
{
name: 'Full widths, Hide peeks',
configuration: {
width: contentElementWidths.full,
hidePeeks: true
},
viewport: 'phone'
},
{
name: 'With Captions',
configuration: {
Expand Down
Loading