localgov icon indicating copy to clipboard operation
localgov copied to clipboard

Where should examples / demonstration modules go

Open andybroomfield opened this issue 2 years ago • 3 comments

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?

andybroomfield avatar Nov 15 '23 18:11 andybroomfield

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

  1. You need to know there is an examples modules
  2. 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.

markconroy avatar Nov 16 '23 10:11 markconroy

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.

ekes avatar Nov 16 '23 10:11 ekes

Further to the dev dependency thing https://github.com/localgovdrupal/localgov_forms/pull/52#issuecomment-1827778969 why not make examples part of include dev?

ekes avatar Nov 27 '23 12:11 ekes