svenevs / exhale

Automatic C++ library api documentation generation: breathe doxygen in and exhale it out.
BSD 3-Clause "New" or "Revised" License
219 stars 51 forks source link

Expand first-level of class hierarchy and file hierarchy by default #82

Open apartridge opened 5 years ago

apartridge commented 5 years ago

We have every class in our own namespace + directory, so the hierarchy looks something like this

It would be very nice if there was a config for expanding the first level of the hierarchy by default, so that the user does not have to click it. We are using sphinx_rtd_theme, with "createTreeView": True.

svenevs commented 5 years ago

Hi @apartridge,

So just to make sure I understand, you are wanting to have an option to expand stuff one level while using the sphinx_rtd_theme? Right now there's a bootstrap version of that treeViewBootstrapLevels.

Easiest to just confirm with a picture, compare the current output online with the following screenshot made by setting it to two (git clone https://github.com/svenevs/exhale-companion.git -b bootstrap)

--- a/docs/conf.py
+++ b/docs/conf.py
@@ -68,6 +68,7 @@ exhale_args = {
     # HTML Theme specific configurations.                                      #
     ############################################################################
     "treeViewIsBootstrap": True,
+    "treeViewBootstrapLevels": 2,
     # NOTE: there exist many other options for you to tweak.  See
     # http://exhale.readthedocs.io/en/latest/reference_exhale_configs.html#bootstrap-mods
     ############################################################################

level_2

The bootstrap stuff is all kind of legacy at this point, I'm not telling you to switch themes, just making sure this is what you are looking for only for the collapsibleLists version (the default, unless you set treeViewIsBootstrap to True).

I need to fix some broken CI but am hoping I can hack in a quick feature patch. The javascript library is different, but the logic tracking levels is already in place so it may just be a matter of changing something small. Let me know if this isn't what you are looking for, but I'll proceed assuming it is :slightly_smiling_face:

apartridge commented 5 years ago

Hi @svenevs, yes that sounds correct.