jsdoc-baseline
jsdoc-baseline copied to clipboard
Feature Request: Wrap the html for properties and methods inside div tags
Hi guys,
it is nice that JSDoc provides the ability to include / exclude certain properties and methods via the build settings (opts.access: public, protected, undefined, private, all), but from an UX perspective it would be way nicer to build the docs with all properties & methods and apply filter options inside the template.
There could be checkboxes at the top of the docs page like: Include private Include inherited etc.
and when you check them show or hide the relevant entries.

This would be pretty simple:
Wrap the properties and methods dom / html into div tags like:
<div class="is-private is-inherited">
and when you uncheck the "show private" checkbox just apply a css class to a style tag like:
is-private {display:'none'}
Best regards Tobias
i have never worked with .hbs files, but this is my first shot.

not sure if there is an easy way to remove the ! from the class name(s), but you get the idea. symbol-detail.hbs:
the code formatting breaks terribly for this one, adding a screenshot (hit edit on this comment to see it...).
`{{!-- Note that we omit the labels for classes, modules, and namespaces, since these labels would duplicate the labels for the page's main heading. --}} {{~#if symbol.kind~}} {{~#withOnly allLabels=(labels symbol)~}} {{~#any allLabels~}}
{{#unless hideconstructor}}
<dl {{~cssClass '!dl-compact'}}>
{{#embed 'details'}}{{/embed}}
</dl>
{{/unless}}
{{/with}} {{~#if symbol.kind~}} {{~#withOnly allLabels=(labels symbol)~}} {{~#any allLabels~}}