Compodoc: [FEATURE] Grouping components based on module

Created on 4 Apr 2017  路  15Comments  路  Source: compodoc/compodoc

Hi,

I would like to suggest that it would be better to have grouping of components according to their modules.Currently components are listed under the COMPONENTS section in alphabetical order.It would be useful particularly for larger projects(having lots of components) if the components are grouped together based on their modules.(Just like it's being shown in Modules under Declarations).

For eg:
If componentA and componentB are part of moduleA and componentC part of ModuleB,
then in generated documentation under COMPONENTS section

componentA
componentB

ModuleB
componentC
Medium Completed Enhancement

Most helpful comment

I have finally simplify the UI for modules and children :
Here is an example with the demo project :

  • before

compodoc github io_compodoc-demo-todomvc-angular_modules_todomodule html

  • after

localhost_8080_modules_todomodule html

All the components, directives, pipes and injectables of a module are now listed directly inside the concerned module.

All 15 comments

I agree. Components, directives, providers, pipes, etc should also all be nested under the modules in which they are declared.

If possible, it might be nice to have an option in the web UI so that the reader could choose to view the components etc, nested under module or not. Leaving them un-nested may sometimes be preferred in order to help find a component where the reader doesn't know what module it is in.

Ok, the idea of an web UI option could be fine too.
I thought providing an option for the command-line, but it is too restrictive.
Typedoc has these kinds of options : http://typedoc.org/api/classes/application.html

Hi all,

in addition to this really useful feature, I would suggest to also support nested modules. In larger projects it is beneficial to have modules defined in other modules. This should be reflected in the documentation as well (maybe optional).

This would help making this great documentation tool working better for larger projects as well!

Regards, Lars

@larsduelfer Yes. I need to really think about a way to manage very deep level of nested modules.
For now it is just a falt list by types.
After you could have :

  • module 1

    • module 2

      etc....

@larsduelfer @jaufgang @dharsanav
Here is a gif of a first design test of a possible implementation of a drilldown menu for modules. Hope it will fix nested modules support and duplicate names too...

etude-new-menu-gif

@vogloblinsky That looks good! Would it be possible to have the Component, Directive etc. entries then also below the nested modules to be able to see the components for a specific module only? That would be the ideal solution from my perspective.

@larsduelfer

Would it be possible to have the Component, Directive etc. entries then also below the nested modules to be able to see the components for a specific module only

What do you mean ?
Did you have a little example ?

  • Module A
    -- Component
    -- Directives
    -- ...
  • Module B
    -- Component
    -- Directives
    -- ...
    --- Module B1.1
    ---- Component
    ---- Directives
    ---- ...
    --- Module B1.2
    ---- Component
    ---- Directives
    ---- ...

Ok, that's the idea of the gif and drilldown menu.
Display list of module by hierarchy.
In the gif, you have AppModule, which contains HomeModule, which contains ListModule, which himself has components, but also directives etc....

Ok, than we are on the same page :-) I just wanted to make sure we are, since the gif currently only shows one single Component in the tree. Thanks a lot for the clarification!

This looks great. Waiting for the feature :)

This feature would also be great in case one i using this inside a mono repo.

I have finally simplify the UI for modules and children :
Here is an example with the demo project :

  • before

compodoc github io_compodoc-demo-todomvc-angular_modules_todomodule html

  • after

localhost_8080_modules_todomodule html

All the components, directives, pipes and injectables of a module are now listed directly inside the concerned module.

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. Why locking ? Having issues with the most up-to-date context.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pborregg picture pborregg  路  38Comments

ComFreek picture ComFreek  路  22Comments

rafapaulin picture rafapaulin  路  13Comments

froodley picture froodley  路  15Comments

tsteuwer picture tsteuwer  路  15Comments