-
Notifications
You must be signed in to change notification settings - Fork 1
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
IDE-style tooltips #209
IDE-style tooltips #209
Conversation
cc @Joannis |
Sounds like a good plan to me! |
so, as a POC, this is working, but there are some weird frontend issues that need to be worked out before this is production ready. right now we are rendering the tooltips on the client-side in the inline “analog” way
pros:
cons:
i think embedding tooltips inside the |
my gut feeling is that the tooltips really need to be a separate layer, disconnected from the HTML of the underlying article. e.g, they should be |
positioning the tooltips dynamically from JS was definitely the way to go, it was a lot easier than i imagined |
for render API users, this appends a hidden swift-unidoc/TypeScript/Sources/Main.ts Lines 128 to 205 in ac8a340
|
linking these two issues which are not blocking this PR but are far more noticeable with the new feature: |
my thinking around tooltips is we eventually want to support them everywhere, not just in codelinks. so we should not try to emit tooltips inline in the HTML renderer because
<code>
elementhref
inlining, because we cannot inject HTML elements into an HTML attribute, which would basically mean no IndexstoreDB tooltipsinstead, we will attach pre-rendered tooltip elements to some hidden section of HTML, and it will then be some client-side javascript’s responsibility to attach the tooltips to any element that has a valid
href
attributepros:
cons: