dlang-community / harbored-mod

A documentation generator for D with support for both DDoc and Markdown.
Boost Software License 1.0
18 stars 14 forks source link

fix issue #5: Highlight the current module in the TOC. Add folding tree #44

Closed Akzwar closed 9 years ago

Akzwar commented 9 years ago

I've created folding tree for table of contents. We think that this is more convenient for navigation and UX.

kiith-sa commented 9 years ago

Is it identical to previous behavior when JS is disabled?

The initial reason I started harbored-mod with was actually to get docs that are usable with NoScript; but I don't have a problem with optional JS-based features.

EDIT:

also, whitespace seems broken (see the GitHub diff) - harbored-mod uses tabs to ensure at least some ability to move code between harbored and harbored-mod.

EDIT2:

Also; variable names seem to be using snake_case; harbored-mod uses camelCase as it's the official D standard.

I've also pushed some changes I've just been working on; writeTOC now writes to a range (e.g. to use Appender) instead of a File, but I can work that out manually; but the noscript/style consistency is needed)

Akzwar commented 9 years ago

I think that I fixed issues you mention earlier. With disabled javascript works only current module highlightning and tree is unfolded.

Akzwar commented 9 years ago

Nope. I've found another bug. Fixing...

kiith-sa commented 9 years ago

(spaces still seem to be inconsistent in tocbuilder.d)

9il commented 9 years ago

How clickable packages will work with folding?

http://9il.github.io/atmosphere_gm/doc/atmosphere.html

kiith-sa commented 9 years ago

I didn't think about that, but the clickable packages mentioned above are also important for some projects. Just create a package.d with some documentation for the module declaration to see it.

Also: from seeing the above 'fixed spaces', the indentation still seems inconsistent; look at the GitHub diff. harbored-mod uses one Tab for one indentation level to ensure (limited) ability to move code to/from harbored - your commit still uses spaces.

update- even the second 'fix spaces' commit - as long as there are spaces even at the beginning of the line, indentation will break with different Tab sizes (GitHub uses 8, but some people use e.g. 4). This is the main problem with tabs.

Akzwar commented 9 years ago

Clickable packages works same as unclickable. Opens appropriate package description, and, if has any childs, unfolds proper branch.

Akzwar commented 9 years ago

Finaly fixed this... I don't understand the problem, but vim and gedit shows proper tabs.

kiith-sa commented 9 years ago

I don't think it's (completely) fixed: see https://github.com/dexset/harbored-mod/commit/926f6ae06ec8fb9c2424ef43825bd496497163ce

anyway, I'm going to test it now at least, space changes shouldn't affect functionality

Akzwar commented 9 years ago

Ok, I'l try it...

kiith-sa commented 9 years ago

Clickable packages seem to be usable.

Akzwar commented 9 years ago

What do you mean?

kiith-sa commented 9 years ago

I tested the packages and they seem to work. I'm going to try to merge this if you have no more modifications to make. I

kiith-sa commented 9 years ago

I merged it, thanks for the change.

Note that there were still some bugs I had to fix (unended <span>, redundant onclick for selected non-package items).