Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the documenter (documentation generator) #120

Open
7 of 40 tasks
fmease opened this issue Dec 24, 2021 · 0 comments
Open
7 of 40 tasks

Improve the documenter (documentation generator) #120

fmease opened this issue Dec 24, 2021 · 0 comments
Labels
A-documentation Area: Documentation A-tooling Area: Tooling T-enhancement Type: Enhancement

Comments

@fmease
Copy link
Owner

fmease commented Dec 24, 2021

General

  • Rewrite the documenter to render pages in parallel (without creating files yet)
  • Filter non-public bindings by default
  • Show bindings of any visibility with --show-private-declarations, -P (placeholder name) and also render the public attribute (with a link to the exposure reach if restricted). Should this apply to dependencies as well?
  • Generate documentation for re-exports (public use-bindings). Which use-bindings should we show with --show-private-declarations? Also @(public topmost) for example?
  • remove the debug attribute output in the documenter (at last!) and implement proper attribute support (except public)
  • Make doc an attribute namespace and make doc-* attributes members of the namespace (stripped off their prefix) (superseded by Remove @doc-{reserved-identifier{s,},attribute{s,}} and everything in core annotated with it #131)
  • Consider merging @doc-attributes, @doc-attribute, @doc-reserved-identifiers, @doc-reserved-identifier into a more general @doc-role/@doc.role (superseded by Remove @doc-{reserved-identifier{s,},attribute{s,}} and everything in core annotated with it #131)
  • For types and functions, format parameters in the "sugared form" (not as part of pi-type literals). Allow the user to change between both formats. Either per declaration (but I don't want to add a noisy/cluttered link/button) or in the settings (see other bullet points)
  • If deemed useful, implement a settings button (maybe on the ledge on the right) where one can set the theme, etc.
  • Implement a dark theme and manually switching between light, dark and system (where the latter automatically sets the appropriate theme)
  • Search for good color palettes and commit to it. Note that we don't use that many colors right now (which is good) except for certain special attributes (deprecated, internal, …)
  • Somehow add the label internal to internal attributes. Parse the name of the attribute given with @doc-attribute (…) and check if it is internal (but is_internal is a method on AttributeKind not AttributeName!)
  • Make the argument of @doc-attribute (…) a path instead of a text literal (superseded by Remove @doc-{reserved-identifier{s,},attribute{s,}} and everything in core annotated with it #131)
  • Create an unstable option -Z developing (…) which replaces the const DEVELOPING
  • Do not generate (dead) links to bindings defined in an external component (e.g. core) that is not part of the documentation pipeline (because of --no-deps or --no-core/no core: {} (e.g. linking Type to reserved.html and attributes))
  • Do not generate (dead) links to private bindings (once we don't show private bindings)
  • UI test suite

Searching

  • Implement proper searching based on Levenshtein distance
    • Find a JS implementation with a good license
    • Don't treat paths as a string but as separate segments without losing the power of Levenshtein distances
  • If feasible create a single search index file which contains information about all documented components
  • If deemed useful, search through all packages/components or only the goal (or the current?) component depending on a setting
  • Make the search results pop up while typing (though throttled)
  • Show the type of the search result next to the path (normal declaration, keyword, attribute, …)
  • If deemed necessary, show the start of the documentation next to the path
  • The list of results should close when clicking outside of the search bar or the search results
  • If possible optimize the search index for lookup speed
  • Actually fully evaluate the type signatures
  • Public expressions (esp. "type aliases") should be treated as neutrals/should be irreducible. This requires a separate function in the typer I suppose. This strongly ties in with irreducible opaque (non-@transparent) bindings (see Opaque by default (aka abstract by default) #115)

AsciiDoc(tor) Integration

  • Pass documentation to AsciiDoctor with the flag -Z asciidoc (…) (via af2ecec) (note: this is not performant at all (see description of 2cd1401 for more); we need our own AsciiDoc processor implementation)
  • Somehow support using binding paths in AsciiDoc (as a (pseudo) macro?) (via 2cd1401)
  • Implement --opening of the documentation using the default browser (via 9ceeddb)
  • Write a static source code highlighter and integrate it
  • Try to get rid of the dependency on AsciiDoctor (low priority, high cost)

Source File View

  • Generate source file pages for each source file
  • Allow linking to a range of lines
  • Set the proper URL for source code links
  • Also render a source link for modules (we only do that for types and functions, right now)

Fonts

  • Convert all TTF into WOFF and WOFF2 files (with the extension .ttf.woff/.ttf.woff2) and update fonts.css
  • Make sure the licenses are set up correctly
@fmease fmease added A-tooling Area: Tooling T-enhancement Type: Enhancement A-documentation Area: Documentation labels Dec 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Documentation A-tooling Area: Tooling T-enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests

1 participant