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

added support for local style.ini files #134

Merged
merged 3 commits into from
Oct 12, 2012
Merged

added support for local style.ini files #134

merged 3 commits into from
Oct 12, 2012

Conversation

selfthinker
Copy link
Collaborator

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 over style.ini if it exists. This follows the same principle as the rest of the config files [https://www.dokuwiki.org/config#configuration_files].

@selfthinker
Copy link
Collaborator Author

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?

@splitbrain
Copy link
Collaborator

personally I'd rather like to see style.ini be replaced by .less variables. not sure if it makes sense to even extend this..

@selfthinker
Copy link
Collaborator Author

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.
And as we planned to do something about style.ini for about 3 years or so (or longer?), this intermediate solution should be worth adding.

@dom-mel
Copy link
Collaborator

dom-mel commented Oct 7, 2012

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. ;-)

@glensc
Copy link
Contributor

glensc commented Oct 7, 2012

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

@michitux
Copy link
Collaborator

michitux commented Oct 7, 2012

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).

@selfthinker
Copy link
Collaborator Author

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 conf/style.arctic.ini might be an option.

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!

@splitbrain
Copy link
Collaborator

Looks good. Any chance for a unit test of css_styleini()?

splitbrain added a commit that referenced this pull request Oct 12, 2012
added support for local style.ini files
@splitbrain splitbrain merged commit b2fd988 into master Oct 12, 2012
@splitbrain
Copy link
Collaborator

merged. but a unit test would still be nice

splitbrain pushed a commit that referenced this pull request Feb 28, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants