-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fusion support #63
base: master
Are you sure you want to change the base?
Fusion support #63
Conversation
If you just want to apply simple modifications to the way the components are rendered, or which classes should be added to which HTML tags, override the responsible [presentation components](./Resources/Private/Fusion/Presentation/). This can be done like this: | ||
```fusion | ||
prototype(Sandstorm.UserManagement:Component.LoginForm) < prototype(Neos.Fusion:Component) { | ||
passwordResetUri > |
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.
we want to clear the renderer not the passwordResetUri
fusionPathPatterns: | ||
- resource://Neos.Fusion/Private/Fusion/Root.fusion | ||
- resource://Neos.Fusion.Form/Private/Fusion/Root.fusion | ||
- resource://Sandstorm.UserManagement/Private/Fusion/Root.fusion |
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.
Instead of Sandstorm.UserManagement -> Your.Vendor
## Fusion Support | ||
- Full support for the default NodeTypes as follows: | ||
- POC: migrate all fluid templates & overwrite them using the corresponding actions in the `Views.yaml` | ||
- Ideally, most of the controller logic is obsolete in further releases and can be implemented in pure fusion or custom fusion components |
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.
controller logic -> render controller logic
* *What happens if the user did not receive the registration email?* | ||
Just tell the user to register again. In this case, previous unfinished registrations are discarded. | ||
## Fusion Support | ||
- Full support for the default NodeTypes as follows: |
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.
default NodeTypes -> shipped/included NodeTypes
## What happens if the user did not receive the registration email? | ||
Just tell the user to register again. In this case, previous unfinished registrations are discarded. | ||
|
||
## Why didn't you use X to implement fusion support? |
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.
Why are all render controller actions overwritten in the Views.yaml
to implement fusion support?
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.
Find a better Naming convention, when the NodeTypes have been reworked
} | ||
} | ||
|
||
renderer = Sandstorm.UserManagement:Component.ResetPassword.SetPassword { |
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.
use @apply.props=${props}
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.
Update Naming
rename Sites to Routes
rename Content.< Sitename > to Route.< Sitename >
and move all routes into one big /Resources/Private/Fusion/RoutePaths.fusion
@@ -0,0 +1,9 @@ | |||
resetPasswordSetPasswordSite = Sandstorm.UserManagement:SiteLayout { | |||
title = 'Passwort-Änderung' |
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.
TODO: Add translations
<body> | ||
<h1>Hello World from Fusion!</h1> | ||
<br/> | ||
{props.flashmessages} |
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.
add support for flashmessages from the controllers
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.
@@ -0,0 +1,10 @@ | |||
prototype(Sandstorm.UserManagement:Component.FieldContainer) < prototype(Neos.Fusion.Form:FieldContainer) { | |||
errorRenderer = 'Sandstorm.UserManagement:Component.ErrorRenderer' | |||
renderer = afx` |
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.
clear the renderer before renderer >
@@ -0,0 +1,11 @@ | |||
prototype(Sandstorm.UserManagement:Component.ErrorRenderer) < prototype(Neos.Fusion.Form:ErrorRenderer) { | |||
renderer = afx` |
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.
clear the renderer before renderer >
@@ -0,0 +1,11 @@ | |||
prototype(Sandstorm.UserManagement:Component.ErrorRenderer) < prototype(Neos.Fusion.Form:ErrorRenderer) { |
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.
refactor to inherit from component
<label> | ||
{props.label} | ||
{props.content} | ||
<Neos.Fusion:Renderer @if.hasErrors={field.hasErrors()} type={props.errorRenderer} element.result={field.getResult()} /> |
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.
Use the ErrorHandler directly instead of instanciating it with Neos.Fusion:Renderer
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.
is obsolete is it doesn't add any new context
prototype(Sandstorm.UserManagement:Component.Login) < prototype(Neos.Fusion:Component) { | ||
|
||
account = '' | ||
isAuthenticated = '' |
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.
should be boolean
account = ${props.account} | ||
} | ||
} | ||
default { |
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.
default -> login
} | ||
} | ||
default { | ||
condition = ${true} |
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.
condition = true
} | ||
} | ||
default { | ||
condition = ${true} |
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.
condition = true
renderer = Neos.Fusion:Case { | ||
authenticated { | ||
condition = ${props.isAuthenticated} | ||
renderer = "You're already registered and logged in" // empty site |
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.
registrationFlow = '' | ||
|
||
@private { | ||
//translation = ${I18n.translate('registration.confirmationEmailSent', null, {'0': props.registrationFlow.email}, 'Main', 'Sandstorm.UserManagement', props.registrationFlow.email)} |
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.
remove
renderer = afx` | ||
<div class="callout success"> | ||
<p> | ||
Eine Email wurde an <strong>{resetPasswordFlow.email}</strong> versendet, |
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.
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.
} | ||
} | ||
default { | ||
condition = ${true} |
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.
condition = true
} | ||
default { | ||
condition = ${true} | ||
renderer = "General failure: invalid State" |
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.
} | ||
default { | ||
condition = ${true} | ||
renderer = "Internal Failure: invalid state" |
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.
} | ||
default { | ||
condition = ${true} | ||
renderer = "General failure: invalid State" |
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.
No description provided.