retext-project / retext

ReText: Simple but powerful editor for Markdown and reStructuredText

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Link destination popup on hover

donjan opened this issue · comments

Using ReText 8.0.1 on Ubuntu 22.04.

Enabled the WebEngine renderer option (had to pip install PyQt6-WebEngine).
With live preview on.

Observed behaviour

When hovering over a link, nothing happens. The user must either click the link or copy the address and paste it, to know what the link points to.

Expected behaviour

A popup should appear, showing the destination URL.

Either in the bottom left, as with most web browsers:

Screenshot from 2023-07-17 18-23-00

Or floating near the link, as in LibreOffice Writer:

Screenshot from 2023-07-17 18-23-25

Awesome :-) !! -- because I miss this feature for a long time! Few hours ago I spotted this issue and was hooked again!

red-kite@0c234ef

I'm on it (again -- years ago I tried hacking qt-stuff for exactly this reason but got tired and failed)

A bit more work is to be done before pull-request:
As noted in the commit itself I want to drop the statusbar implementation and go with a 'custom Widget or so' resulting in a »bottom left, as with most web browsers«-solution which I want to upvote as this exactly killed me back then ^^

I aim for something like a small class urlPopup(QtWidgets.QWidget): […] but done for today…
(hints, ideas welcome)

This one works for me until a qt professional shows how to do it right :-)
Show link target in lower left corner
Compare with master: master...red-kite:retext:showLinkOnHover

@red-kite thanks for implementing this!
I've had it patched in for a while now, works perfectly.
Would love to see this mainlined, any movement on your PR?

Thank you @donjan for reminder and using/testing this piece so far. I have to admit that I got stuck on the remaining task of this PR: implementing the changes for dark-mode. (More on this in the PR's discussion)

Merged #634, so closing this issue. Thanks @red-kite!