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

Fusion support #63

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

codecrafter404
Copy link

No description provided.

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 >
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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:
Copy link
Author

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?
Copy link
Author

@codecrafter404 codecrafter404 Aug 2, 2024

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?

Copy link
Author

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 {
Copy link
Author

Choose a reason for hiding this comment

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

use @apply.props=${props}

Copy link
Author

@codecrafter404 codecrafter404 Aug 2, 2024

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'
Copy link
Author

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}
Copy link
Author

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

Copy link
Author

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`
Copy link
Author

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`
Copy link
Author

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) {
Copy link
Author

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()} />
Copy link
Author

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

Copy link
Author

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 = ''
Copy link
Author

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 {
Copy link
Author

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}
Copy link
Author

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}
Copy link
Author

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
Copy link
Author

Choose a reason for hiding this comment

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

#64

registrationFlow = ''

@private {
//translation = ${I18n.translate('registration.confirmationEmailSent', null, {'0': props.registrationFlow.email}, 'Main', 'Sandstorm.UserManagement', props.registrationFlow.email)}
Copy link
Author

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,
Copy link
Author

Choose a reason for hiding this comment

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

#65

Copy link
Author

Choose a reason for hiding this comment

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

#65

}
}
default {
condition = ${true}
Copy link
Author

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"
Copy link
Author

Choose a reason for hiding this comment

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

#66

}
default {
condition = ${true}
renderer = "Internal Failure: invalid state"
Copy link
Author

Choose a reason for hiding this comment

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

#66

}
default {
condition = ${true}
renderer = "General failure: invalid State"
Copy link
Author

Choose a reason for hiding this comment

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

#66

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.

1 participant