-
-
Notifications
You must be signed in to change notification settings - Fork 849
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
added support for local style.ini files #134
Conversation
Although we are in feature freeze, I would like to add this to Adora Belle. You could argue that it fixes an annoying bug... What do you think? |
personally I'd rather like to see style.ini be replaced by .less variables. not sure if it makes sense to even extend this.. |
Yes, we discussed it a few times that we should replace our style.ini with something else. If that is LESS (like proposed in FS#2316) or something else should be discussed. But I agree that it should generally be done. And I would definitely like to see an admin interface for that! This is not so much about extending our current functionality but about fixing it. E.g. our upgrade instructions and that an upgrade supposedly works by just overwriting everything and everything will be fine, is otherwise wrong and misleading. |
IMHO this is a must have. It would be consistent with the other config files and enabled a more smooth updating. Even if we switch to less (would take 2 releases with deprecation?) it would still worth this patch. ;-) |
does that style.local.ini end up in lib/tpl/ dir? or in conf/ dir? i would vote for conf/ to note everything that's configurable to be in there, like plugin_lang currently is in conf/ dir |
As a result of the discussion we've just had in our IRC meeting it will be in the template dir for now and we might add proper config cascade support with conf/ as recommended solution in a future release (or change it to use something else). |
It is too late for the current release to add local style.inis to the config cascade and/or make them available in the conf folder. That's also a bit different as each template would need its own style.ini file. So, to have something like On the other hand we already have local configs. Why not simply add pattern replacement values to the standard template config?!? That would also solve the problem how to make them available through the admin interface! |
Looks good. Any chance for a unit test of css_styleini()? |
added support for local style.ini files
merged. but a unit test would still be nice |
This simplifies style loading and allows the plugins like farmer to extend the the loading of style files. Also adds some first unit tests. Originally discussed in FS#2703 and #134 Squashed commit of the following: commit 5ed550f6ba61a1d475b7572cbff18f0d790c78c2 Merge: 0cefed6 cab1833 Author: Andreas Gohr <gohr@cosmocode.de> Date: Thu Feb 28 13:38:46 2019 +0100 Merge branch 'styleConfCascade' of https://github.com/annda/dokuwiki into annda-styleConfCascade * 'styleConfCascade' of https://github.com/annda/dokuwiki: Clean up StyleUtils Update StyleUtils test Fix array to boolean conversion Use better placeholder string in config cascade Calls to StyleUtils use the new constructor Add test for StyleUtils Refactor StyleUtils WIP add temporary test comparing two implementations of StyleUtils WIP add new style config cascade side by side with the old one commit cab1833 Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Thu Feb 21 17:54:27 2019 +0100 Clean up StyleUtils commit 766e390 Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Thu Feb 21 17:51:15 2019 +0100 Update StyleUtils test commit f5c0878 Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Thu Feb 21 12:51:53 2019 +0100 Fix array to boolean conversion commit c967169 Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Thu Feb 21 12:38:55 2019 +0100 Use better placeholder string in config cascade commit 4845eff Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Thu Feb 21 12:24:16 2019 +0100 Calls to StyleUtils use the new constructor commit 7a6337a Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Thu Feb 21 12:22:44 2019 +0100 Add test for StyleUtils commit 5ae9e8f Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Thu Feb 21 12:16:57 2019 +0100 Refactor StyleUtils commit a2adcc9 Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Sat Feb 16 23:58:04 2019 +0100 WIP add temporary test comparing two implementations of StyleUtils commit 845c40c Author: Anna Dabrowska <dabrowska@cosmocode.de> Date: Sat Feb 16 23:59:41 2019 +0100 WIP add new style config cascade side by side with the old one
Currently a template's style.ini file is the only thing which will get overwritten when updating. This introduces support for local style.ini files. I.e. a template's
style.local.ini
will take precedence overstyle.ini
if it exists. This follows the same principle as the rest of the config files [https://www.dokuwiki.org/config#configuration_files].