-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2202 from tf/scroll-indicator
Add scroll indicator widget
- Loading branch information
Showing
31 changed files
with
584 additions
and
38 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
entry_types/scrolled/config/locales/new/scroll_indicator.de.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
de: | ||
pageflow: | ||
icon_scroll_indicator: | ||
feature_name: Icon Scroll-Indikator | ||
iconScrollIndicator: | ||
widget_type_name: Icon unten am Viewport-Rand | ||
editor: | ||
widgets: | ||
attributes: | ||
iconScrollIndicator: | ||
animation: | ||
label: Animation | ||
values: | ||
none: Keine | ||
smallBounce: Subtil | ||
largeBounce: Deutlich | ||
alignment: | ||
label: Ausrichtung | ||
values: | ||
centerContent: Zentriert zum Inhalt | ||
centerViewport: Zentriert zum Viewport | ||
size: | ||
label: Größe | ||
values: | ||
large: Groß | ||
small: Klein | ||
ui: | ||
configuration_editor: | ||
tabs: | ||
iconScrollIndicator: Icon Scroll-Indikator | ||
widgets: | ||
roles: | ||
scrollIndicator: Scroll-Indikator |
33 changes: 33 additions & 0 deletions
33
entry_types/scrolled/config/locales/new/scroll_indicator.en.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
en: | ||
pageflow: | ||
icon_scroll_indicator: | ||
feature_name: Icon Scroll Indicator | ||
iconScrollIndicator: | ||
widget_type_name: Icon at bottom of viewport | ||
editor: | ||
widgets: | ||
attributes: | ||
iconScrollIndicator: | ||
animation: | ||
label: Animation | ||
values: | ||
none: None | ||
smallBounce: Subtle | ||
largeBounce: Obvious | ||
alignment: | ||
label: Alignment | ||
values: | ||
centerContent: Center with content | ||
centerViewport: Center with viewport | ||
size: | ||
label: Size | ||
values: | ||
large: Large | ||
small: Small | ||
ui: | ||
configuration_editor: | ||
tabs: | ||
iconScrollIndicator: Icon Scroll Indicator | ||
widgets: | ||
roles: | ||
scrollIndicator: Scroll indicator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
entry_types/scrolled/package/spec/frontend/features/scrollIndicatorWidget-spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
|
||
import {renderEntry, usePageObjects} from 'support/pageObjects'; | ||
|
||
import {frontend} from 'frontend'; | ||
|
||
describe('scroll indicator widget', () => { | ||
usePageObjects(); | ||
|
||
it('is rendered once', () => { | ||
frontend.widgetTypes.register('testScrollIndicator', { | ||
component: function ({children}) { | ||
return ( | ||
<div data-testid="scrollIndicator">Scroll Indicator</div> | ||
) | ||
} | ||
}); | ||
|
||
const {getByTestId} = renderEntry({ | ||
seed: { | ||
sections: [{id: 5}, {id: 6}], | ||
widgets: [{ | ||
typeName: 'testScrollIndicator', | ||
role:'scrollIndicator' | ||
}] | ||
} | ||
}); | ||
|
||
expect(getByTestId('scrollIndicator')).not.toBeNull(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
entry_types/scrolled/package/src/frontend/SelectableWidget.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {withInlineEditingDecorator} from './inlineEditing'; | ||
|
||
import {Widget} from './Widget' | ||
|
||
export const SelectableWidget = withInlineEditingDecorator( | ||
'SelectableWidgetDecorator', | ||
Widget | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
entry_types/scrolled/package/src/frontend/WidgetSelectionRect.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {withInlineEditingAlternative} from './inlineEditing'; | ||
|
||
export const WidgetSelectionRect = withInlineEditingAlternative( | ||
'WidgetSelectionRect', | ||
function WidgetSelectionRect({children}) { | ||
return children; | ||
} | ||
); |
Oops, something went wrong.