Bug 493278 - SelectableLabel: Standard feature to copy link via right-click
Summary: SelectableLabel: Standard feature to copy link via right-click
Status: CONFIRMED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Other
: NOR wishlist
Target Milestone: Not decided
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-17 16:29 UTC by reports_go_brrr
Modified: 2025-05-19 01:51 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Showcase (999.27 KB, video/mp4)
2024-09-17 16:29 UTC, reports_go_brrr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description reports_go_brrr 2024-09-17 16:29:58 UTC
Created attachment 173780 [details]
Showcase

SUMMARY
KDE Plasma Settings can't copy embedded links in text by Right Click.
Check out the video for showcase of bug.
Works under X11 and Wayland.

STEPS TO REPRODUCE
1. Open Settings
2. Go to "User Feedback"
3. Press RMB upon "our privacy policy here."

OBSERVED RESULT
Context Menu won't show, so I can't copy the link.

EXPECTED RESULT
To fix it.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.9-arch1-2 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Vanilla KDE Plasma, vanilla EndeavourOS.
Keys capturing in the video done by ShowMeTheKey.
Comment 1 Nate Graham 2024-09-17 20:34:19 UTC
This is... complicated. In QML software there are multiple ways of making clickable links within long text areas work, and to my knowledge none of them implement what you're looking for.

This particular implementation in the user Feedback KCM is a QtQuick TextEdit in read-only non-selectable mode. We could fairly easily implement the requested feature right here, but that wouldn't help every other implementation out there.

Options include:
- Actually implement it for every case (bad, obviously)
- Implement it for Kirigami.SelectableLabel and port everything to use that (better, but sometimes selectability is overkill and giving something called "SelectableLabel" a non-selectable mode is worthy of the mad hatter)
As above, but create a new non-selectable text component in Kirigami and port non-selectable text labels to use it (maybe okay but at this point it's feeling like we should just do it in Qt)
- Implement the feature in upstream QT components (harder, fewer people could do it, would take like a year before we could actually use it anywhere)

What do you think would be the right place to fix this, Nicolas?
Comment 2 reports_go_brrr 2024-10-10 19:00:25 UTC
(In reply to Nate Graham from comment #1)
> This is... complicated. In QML software there are multiple ways of making
> clickable links within long text areas work, and to my knowledge none of
> them implement what you're looking for.
> 
> This particular implementation in the user Feedback KCM is a QtQuick
> TextEdit in read-only non-selectable mode. We could fairly easily implement
> the requested feature right here, but that wouldn't help every other
> implementation out there.
> 
> Options include:
> - Actually implement it for every case (bad, obviously)
> - Implement it for Kirigami.SelectableLabel and port everything to use that
> (better, but sometimes selectability is overkill and giving something called
> "SelectableLabel" a non-selectable mode is worthy of the mad hatter)
> As above, but create a new non-selectable text component in Kirigami and
> port non-selectable text labels to use it (maybe okay but at this point it's
> feeling like we should just do it in Qt)
> - Implement the feature in upstream QT components (harder, fewer people
> could do it, would take like a year before we could actually use it anywhere)
> 
> What do you think would be the right place to fix this, Nicolas?

Actually it works perfectly fine in "KDE Connect" Section of Settings. It shows "Copy Link Location" in Context Menu for links.
Comment 3 Nate Graham 2025-02-26 19:38:43 UTC
It's because that UI element is using QtWidgets, which gives this to us for free. the User Feedback page is built with QtQuick, which does not give this to us for free.
Comment 4 Nate Graham 2025-05-19 01:51:30 UTC
I can in fact implement this in Kirigami.SelectableLabel. That's probably the best we can do here.