Option to disable compact navigation structure when a category contains only one reflection #2667
Labels
enhancement
Improved functionality
good first issue
Easier issue for first time contributors
help wanted
Contributions are especially encouraged
Milestone
Search Terms
compact, navigation, single reflection
Problem
Given: The typedoc.json
navigation.includeCategories
option is set totrue
.When there is only one reflection with a given @category tag, the rendered docs will not render the category as a dropdown. Instead, it will be displayed in a compact form, i.e., "(category name)/(reflection name)". This can be visually confusing (and aesthetically unpleasing), especially when there are other categories that are not compacted.
For example, suppose I have a module named colors.ts which has 7 interfaces named
Red
,Orange
,Yellow
,Green
,Blue
,Purple
, andGray
and 1 class namedColor
. And suppose I separated the interfaces into 3 categories: "Warm", "Cool", and "Neutral". The rendered navigation for the colors module would look like the following:I would like to be able to render it as a dropdown like the following despite
Gray
being the only reflection categorized under "Neutral":Suggested Solution
Add an additional boolean configuration option like
navigation.compactOrganization
ornavigation.compactStructure
(I'm not sure of the best name). It can default totrue
(in which case, nothing changes), but if set tofalse
, categories (and groups) containing only a single reflection will still render a dropdown.The text was updated successfully, but these errors were encountered: