-
Notifications
You must be signed in to change notification settings - Fork 4
WIP: FEATURE Infer props from component #17
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,31 @@ | ||
| // this is only included in dev context | ||
| // todo not anymore | ||
| prototype(Neos.Fusion:Component) { | ||
| @exceptionHandler = 'PackageFactory\\AtomicFusion\\PropTypes\\Error\\ExceptionHandler\\PropTypeExceptionHandler' | ||
| } | ||
|
|
||
| prototype(PackageFactory.AtomicFusion:Component) { | ||
| @exceptionHandler = 'PackageFactory\\AtomicFusion\\PropTypes\\Error\\ExceptionHandler\\PropTypeExceptionHandler' | ||
| } | ||
|
|
||
| prototype(PackageFactory.AtomicFusion.PropTypes:PropsFromComponent) < prototype(Neos.Fusion:Value) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i find or we could also play with the words or similar to
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
we could also use a prop |
||
| type = null | ||
| isRequired = false | ||
|
|
||
| @context.type = ${this.type} | ||
| value = Neos.Fusion:Renderer { | ||
| renderPath = ${'/<' + type + '>/__meta/propTypes<Neos.Fusion:DataStructure>'} | ||
| @process.propsArrayToPropTypes = ${PropTypes.dataStructure(value)} | ||
| } | ||
|
|
||
| @process.makeRequired = ${this.isRequired ? value.isRequired : value} | ||
| @process.makeRequired.@position = "end" | ||
|
|
||
| } | ||
|
|
||
| prototype(PackageFactory.AtomicFusion.PropTypes:ArrayOfPropsFromComponent) < prototype(PackageFactory.AtomicFusion.PropTypes:ForComponent) { | ||
| type = null | ||
| isRequired = false | ||
|
|
||
| @process.makeArrayOf = ${PropTypes.arrayOf(value)} | ||
| } | ||
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.
thats a proplem as we cant use eel here.
either put some logic in
PropTypeExceptionHandlerto 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
@exceptionHandlerThere 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.
we could of course achieve the previous behaviour with aop and
\Neos\Neos\Domain\Service\FusionService::setPrependFusionIncludes