Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295445

Add a way to render and view an example of all Render Elements

$
0
0

For UX and Frontend developers it is kind of difficult to get an overview of all available elements that can be rendered. There is a module for this called styleguide https://www.drupal.org/project/styleguide. But currently it has hardcoded all elements in drupal core with custom render arrays. So modules or new core developments offering new elements would have to be added later or by new contribs.

First off it might be a great addition to add the styleguide as a core module.
Second it would be helpfull to add example/dummy (or whatever you want to call it) method to the ElementInterface and Class to make it possible to generically render a render array with test/dummy data to render within this styleguide module. Maybe even make it return multiple render arrays when different sets of options give different visual outputs of Elements.

If this is implemented it would be very easy for core Elements and contrib Elements to automatically be added to the output of the styleguide. Also developers can see a nicely features example of an Element.


Viewing all articles
Browse latest Browse all 295445


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>