Skip to content

API <-> source rendering UX #1374

@panglesd

Description

@panglesd

In a discuss post, @dbuenzli suggested an alternative to the "Source" links that takes you from documentation to implementation:

The idea is to hyperlink the identifier (eg the x in val x : int -> int) instead of adding a new textual link (Source in val x : int -> int [Source]).

The advantage is: less things put on screen, nicer browsing once you know the feature.
The disadvantage is less discoverability.

The linked post mentions another suggestion: that clicking on an identifier declaration in the source takes you to its documentation when it exists.

It feels natural to me:

  1. In the API docs clicking on a name generally leads you to its interface definition.
  2. If you click on the name of its interface definition it leads you to its implementation definition. [eg x in val x : int -> int]
  3. If you click on the name of its implementation definition it leads you to its interface definition. [eg x in let x i = i]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions