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

Improvement in rendering of hidden substitutions #961

Open
dbuenzli opened this issue May 13, 2023 · 2 comments
Open

Improvement in rendering of hidden substitutions #961

dbuenzli opened this issue May 13, 2023 · 2 comments
Labels
enhancement New feature or request output

Comments

@dbuenzli
Copy link
Contributor

dbuenzli commented May 13, 2023

The whole experience for writers improved quite a bit over the years. Basically we no longer have to define artificial types we can now write:

module M : sig 
  type t

  module Sub : sig 
    (**/**)
    type m := t
    (**/**) 
 
    type t 
    val get_m : t -> m
  end
end

And at render time that m reference is turned into a t that links to M.t. However from a reading perspective it can get confusing:

Screenshot 2023-05-13 at 14 48 22

That second link goes to M.t.

Should maybe odoc render the fully qualified name in this case ?

For reference here's what happens if one does not hide the substitution, it's then quite clear what's happening but m links on the substitution and another name is still introduced:

Screenshot 2023-05-13 at 14 53 56
@dbuenzli dbuenzli added output enhancement New feature or request labels May 13, 2023
@jonludlam
Copy link
Member

Would a tooltip with the complete path help? I'd rather something we can apply universally than just attempt to detect types that render the same but point to different targets (would we do the ambiguous check per value, per signature, per include?)

@dbuenzli
Copy link
Contributor Author

dbuenzli commented Jun 5, 2023

Would a tooltip with the complete path help?

Doesn't really help with reading, I can already hover on the link and it shows me the destination. Basically for now I opted not to hide substitutions, it gets too confusing otherwise.

I'd rather something we can apply universally than just attempt to detect types that render the same but point to different targets (would we do the ambiguous check per value, per signature, per include?)

The idea would be to apply it on any hidden substitution regardless of whether it renders the same as something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request output
Projects
None yet
Development

No branches or pull requests

2 participants