Skip to content

How are Koka web-rendered "hover tooltips" implemented? #119

Answered by daanx
dan-zheng asked this question in Q&A
Discussion options

You must be logged in to vote

:-) Thanks! Yeah, the Koka compiler generates a "range map" with type information etc for each compilation unit and this is used for example by the VSCode language server that @fwcd is working on (#100). But also it is used to generate the documentation for the standard libraries and documentation. The documentation uses Koka's "literal" mode with kk.md files. You can find this in the doc/spec directory but it is all undocumented for now; the util/docs script generates it all (use stack exec koka -- util/docs to run it).

Anyway, the tooltips are pure css, the file doc/koka.css specifies this. Essentially there are link elements <a> with a class .pp (for popup) and inside the link elements…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dan-zheng
Comment options

Answer selected by dan-zheng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants