nuvoleweb / ui_patterns

[NOTE] Development has moved to https://drupal.org/project/ui_patterns
https://drupal.org/project/ui_patterns
GNU General Public License v2.0
85 stars 56 forks source link

Add the ability to load a "README.md" for each defined pattern #322

Open minorOffense opened 3 years ago

minorOffense commented 3 years ago

We're working on a site where there are two groups responsible for managing the style guide and pattern library within an organization. One group manages the markup, accessibility and look of the components. The other is responsible for defining the guidelines and use cases for each pattern.

Right now both would be editing the same yml file to add a rather verbose description and it conflicts sometimes with changes made by the developers after adding variants or other changes to the pattern definition.

It would be great if the "description" parameter could be filled in using a separate yaml file. This would also allow for more verbose documentation to be added more easily.

Open to suggestions on the best way to organize those files or to use a different parameter in the yaml file.

I've been exploring modifying the templates for the patterns page to look for a separate file. Don't have anything working yet but I figured this might be a feature others would be interested in (or if I'm lucky have already done on their own).

backlineint commented 3 years ago

@minorOffense the UI Patterns Pattern Lab module happens to do this for Markdown files - https://www.drupal.org/docs/8/modules/ui-patterns-pattern-lab/requirements-for-automatic-discovery Even if the module doesn't fit your use case, how it handles markdown documentation might give you some ideas.