Releases: sitegeist/Sitegeist.Monocle
Add support for Neos 8.x
v7.5.2 TASK: Adjust to api changes in Neos 8.0
Avoid crashes when `@cache` annotations are present
@cache
annotations on presentational prototypes are still considered a code-smell but they should not cause monocle to fail.
Thanks to @gjwnc for discovering and fixing.
FEATURE: Preview for non site packages
The packages
configuration can now be used to configure non-site packages for previewing in the styleguide.
When a prototype of a non-site package is rendered Monocle will only load the Root.fusion of this specific package and the Monocle Root.fusion. Every other fusion including the default fusion has to be included explicitly. This mimics the behavior of the classic FusionView that is used for FusionRendering of Flow Controller Actions.
Sitegeist:
Monocle:
packages:
#add a key to the package list without package specific configuration
'Vendor.Example': {}
In addition a smarter and configurable way to determine the defaultPackageKey was added.
If a domain can be identified from the current request monocle will use this to determine the initial sitePackage.
If that does not work a newly added setting defaultPackageKey
is used. If this setting is not set the key of
the first site package or the first key in the packages
configuration is used.
Please note that Monocle still has a dependency to Neos. We are planning to change this at some point in future.
BUGFIX: Apply styleguide props alongside useCase and propSet props
Fixes a bug introduced with v7.4.0.
`useCases` and `containers` for improved preview of components
Containers
Often components have to be rendered in the styleguide inside another component. In this case a container
can be defined in the @styleguide
annotation. The container is the applied as processor to the uppermost prototype.
prototype(Vendor.Site:ExampleComponent) < prototype(Neos.Fusion:Component) {
@styleguide {
container = Vendor.Site:ExampleContainer
}
renderer = afx`
<h1>Hello World</h1>
`
}
The container
prototype has to accept the prop content
that will contain the rendered prototype.
prototype(Vendor.Site:ExampleContainer) < prototype(Neos.Fusion:Component) {
content = null
renderer = afx`
<div class="container">{props.content}</div>
`
}
Please note that containers are only rendered for the uppermost prototype that is rendered in the styleguide. For all other
prototype only the renderer is evaluated. This also applies to prototypes rendered by Sitegeist.Monocle:Preview.Prototype
.
Use Cases
The useCases
section of the @styleguide
annotation allows to configure scenarios the component shall be previewed in.
If a useCase defines props
or container
those are will override the styleguide settings for this component. The title
is optional and will fallback to the key the useCase is defined in.
prototype(Vendor.Site:Example.Component) < prototype(Neos.Fusion:Component) {
@styleguide {
title = "Example"
container = Vendor.Site:Example.Container
props {
title = 'Hello world!'
}
useCases {
case1 {
title = "Use case with varying props"
props {
title = Hello special world!'
}
}
case2 {
title = "Use case with another container"
container = Vendor.Site:Example.AnotherContainer
}
}
!!! PropSets are now deprecated and cannot not be mixed with UseCases. Monocle will not show the PropSet selector for components that have useCases and the API endpoint will ignore propSets once a useCase is selected. The PropSet Feature will be removed in one of the next major versions once if causes extra effort to the monocle maintenance !!!
Fix api call that is not supported in newer neos releases
v7.3.1 BUGFIX: Use correct setContentType instead of setHeader for contentTy…
Advanced Prop Editors
Moves all logic for the Prop Editor generation out of the client and into the API.
This allows to create packages that adjust the prop rendering based on additional informations.
Declare Neo/Flow 7.0 compatibility
7.2.1 Relax version constraint for neos 7
Improve styleguide:items command and routing
Merge pull request #127 from sitegeist/task/improveMonocleCliApi TASK: Improve Command line api
BUGFIX: Fix DummyControllerContextTrait
Merge pull request #117 from Garagist/bugfix/dummy-controller BUG: fix DummyControllerContextTrait request and response handling