Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Remove usage of deprecated fusion prototypes #72

Merged
merged 2 commits into from
Oct 18, 2023
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
12 changes: 6 additions & 6 deletions Resources/Private/Fusion/Prototypes/DummyImageSource.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ prototype(Sitegeist.Kaleidoscope:DummyImageSource) {
// <table>
// <thead>
// <th></th>
// <Neos.Fusion:Collection collection={props.dimensions} itemName="width" @children="itemRenderer">
// <Neos.Fusion:Loop items={props.dimensions} itemName="width" @children="itemRenderer">
// <th>W {width}</th>
// </Neos.Fusion:Collection>
// </Neos.Fusion:Loop>
// </thead>
// <tbody>
// <Neos.Fusion:Collection collection={props.dimensions} itemName="height" @children="itemRenderer">
// <Neos.Fusion:Loop items={props.dimensions} itemName="height" @children="itemRenderer">
// <tr>
// <th>H {height}</th>
// <Neos.Fusion:Collection collection={props.dimensions} itemName="width" @children="itemRenderer">
// <Neos.Fusion:Loop items={props.dimensions} itemName="width" @children="itemRenderer">
// <td>
// <img src={props.imageSource.setWidth(width).setHeight(height)} width={width} height={height} />
// </td>
// </Neos.Fusion:Collection>
// </Neos.Fusion:Loop>
// </tr>
// </Neos.Fusion:Collection>
// </Neos.Fusion:Loop>
// </tbody>
// </table>
// `
Expand Down
20 changes: 10 additions & 10 deletions Resources/Private/Fusion/Prototypes/Picture.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) {
@styleguide {
props {
imageSource = Sitegeist.Kaleidoscope:DummyImageSource
sources = Neos.Fusion:RawArray {
1 = Neos.Fusion:RawArray {
sources = Neos.Fusion:DataStructure {
1 = Neos.Fusion:DataStructure {
srcset = '1x, 1.5x, 2x'
media = 'screen and (min-width: 1600px)'
}
2 = Neos.Fusion:RawArray {
2 = Neos.Fusion:DataStructure {
imageSource = Sitegeist.Kaleidoscope:DummyImageSource {
text = "im am in webp format"
format = 'webp'
Expand All @@ -18,13 +18,13 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) {
type = 'image/webp'
media = 'screen and (max-width: 1599px)'
}
3 = Neos.Fusion:RawArray {
3 = Neos.Fusion:DataStructure {
imageSource = Sitegeist.Kaleidoscope:DummyImageSource {
text = "im am here for printing"
}
media = 'print'
}
4 = Neos.Fusion:RawArray {
4 = Neos.Fusion:DataStructure {
srcset = '400w, 800w, 1600w'
media = 'screen and (min-width: 2600px)'
width = 800
Expand Down Expand Up @@ -103,7 +103,7 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) {
renderer = afx`
<picture class={props.class} {...props.attributes}>
{props.content}
<Neos.Fusion:Collection collection={props.sources} itemName="source" @if.has={props.sources}>
<Neos.Fusion:Loop items={props.sources} itemName="source" @if.has={props.sources}>
<Sitegeist.Kaleidoscope:Source
imageSource={source.imageSource ? source.imageSource : props.imageSource}
type={source.type}
Expand All @@ -115,17 +115,17 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) {
sizes={source.sizes ? source.sizes : props.sizes}
renderDimensionAttributes={props.renderDimensionAttributes}
/>
</Neos.Fusion:Collection>
<Neos.Fusion:Collection
</Neos.Fusion:Loop>
<Neos.Fusion:Loop
@if.has={props.imageSource && props.formats}
collection={Type.isArray(props.formats) ? props.formats : String.split(props.formats, ',')}
items={Type.isArray(props.formats) ? props.formats : String.split(props.formats, ',')}
itemName="format"
>
<Sitegeist.Kaleidoscope:Source
imageSource={props.imageSource}
format={String.trim(format)}
/>
</Neos.Fusion:Collection>
</Neos.Fusion:Loop>
<Sitegeist.Kaleidoscope:Image
imageSource={props.imageSource}
sizes={props.sizes}
Expand Down
Loading