Description
when one registers a new plugin in the manifest and tries to call globalRegistry.get('frontendConfiguration') null is returned.
Steps to Reproduce
- Write a manifest like:
import manifest from '@neos-project/neos-ui-extensibility';
manifest('Fooo', {}, (globalRegistry) => {
console.log(globalRegistry.get('frontendConfiguration'))
}
Expected behavior
to get the actual FrontendConfigurationSynchronousRegistry
Actual behavior
we log null
What actually happened
the FrontendConfigurationSynchronousRegistry is not initialized, when the bootstraps are called.
the manifests are booted here in line 76
|
.forEach(({bootstrap}) => bootstrap(globalRegistry, {store, frontendConfiguration, configuration, routes})); |
but only in line 121
|
const frontendConfigurationRegistry = globalRegistry.get('frontendConfiguration'); |
|
|
|
Object.keys(frontendConfiguration).forEach(key => { |
|
frontendConfigurationRegistry.set(key, { |
|
...frontendConfiguration[key] |
|
}); |
|
}); |
the raw yaml / php-array frontendConfiguration array is transferred to a
SynchronousRegistry
... Sure we can get hold of the frontendConfiguration in another way:
- Write a manifest like:
manifest('Fooo', {}, (globalRegistry, { frontendConfiguration }) => {
console.log(frontendConfiguration)
}
now it works, but note that this is the raw yaml / php-array and not a SynchronousRegistry so frontendConfiguration.get('My.Package')
doesnt work (one needs to use normal array access like frontendConfiguration['My.Package']) - but it does other places (when you actually have the FrontendConfigurationSynchronousRegistry)
Outcome
is there a reason, why the FrontendConfigurationSynchronousRegistry is not initialized before boot and passed?
im now used to this but i find this behavior odd - and would like to have at all places a FrontendConfigurationSynchronousRegistry available.
Affected Versions
UI: Since ever
Description
when one registers a new plugin in the
manifestand tries to callglobalRegistry.get('frontendConfiguration')null is returned.Steps to Reproduce
Expected behavior
to get the actual
FrontendConfigurationSynchronousRegistryActual behavior
we log null
What actually happened
the
FrontendConfigurationSynchronousRegistryis not initialized, when the bootstraps are called.the manifests are booted here in line 76
neos-ui/packages/neos-ui/src/index.js
Line 76 in 6ce2774
but only in line 121
neos-ui/packages/neos-ui/src/index.js
Lines 121 to 127 in 6ce2774
the raw yaml / php-array frontendConfiguration array is transferred to a
SynchronousRegistry... Sure we can get hold of the
frontendConfigurationin another way:now it works, but note that this is the raw yaml / php-array and not a
SynchronousRegistrysofrontendConfiguration.get('My.Package')doesnt work (one needs to use normal array access like
frontendConfiguration['My.Package']) - but it does other places (when you actually have theFrontendConfigurationSynchronousRegistry)Outcome
is there a reason, why the FrontendConfigurationSynchronousRegistry is not initialized before boot and passed?
im now used to this but i find this behavior odd - and would like to have at all places a
FrontendConfigurationSynchronousRegistryavailable.Affected Versions
UI: Since ever