Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update integration-guide.rst - update to AboutView from About #882

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/integration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ Let's go to the ``docker/plugins`` directory within ``mwdb-core`` repository and
First is ``package.json`` that contains short specification of our plugin. Name must contain ``@mwdb-web/plugin-`` prefix.

.. code-block:: json

{
"name": "@mwdb-web/plugin-hello-world",
"version": "0.0.1",
Expand All @@ -269,7 +270,7 @@ Finally we can write simple plugin that adds new ``Hello world`` page. Let's che

// Import from MWDB Core commons and components
import { View } from "@mwdb-web/commons/ui";
import About from "@mwdb-web/components/About";
import { AboutView } from "@mwdb-web/components/Views/AboutView";

function HelloWorld() {
return (
Expand Down Expand Up @@ -337,10 +338,10 @@ So ``navbar`` is one of ``Extendable`` wrappers that can be found within applica
Web plugins: how it works internally?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are two requirements to be fulfilled by plugin engine:
There are two requirements to be fulfilled by the plugin engine:

* Plugin code needs to be loaded and executed along with core application
* Plugin must be allowed to reuse and extend core application parts
* Plugin code needs to be loaded and executed along with the core application
* Plugin must be allowed to reuse and extend the core application parts

MWDB uses Rollup import aliases and Vite virtual modules to make a link between plugin code and the core.

Expand Down Expand Up @@ -380,7 +381,7 @@ as ``@mwdb-web/*`` aliases:
Building customized images
--------------------------

If you want to extend MWDB with new features using plugin system, it's always useful to be able to build your own customized Docker images.
If you want to extend MWDB with new features using the plugin system, it's always useful to be able to build your own customized Docker images.

There are two ways to do that:

Expand Down Expand Up @@ -409,6 +410,7 @@ Building custom backend image is simple as in `Dockerfile` below:
Backend plugins are linked in runtime, so that part is pretty easy to extend. A bit more complicated thing is frontend part:

.. code-block:: Dockerfile

ARG MWDB_VERSION=v2.9.0
FROM certpl/mwdb-web-source:$MWDB_VERSION AS build

Expand Down