Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a range in AFX in selected, you can find the "Extract component" option in the refactoring menu.
This will open a dialog prompting you for a name for the new component and showing a preview of the generated output: the new component and the code generated at the old location.
You can currently choose whether to include the children in the component or not (only works when a "complete" tag is selected, i.e. no surrounding text or sibling elements). This will make the difference of generating
<New />
vs<New>existing child content</New>
and<Original>existing child content</Original>
vs.<Original>{props.content}</Original>
.It tries to expose the "dynamic values" (not explicit variables, but everything in an eel expression) so it should still work in the end, but for now my confidence is limited ^^
The extracted prototype is created in the same file and I don't intend to make this configurable. That's what #323 is intended for.
This currently is super rough, but I decided to put it out there for feedback or interested testers.
Working with the injected language elements felt super awkward, but possibly I just haven't understood the intended way yet.
ToDo:
Neos.Fusion:Component
behavior, but could be some subtype.)Includes the
EelElementFactory
from #324 but deliberately not the whole branch.Resolves #46