This repository was archived by the owner on May 29, 2026. It is now read-only.
feat(integrations): universal shared registry global bootstrap#1920
Merged
rubenvdlinde merged 2 commits intoMay 25, 2026
Conversation
Load the integration registry on EVERY full-page render, not just OpenRegister's own SPA, so leaves (e.g. OpenConnector's "Synced from") render inside any consuming app's object detail page — with ZERO changes to that app. - src/integration-global.js: tiny new webpack entry that calls ensureIntegrationRegistry() (idempotent). - webpack.config.js: integrationGlobal entry -> openregister-integration-global.js. - src/integrations/bootstrap.js: ensureIntegrationRegistry() now resolves the SHARED window-global registry via getSharedRegistry() (nc-vue converge-not-clobber + install-if-needed) and registers builtins + leaves into that instance, so every consuming app's useIntegrationRegistry() — which defaults to the same shared instance — sees them. - lib/Listener/IntegrationGlobalScriptListener.php: loads the global bundle on every BeforeTemplateRenderedEvent. - lib/AppInfo/Application.php: register the listener. Verified: on an OpenCatalogi page (no OpenCatalogi changes), window.OCA.OpenRegister.integrations is a real registry (not a stub) with 25 integrations including OpenConnector's sync-contract leaf, whose SyncedFromTab component is resolvable cross-bundle via resolveWidget(). Companion to nc-vue universal-shared-integration-registry (ncv#443).
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ✅ | ✅ 165/165 | |||
| npm | ✅ | ✅ 539/539 | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-25 22:39 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
Loads the integration registry on every full-page render, not just OpenRegister's own SPA, so leaf apps (e.g. OpenConnector's Synced from) render inside any consuming app's object detail page — with zero changes to that consuming app.
Why
The pluggable integration registry (
pluggable-integration-registry) was only installed + populated by OpenRegister's own webpack bundles. On a page served by a consuming app (e.g. an OpenCatalogi publication), OpenRegister's bundle never runs, so:registerIntegration(...)only ever populated a stub registry — nothing drained it.useIntegrationRegistry()in a foreign bundle read its own per-bundle module singleton, never the window-global the leaf queued onto.Net: the leaf's tab/widget never rendered outside OpenRegister's SPA. This change closes that gap.
How
src/integration-global.js— tiny new webpack entry that calls the idempotentensureIntegrationRegistry().webpack.config.js—integrationGlobalentry →openregister-integration-global.js.src/integrations/bootstrap.js—ensureIntegrationRegistry()now resolves the shared window-global registry viagetSharedRegistry()(nc-vue converge-not-clobber + install-if-needed) and registers builtins + leaves into that instance, so every consuming app'suseIntegrationRegistry()— which defaults to the same shared instance — sees them.lib/Listener/IntegrationGlobalScriptListener.php— loads the global bundle on everyBeforeTemplateRenderedEvent.lib/AppInfo/Application.php— registers the listener (mirrors the existingMailAppScriptListenerpattern).Verification
On an OpenCatalogi page (no OpenCatalogi changes):
window.OCA.OpenRegister.integrationsis a real registry (not a stub)sync-contractleafresolveWidget('sync-contract', 'detail-page')resolves to the realSyncedFromTabcomponent cross-bundleCompanion
Depends on nc-vue
universal-shared-integration-registry(ncv#443, merged to beta) which addsgetSharedRegistry/sharedRegistryIfInstalled/ converge-not-clobberinstallIntegrationRegistryand the shared-default composable.🤖 Generated with Claude Code