-
-
Notifications
You must be signed in to change notification settings - Fork 743
Description
Search Terms
compact, navigation, single reflection
Problem
Given: The typedoc.json navigation.includeCategories
option is set to true
.
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
, and Gray
and 1 class named Color
. 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
or navigation.compactStructure
(I'm not sure of the best name). It can default to true
(in which case, nothing changes), but if set to false
, categories (and groups) containing only a single reflection will still render a dropdown.