Page MenuHomePhabricator

[clang-doc] Add index in each info html file
AbandonedPublic

Authored by DiegoAstiazaran on Jul 19 2019, 11:06 AM.

Details

Summary

An index structure is created while reducing the infos. This is then passed to the HTML generator so it's included in each file created.
Paths in the index are fixed (relative to the current file) for each file.
Index is currently rendered on top of the info content, this will be fixed later with CSS.

Diff Detail

Event Timeline

juliehockett added inline comments.Jul 25 2019, 8:56 AM
clang-tools-extra/clang-doc/Generators.h
28

Add a comment here indicating that this should be created before calling any generateDocForInfos. Also add a fix-it note to the following effect:

FIXME: This currently needs to be run before generating any individual documentation pages, since the content it generates is directly included in every page. A better design would be to lazily include it in the individual documentation pages, in which case this could be run in parallel with calls to generateDocForInfo().

clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
359–368

The indentation here seems a bit off

DiegoAstiazaran marked 3 inline comments as done.

Rebase and add comments.

clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
359–368

Fixed by D65005.

I think everything but the implementation of genIndex being confusing looks good to me. I haven't actually groked how that code works yet other than the fact that it generates the index tree that I expect and all the surrounding code looks good to me. I understand that some of the trickiness here comes from the fact that you're building from a list of values but trying to generate the tree structure from that list which is hard. I think we can structure that code better; lets see if we can't device a better algorithm.

clang-tools-extra/clang-doc/Generators.cpp
16

Please document this function with more internal comments. I have no idea what's going on here and the shifting of 'I' is super confusing to me.

20
DiegoAstiazaran abandoned this revision.Aug 5 2019, 6:11 PM

D65690 replaces this revision.