Problem/Motivation
Current settings included in module, theme and profile .info.yml files should be separated into more appropriate config files, like .settings.yml, .libraries.yml, .regions.yml.
examples with more details:
https://www.drupal.org/project/ideas/issues/1398772#comment-10533558
Proposed resolution
Minimize the configuration included in .info files, as a preparation to use composer for dependency management.
Remaining tasks
Create subtasks to clean up the .info files.
Docs:
Module .info: https://www.drupal.org/docs/creating-custom-modules/let-drupal-know-abou...
Theme .info: https://www.drupal.org/docs/theming-drupal/defining-a-theme-with-an-info...
Profile .info: https://www.drupal.org/docs/distributions/creating-distributions/how-to-...
Comments
Comment #2
pasqualleComment #3
pasqualleComment #4
jwilson3Re @dww on #1398772-118: Replace .info.yml with composer.json for extensions:
Where is this discussion happening? Without knowing more, moving regions from info.yml to regions.yml feels like a poorman's refactor, in light of what I had in mind with making theme settings first-class Config Management citizens. Eg, themes would provide default
regionsprop in config/install/[themename].settings.yml, where they could then be managed (CRUD + reordered + grouped + attributes) via the UI, and synced with config management via Drush like the rest of Drupal. This is kind of an interesting first step to having a hybrid control of theme region layout exposed to a decoupled frontend via a structured data object.Comment #5
jwilson3Seems like there is a lot of definition work and brainstorming to be done. (each property in the info file may need to be moved in a different way). Was the intention to have a different meta per type (module/theme/profile) to further break down the work, or to shop around ideas for all three types here and try to coalesce around common properties that would be cleaned up in similar ways, then come up with actual process steps required for getting it all done, into subtasks?
Comment #6
dwwRe: #4: See, e.g. #1398772-79: Replace .info.yml with composer.json for extensions from @catch in 2015, and some subsequent comments. I don't know of a dedicated core issue to discuss it in full. What you're talking about sounds interesting, but perhaps over-complicated. I'm not as much of a front-ender, but in my experience, theme regions seem pretty hard-coded and baked into the theme. The ability to dynamically add/remove/reorder them via the UI seems fraught with peril. 😉 So what if I click/drag a new region into existence? Don't I have to manually update various Twig templates to support it? Seems like the hard-coded metadata list more accurately reflects reality than exposing this to CRUD via the UI.
Comment #7
jwilson3You're right that moving existing functionality to a new file, a la regions.yml, as hardcoded metadata would accurately reflect reality.
I guess what I'm getting at is that using config mgmt instead of regions.yml would set the stage for more improvements in the future. Those improvements I mentioned are all out of scope of this refactor. Let's say we don't expose a UI for the regions. Must everything in a config yml file be exposed in the UI? (I feel like I've worked with cases where certain module configs use CMI but don't explicitly expose all their settings).
Even if we had to make a UI for it, I feel like themers are intimately familiar with the concept of clicking something into existence in the UI, and then manually CRUDing templates in the theme to match that reality, so this doesn't feel like so much of a leap of faith. And, bonus, if the project is using drush cex/cim to sync code with database, then there is nothing really new here to learn.
Comment #9
andypostper #6