-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow themes to have config
folders
#6122
Comments
I dont think its quite the same as #4829. I've pushed my code. |
Interesting issue. This sounds like it could be really useful, but I've not thought a lot about this. Seems like this could benefit contrib theme developers. What do others think about this? |
I would like to see this implemented because |
This makes a lot of sense. A lot of themes have settings, and this would make the config consistent with modules. |
Added a brief test to this to show that themes without a |
Thanks @docwilmot! Test coverage and the general feature look solid to me! I added a commit to add |
I still think it would be a good idea, since people will probably still be looking for it on the API site. |
By @docwilmot, @quicksketch, @klonos, @kiamlaluno, and @yorkshire-pudding.
I merged backdrop/backdrop#4440 into 1.x. This looks great! Thanks @docwilmot for your work on this! |
Reopening this, in order to keep it within our radar for a change record. |
I'm not sure if this fact was considered when creating these changes, @docwilmot. I haven't done any testing to see if this will create regressions, BUT: Color module already creates
BTW, this settings file created by Color gets rebuilt every time you clear caches. This came up as I was investigating an issue with a subtheme (Thesis) and its puzzling handling of overridden colors. Then I saw what this patch did to core (basically checking for the existence of As a side note: The use of a config file that gets rebuilt by a module on cache clears (by Color) seems wrong to me. |
Did a bit of testing with a custom test theme that provides a settings config file with a dummy key. Color does add its usual stuff to that file under key |
Yeah, that could be an issue. We'll need to check if the |
Well, I was going to create an issue, but now I'm not so sure. Point 1 in @argiepiano's post may not be entirely valid AFAICT: the |
I left a comment on the PR, but I now noticed the PR has been already merged. (Yes, the purple sign was impossible to miss, but I was able to miss it. 🤦🏻♂️) |
Should I open a new issue for that change, if it is indeed the right change? |
@kiamlaluno If you are suggesting a change to this PR, you should create a new issue. This issue is closed for work and merged, @klonos opened it only for purpose of creating a Change Record (as I understand it). If there is a problem with this PR, it should be a new issue and a new PR. |
@stpaultim I noticed the changes have been committed after I commented on the PR. I did not open an issue because I forgot about my comment on this PR, but I am considering that. |
I made a stab at a change record for this: https://docs.backdropcms.org/change-records/backdrop-will-now-discover-settingsjson-configuration-files-in-a-theme-config-folder. From my understanding, it's not just that a theme can have settings in a config folder, but that it should be .settings.json and there needs to be a |
I haven't tried it yet but that looks correct from what I can tell. We should link to/mention that change record here as well: EDIT: I took a stab at that. |
@laryn I see it. Looks good to me |
On https://docs.backdropcms.org/documentation/adding-theme-settings-advanced, there are some |
Fixed. |
Description of the need
Currently CMI does not scan themes for a config folder. Not sure if there is any major disadvantage to doing so, but it may be helpful in solving Use config for color module palettes
Themes do save data in config, but only by syncing from the info file during enabling, and/or saving the settings form.
This may also allow deprecating
info
file settings such assettings[]=xxx
etc.Proposed solution
Allow themes to have
config
foldersThe text was updated successfully, but these errors were encountered: