Problem/Motivation
Follow-up from #3071906: To really overwrite theme-colors the array needs to be used in theme-options.yml. Ideally, we should use theme-options.yml from parent theme which has good knowledge of default content for theme-options.yml file.
Consider doing the same for gulp-options.yml
Proposed resolution
Try to add default theme-options.yml with nice examples to parent themes and remove hardcoded content in _bs_base_generate_file().
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | copy-theme-options-yml-from-parent-3099329-3.patch | 4.61 KB | pivica |
Comments
Comment #2
pivica commentedHere is a patch. Added support for parent_theme/template.theme-options.yml. There is no point of adding support for gulp-options.yml, we need to generate it from scratch.
Comment #3
pivica commentedLet us support a case when parent theme is not defining theme-options.yml - no copy then.
Added minimal bs_bootstrap/theme-options.yml.
Comment #4
pivica commentedTested a bit and seems it works fine.
Found one minor problem with reporting and using `$this->logger()->info` calls. It seems they will be printed to console only when executing drush with -v option, more details in Consolidation\Log\Logger:
which would mean that info will be shown only when you execute `drush -v`.
So with the current patch when you execute update you get next output:
So we are missing some report lines from before. If you add -v switch you are getting
Not sure should we convert all `$this->logger()->info()` calls to `$this->logger()->notice`, then we would have:
Also, last two [ok] lines are coming from bs_base which use old log calls, and we can normalize this later when we depreciate Drush 8 and move that code to bs_lib Drush command.
On the end not sure what is the best thing to do, but i guess it make sense to try to keep console logging as before.
Comment #5
primsi commentedI guess this was x-posted. Addressing here https://www.drupal.org/project/bs_lib/issues/3071090#comment-13424863
Comment #6
pivica commented> I guess this was x-posted. Addressing here
Yeah sorry for that.
Comment #7
pivica commentedI accidentally committed this with a wrong commit message for https://www.drupal.org/project/bs_lib/issues/3071090#comment-13424863.