Closed tvdijen closed 3 years ago
We're currently looking into resolving this issue as part of a new theme that is being developed. Below is the idea, any feedback is very welcome! Doubly so feedback from @tvdijen ;-)
As for @tvdijen's ideal scenario: i'm not sure that this would make your theme installable via composer. It should be possible to amend the node.js script in such a way that it "sees" that a theme is installed with composer and looks in the right place. But the amount of time i have to look into that depends on how fast i can get the new setup to work.
I believe this is now sufficiently solved as per @Badlapje's comment. If things are still lacking, I propose to file more concrete wishes based on the experiences with the current state of affairs.
I was asked by @pablothedude to file an issue here to discuss some of the things I ran into during the migration of my custom theme to the new style theming in 5.11..
1) At first, it wasn't clear to me when I followed the docs that I could actually add paths to my custom theme instead of replacing them as suggested. If you replace them, you'd have to copy everything from the base-theme which is exactly what we don't want. It should also be very clear that the order of the paths matters and that your custom theme paths are likely to go first, base theme paths second.
2) It wasn't possible to easily change the base color scheme, which as addressed and solved in #730.. There may be more cases like this.. I haven't ran into them, but I haven't touched JS-overrides at all, so perhaps it needs a quick scan to make sure.
3) Eventually I managed to get a good end result, but one thing that stings is that I have to copy a whole template for only minor changes. @pablothedude suggested that this may or may not be solved using imports..
An example of the changes I make to the templates:
inserting a bit: https://github.com/SSCICT-IAM/OpenConext-engineblock/commit/694b2a80e18c6722b71f080b93723e6ea0d15720#diff-108b1b17d75b6547aabb206228296641R34-R60
replacing two blocks compared to the original template: https://github.com/SSCICT-IAM/OpenConext-engineblock/commit/694b2a80e18c6722b71f080b93723e6ea0d15720#diff-a1fc1f8adf5df700b32c91fcc108bd13R9-R10
4) The custom theme is not really self-containing.. It's still spread over at least three directories:
Even more ideally (a man can dream, right?) I'd install a theme using composer, perhaps with a little help of an installer similar to https://github.com/simplesamlphp/composer-module-installer