-
-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Option to disable compact navigation structure when a category contains only one reflection #2667
Comments
With #2656 I believe this is unnecessary |
#2656 was for a way to prevent reflections from being placed into an "Other" dropdown. This new issue is for a way to prevent dropdowns from being compacted into a categoryName/singleReflection form. The way it is now, if
But I want the option to tell it to just go ahead and treat it as if there were multiple reflections with "@category Neutral" so that it renders as a normal dropdown like this:
|
Gotcha, that makes sense! |
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: