Where should examples / demonstration modules go
Follow up to https://github.com/localgovdrupal/localgov_forms/pull/52
We have Localgov Examples built in #159 as a module to contain examples on how to do things with localgov drupal for developers and site builders, although not many know it exists.
Would it be better to flesh that module out with examples, or place examples in existing modules?
I'd prefer to place examples in existing modules. I think it makes sense that when you are enabling a module you will see demo/example beside the module you are enabling.
If it goes in the examples modules, then
- You need to know there is an examples modules
- Have an up-to-date enough version to know there's an example for you
The bar for getting the specific example you want to the specific person you want is higher when it's abstracted into an examples modules. Even the Drupal examples module, I never think of using. But the example webforms in the webform module, I do enable and play with because they are in an easy to find place and I see them regularly.
I'm agnostic - I do look at the examples module, but usually just in the git browser - except to the point where enabling an example would potentially break a site. I don't think we should be shipping code or config that could end up on production sites that could break stuff or cause security issues, that should only be in dev dependency.
Further to the dev dependency thing https://github.com/localgovdrupal/localgov_forms/pull/52#issuecomment-1827778969 why not make examples part of include dev?