Bug: Inspector prop values only reflect `default` useCase values
Build a simple component:
prototype(Foo.Bar:Block.Thing) < prototype(Neos.Fusion:Component) {
@styleguide {
title = 'Thing'
props {
option = true
}
useCases {
blablabla {
title = "Blablabla"
props {
option = false
}
}
}
}
renderer = afx`
{Json.stringify(props)}
`
}
Open it in monocle
- expect rendering to be
{"option":true} - expect inpector to correctly reflect
optionwith checkbox marked
Select usecase Blablabla
- expect rendering to be
{"option":false} -
expect inpector to correctly reflect
optionwith checkbox not marked -> fails!
Bildschirmaufzeichnung vom 10.10.2022, 22:05:33.webm
I looked at the code and \Sitegeist\Monocle\Domain\PrototypeDetails\Props\PropsCollectionFactory only takes into account the current default for the initial page load - and there is simply no update inspector logic in place ...
The UseCase even seems to have a overrides property key value pair, but it seems unused ...
Hello
I have also noticed this error several times and it has been reported to me several times. Would be nice if this could be corrected in the next release. Thank you very much
@KPeschke we are open for contributions ;)
I’m currently occupied fixing other $things ;)
I have the same issue. Also useCase props seem to reset all props specified above, i.e. for
prototype(Foo.Bar:Block.Thing) < prototype(Neos.Fusion:Component) {
@styleguide {
title = 'Thing'
props {
option = true
someValue = 'default'
}
useCases {
blablabla {
title = "Blablabla"
props {
option = false
}
}
}
}
renderer = afx`
{Json.stringify(props)}
`
}
the result of the "Blablabla" useCase is
{"option":false}
instead of (what I would expect):
{"option":false,"someValue":"default"}