Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow categorizing exported types in the sidebar #1532

Closed
thislooksfun opened this issue Mar 11, 2021 · 8 comments
Closed

Allow categorizing exported types in the sidebar #1532

thislooksfun opened this issue Mar 11, 2021 · 8 comments
Labels
enhancement Improved functionality help wanted Contributions are especially encouraged
Milestone

Comments

@thislooksfun
Copy link

Search Terms

sidebar, category, exports, class, interface

Problem

When exporting a large project the sidebar quickly gets overloaded with semi-internal types that 99% of users won't use, thus burying the types that are actually relevant.

Suggested Solution

It would be great if adding @category foo-bar to an exported type would split the sidebar into groups. This would then allow for use cases such as:

  • having a single main export (function/class/etc) that is prominently separated from all the helper types
  • logically grouping like types that have disparate names
  • segregating away all the types that are only exposed for the <1% of people who might need them
@thislooksfun thislooksfun added the enhancement Improved functionality label Mar 11, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 12, 2021

Dupe of #1332, which I could have sworn I replied to with the issues I ran into the last time I tried this... but apparently not

Essentially what stopped this then was that the sidebar then no longer matched the page order... but I just ran another test, and apparently this would correct this problem, not cause it!

It wouldn't fix the "functions with multiple categories get rendered twice" issue, but that's fine. I don't have a good solution for this yet.
image

@thislooksfun
Copy link
Author

Yeah I thought it might be a dupe of that, but it was so terse I couldn't fully tell.

I know it's only semi-related, but I would consider the double-declaration a feature, not a bug. If it's in multiple categories I would honestly expect it to do that.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 12, 2021

That's... a really good point. Okay, yeah, I'd be fine treating that as a feature. Just need to fix the duplicate id in the page for links in 0.21 then.

@Gerrit0 Gerrit0 added this to To do in Version 0.22 via automation Mar 22, 2021
@nex3
Copy link

nex3 commented Oct 8, 2021

It would be cool if this could cover instance members for interfaces and classes as well as exported members of modules.

nex3 added a commit to sass/sass-site that referenced this issue Oct 8, 2021
This is kind of a hacky workaround until TypeStrong/typedoc#1532 is
implemented for real.
nex3 added a commit to sass/sass-site that referenced this issue Oct 11, 2021
This is kind of a hacky workaround until TypeStrong/typedoc#1532 is
implemented for real.
@Gerrit0 Gerrit0 added this to Might be resolved in Theme Rebuild Oct 18, 2021
@tmigone
Copy link

tmigone commented Jan 20, 2022

Any news regarding this feature @Gerrit0? thanks for the tool btw it's awesome

@Gerrit0 Gerrit0 added the help wanted Contributions are especially encouraged label Jan 23, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 23, 2022

Nope, I don't think this was something that was done in #1794, shouldn't be too difficult to do though.

@minologyVN
Copy link

is this feature available now ? Don't see any news regarding this feature

@Gerrit0 Gerrit0 added this to the v0.24.5 milestone Apr 22, 2023
@symil
Copy link

symil commented Jan 9, 2024

Now that it's implemented, it took me some time to figure out how to actually use the feature, and in the end it was as simple as adding the following to my typedoc.json (you can change the category names of course):

{
    "navigation": {
        "includeCategories": true
    },
    "defaultCategory": "Utility",
    "categoryOrder": [
        "Core",
        "Utility",
        "Advanced",
        "Internal"
    ]
}

Then you can tag types/functions/etc with @category <name> and they will be displayed under this section in the sidebar.

Btw a thousand times thank you for this great tool! It's simple to use and the generated documentation is really good looking and easy to navigate.

asaf400 pushed a commit to asaf400/ass-site that referenced this issue Apr 18, 2024
This is kind of a hacky workaround until TypeStrong/typedoc#1532 is
implemented for real.
asaf400 pushed a commit to asaf400/ass-site that referenced this issue Apr 18, 2024
This is kind of a hacky workaround until TypeStrong/typedoc#1532 is
implemented for real.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality help wanted Contributions are especially encouraged
Projects
No open projects
Theme Rebuild
Might be resolved
Development

No branches or pull requests

6 participants