Skip to content

Conversation

@mhsdesign
Copy link
Contributor

@propTypes {
    text = PackageFactory.AtomicFusion.PropTypes:PropsFromComponent {
        type = "Foo.Bar:Text"
        isRequired = true
    }
}

```
@proptypes {
    text = PackageFactory.AtomicFusion.PropTypes:PropsFromComponent {
        type = "Foo.Bar:Text"
        isRequired = true
    }
}
```
@@ -1,8 +1,31 @@
// this is only included in dev context
// todo not anymore
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats a proplem as we cant use eel here.
either put some logic in PropTypeExceptionHandler to determine if in dev context and fall back to the general exception handler (fusion settings)
or we use context aware objects.yaml and use an interface which we set in @exceptionHandler

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could of course achieve the previous behaviour with aop and \Neos\Neos\Domain\Service\FusionService::setPrependFusionIncludes

@exceptionHandler = 'PackageFactory\\AtomicFusion\\PropTypes\\Error\\ExceptionHandler\\PropTypeExceptionHandler'
}

prototype(PackageFactory.AtomicFusion.PropTypes:PropsFromComponent) < prototype(Neos.Fusion:Value) {
Copy link
Contributor Author

@mhsdesign mhsdesign Oct 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming is WIP too - when we find a fitting name i will extract the prototypes into its own folders

suggestion by martin:

  • PackageFactory.AtomicFusion.PropTypes:ForComponent and PackageFactory.AtomicFusion.PropTypes:ForComponentArray

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i find PackageFactory.AtomicFusion.PropTypes:ForComponentCollection tempting, as i would name my php collection dto like that...

or we could also play with the words infer and props - they are common in typescript / js

or similar to React.ComponentProps<MyComponent>?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prop.Types:FromComponent
PackageFactory.AtomicFusion.PropTypes:PropTypesFromComponent

we could also use a prop isIterateable = true instead of adding a second prototype for array

@mficzel
Copy link
Member

mficzel commented Nov 11, 2022

Ups did not see that. However i kinda like the fusion implementations from the other pr a little better

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