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

TASK: Use @private instead of nested components #73

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

mficzel
Copy link
Member

@mficzel mficzel commented Nov 1, 2023

This required Neos 8.3 + but should improve the performance as a level of fusion objects is avoided.

@mficzel mficzel force-pushed the task/avoidNestedComponentsInFavorOfAtPrivateProps branch from 15c488d to 25e1ee2 Compare November 2, 2023 08:22
This will avoid the instantiation of a level of fusion objects and thus should improve performance
@mficzel mficzel force-pushed the task/avoidNestedComponentsInFavorOfAtPrivateProps branch from 750080b to 1acc8f6 Compare November 2, 2023 08:55
@mficzel mficzel marked this pull request as ready for review November 2, 2023 08:55
@@ -5,51 +5,50 @@ prototype(Sitegeist.Kaleidoscope:Source) < prototype(Neos.Fusion:Component) {
}

imageSource = null
[email protected] = ${value || __imageSource}
Copy link
Contributor

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?

Copy link
Member Author

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>

Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

@manuelmeister manuelmeister left a 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.

@manuelmeister
Copy link
Contributor

I think we should probably also remove all deprecated methods & (non-existing) eel helpers. Then release this as a breaking version.

…Props

* main:
  TASK: Make BaseUri argument nullable in DummyImageSource constructor
  FIX: Remove preserveAspect
  Replace $allowUpScaling with supportsUpscaling()
  FEATURE: Add quality option
  Empty srcCache on cloning
  TASK: Increase php requirement to 7.4
  BUGFIX: Remove unnecessary named parameter
  FEATURE: Test mixed and invalid descriptors
  BUGFIX: Prevent division by zero
  FEATURE: Implement tests
  FEATURE: Only output existing images and allow upscaling
  Remove superfluous spaces
  Add new line for styleCI
  Add missing end of sentence marker for styleCI
  FEATURE: Runtime cache for `src` method of `AssetImageSource`

# Conflicts:
#	Resources/Private/Fusion/Prototypes/Image.fusion
#	Resources/Private/Fusion/Prototypes/Picture.fusion
#	Resources/Private/Fusion/Prototypes/Source.fusion
@mficzel mficzel force-pushed the task/avoidNestedComponentsInFavorOfAtPrivateProps branch from ab24399 to 781b7fb Compare September 27, 2024 10:45
@mficzel mficzel merged commit ec1d163 into main Sep 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants