-
Notifications
You must be signed in to change notification settings - Fork 13
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
TASK: Use @private instead of nested components #73
base: main
Are you sure you want to change the base?
Conversation
15c488d
to
25e1ee2
Compare
This will avoid the instantiation of a level of fusion objects and thus should improve performance
750080b
to
1acc8f6
Compare
@@ -5,51 +5,50 @@ prototype(Sitegeist.Kaleidoscope:Source) < prototype(Neos.Fusion:Component) { | |||
} | |||
|
|||
imageSource = null | |||
[email protected] = ${value || __imageSource} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this __imageSource
come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is put into context from Picture so you do not have to specify it for every source when you do write sources as children like:
image = afx<Sitegeist.Kaleidoscope:Picture imageSource={props.source}> <Sitegeist.Kaleidoscope:Source format="webp" /> <Sitegeist.Kaleidoscope:Source format="png" /> </Sitegeist.Kaleidoscope:Picture>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does Eel interpret ||
? What happens if value is false
or null
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If value
is not null (exactly php falsy) the expression will yield value
otherwise __imageSource
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I haven't tried it in one of our projects.
This required Neos 8.3 + but should improve the performance as a level of fusion objects is avoided.