https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43285
Bug ID: 43285
Summary: Add Koha Plugin JS ESM module registry and loader
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Plugin architecture
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected],
[email protected], [email protected]
Target Milestone: ---
There's been really cool work done on having Koha plugins add Vue.js content to
Koha. See the following:
Bug 42150 - Allow plugins to register Vue islands via registerIsland()
Bug 42189 - Allow plugins to inject dashboard widgets via a shared Vue widget
registry
However, they rely on the existing intranet_js hook which means they need to
generate HTML to be injected as <script> elements into Koha templates. While
functional, it's not as optimal and seamless as it could be.
--
I'm proposing a Koha core API endpoint which will return URLs to Javascript
modules (specifically ESMs) based on a provided "context key".
A Koha page will query this API endpoint with a context key like "smtp_servers"
or "catalogue-detail" or whatever really.
The API endpoint will then invoke a Koha Plugin Perl plugin hook like
"esm_module_provider" (or whatever), which will compile of list of URLs of ESMs
from Koha Plugins to load dynamically into that Koha HTML page.
This is pure Javascript with no HTML created via Perl.
When combined with "Bug 26129 - Add a new 'configurations' table", this could
be an extremely powerful tool for customizing Koha using plugins, especially
with a Javascript + API driven model.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/