typedb / typedb-driver

TypeDB Drivers for Rust, Python, Java, Node.js, C, C++, and C#.
https://typedb.com
Apache License 2.0
34 stars 32 forks source link

Refactor generated C++ documentation: Iterator/Future #589

Open izmalk opened 7 months ago

izmalk commented 7 months ago

Description

The answer section of the C++ driver API reference contains four new files:

Future__RETURN__NATIVE_PROMISE__HELPER__.adoc
Iterable__NATIVE_ITER__NATIVE_T__T__HELPER__.adoc
Iterator__NATIVE_ITER__NATIVE_T__T__HELPER__.adoc
typedefs.adoc

Adding these files to the C++ Driver API reference makes in-page navigation much harder. The first three files add third-level headings, visible in the in-page table of contents, with very long and strangely looking names, like Future< RETURN, NATIVE_PROMISE, HELPER >. The fourth file adds about 30 different 3rd-level headings to the page, making the table of contents very long and barely usable (it fails to scroll for some reason).

Environment

  1. TypeDB distribution: Core/Cloud
  2. TypeDB version:
  3. Environment: Linux/Mac/Windows/TypeDB Cloud/Google Cloud/AWS/Azure
  4. Studio version:
  5. Other details:

Reproducible Steps

  1. Generate the API reference for the C++ driver

  2. Insert the API reference into our documentation

  3. Build the docs and check the resulting API reference page

Expected result

Shorter 3rd level headings in the first three files, like Future. One 3rd level heading combining all other headings from the typedefs.adoc file.

Additional information

Our Table of contents displays all 2nd and 3rd level headings on the page.

izmalk commented 7 months ago
Screenshot 2024-02-07 at 10 20 36 Screenshot 2024-02-07 at 10 20 45 Screenshot 2024-02-07 at 10 21 03
izmalk commented 7 months ago

This is what it looks like after manually fixing the headings, as suggested above.

Screenshot 2024-02-07 at 10 44 52

The resulting files are attached as an example: Archive.zip