Helm PHR Theme as plugin
kuvakina opened this issue · 13 comments
- To understand the difference between PulseTile-Core and PulseTile-Helm;
- Make Helm PHR Theme as a plugin;
- Possibility to install Helm PHR theme as Core library.
Hi, Tony! We have an idea regarding this issue.
- We'll create new plugin, that would be a container for non-core plugins (in this case - for TopThreeThings, Feeds and Vaccinations);
- This container will include all relations between plugins, that would be necessary for correct work;
- The idea that we would add this container to core project as a plugin. Adding method will be general for any plugins set.
Main difference between current plugins' adding method and new one is shown at the picture:
We are not sure that it will work, but we can try to do it.
@tony-shannon could you please share your opinion regarding this.
ok many thanks @BogdanScherban
thanks Bogdan, I've just seen it and I like the idea, but we need to address the theme issue first, ie the look and feel the html, css, images that make Helm PHR look different
I think these are already in a separate repo. but we need to consider the idea of a theme repo as a plugin, hope that makes sense
So the Helm theme (config file, css, images) could be a seperate repo and then added to the container plugin?
thanks, Tony! Yes, we'll add CSS, configs and images to this plugin.
some more comments on how this should be done;
2 examples;
Helm PHR
config file for the build
Core UI Framework (PulseTile-React-Core)
+
Core Plugins _ Meds, allergies, Diagnosis (PulseTile-React-Core)
+
Helm Theme Plugin - Plugin - Blue , Pictures, logos (PulseTile-HelmPHR-Theme-Plugin- new repo)
Atlantic PHR
config file
Core UI framework React-Core
+
Core Plugins Meds Allergies (no diagnosis) React-Plugins
+
Atlantic Theme Plugin - Fishes, Green , New logo React -Plugin
Build HelmPHR
Build AtlanticPHR
PS
Question: what is the difference between;
PulseTile/PulseTile-React-Core
fork to
LeedsCC/Pulse-React ? + images /assets
@pacharanero FYI, the SliceArt/PioGroup team are coming back with ideas on how we shift the architecture in this direction, see my comment above, thanks
@tony-shannon
Hi, Tony! There is our idea how to solve this issue.
All information for HelmPHR version will be located in separate directory theme/ (you can see it on images below)
This directory will include:
- non-core plugins that required for current theme (Vaccinations, Top Three Things and Feeds);
- CSS-styles (for blue theme)
- images (logo, banners etc.)
- config files that unite Core and theme/.
The main idea:
- Don't change Core if it is possible. Core part should be common for any non-core plugins;
- To move styles and images in theme/ and don't change styles that are necessary for Core
- If we want to add other non-core plugins in future, we will change theme/ and won't change Core part
At the moment we added Vaccinations plugin the next way. The steps are:
- Add TopThreeThings and Feeds to theme/;
- Add styles and images;
- Check our solution by Unit-tests and prepare pull-request.
ok, this idea is ok but its not clear if you are talking about source files pre build or post build files?
Please clarify
See this feedback
there are 2 aspects to this,
- source files/plugins and then
- how these are assembled into built/implemented files for use
For the purposes of 1) source files/plugins
-The theme files should be kept to the minimum to store "look and feel" changes, and these themes should exist as a seperate plugins
-Core plugins should not reside within the theme plugin
-a config file should be used to combine the build of core plugins + non core plugins + theme plugin
For the purposed of the 2) built files, they may end up as you suggest perhaps, but should reside that way in the source repos
We looked into the issue with NPM today. And based on our research we came with this idea:
We created new NPM-modules on npm-website:
https://www.npmjs.com/package/pulsetile-react-core;
https://www.npmjs.com/package/top-three-things
They can be installed by the next commands (as modules in node_module/ directory):
npm install pulsetile-react-core;
npm install top-three-things
If we want to create the build, we should do the following automatically:
- Extract pulsetile-react-core from node_module/ to the root directory;
- Extract top-three-things from node_module/ to the src/components/pages;
- Make all changes for TopThreeThings adding;
- Create the build
When we would do this, we’ll create plugin for HelmPHR theme and unite it the same way.
Is this way to create build ok? We’ll wait for your confirmation.
chat excerpt...
Question from Tony
sure, I assume core codebase needs a container for plugins somewhere?
eg
<Code>
<Core>
<Core-Plugin container>
( this should pick up any plugins that are in this path )
<Plugin A>
etc
Answer from Bogdan
We have one more idea.
We suggested the similar principle here: #201 (comment)
Core has a special directory for non-core plugins and relations between Core and them. If we want to add or remove non-core plugin - we will change code only inside this container.
We tried to realize this conception for Vaccination and TopThreeThings, and it works correctly.
So, we can try to do the following:
- npm install pulsetile-react-core will install Core and move it in required place;
- npm install pulsetile-react-silver-top3things will install TopThreeThings inside the container for plugins;
- we dynamically create files which are necessary for plugin adding (in the container, not in the Core)
.. end of chat excerpt
This task was done and merged:
https://github.com/PulseTile-Plugins/Plugin-Helm-PHR-Theme
This plugin includes images and styles required for Helm-PHR theme. It is united to Core automatically by generator: https://github.com/RippleOSI/Helm-PHR-Generator
good job, thanks @BogdanScherban
@tony-shannon Could we move it to Done?