Links not detected in scopes

Bug #1546364 reported by Kugi Eusebio
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
Wishlist
Alejandro J. Cura
Ubuntu UX
New
Undecided
Paty Davila
unity-scopes-api (Ubuntu)
Confirmed
Wishlist
Unassigned
unity-scopes-shell (Ubuntu)
Confirmed
Undecided
Unassigned
unity8 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Expected Result:
When texts from data sources includes links, these links should be automatically detected and should be clickable.

Actual Result:
The links are treated as simple texts and are not clickable.

Best example of this is the twitter scope. There are usually links on posts however you need to open the tweet first just to open the link instead of directly clicking it from the scope.

I think it should be automatic or let the developers decide to do it or maybe add a new action to open links from the post instead of making the link clickable the actual content.

Changed in canonical-devices-system-image:
assignee: nobody → Alejandro J. Cura (alecu)
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Michi Henning (michihenning) wrote :

Added scopes-shell because I don't think this should be handled as part of scopes API. If we do it there, the scopes end up being responsible for the parsing of the message content, and doing this redundantly in each scope implementation would quickly lead to inconsistencies.

If we do want this feature, it probably should be implemented in the shell.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Right. Including unity8. In the Qt world something like this is normally achieved by having a QLabel with rich-text allowed (allowing a small subset of HTML tags), but this may open a can of worms...

Revision history for this message
Albert Astals Cid (aacid) wrote :

Are we sure we want to do auto-parsing of contents?

Revision history for this message
Michi Henning (michihenning) wrote :

I don't know whether we should do it. It's up to design. But the original bug report doesn't seem unreasonable to me. It's the same thing as with an email client that displays plain text. It still highlights URLs and makes them clickable.

I have no idea how hard it would be for us to do the same though.

Markings as invalid for scopes-api because I don't think this belongs at that level. Let me know if you disagree, please!

Changed in unity-scopes-api (Ubuntu):
status: New → Invalid
Revision history for this message
Michał Sawicz (saviq) wrote :

I agree we should have a list of accepted formatting tags - <b>, <i>, <a> maybe, depends on how much customization we want to allow. We should filter all the unwanted ones and give the rest to Text for rendering.

Here's a list of supported tags:

https://doc.qt.io/qt-5/richtext-html-subset.html

Revision history for this message
Michi Henning (michihenning) wrote :

Re-opened for scopes-api because, if this goes ahead, we'll have to update the API doc and show which result fields are going to be treated as rich text, and a link to the formatting details.

Changed in unity-scopes-api (Ubuntu):
status: Invalid → New
Changed in unity-scopes-api (Ubuntu):
assignee: nobody → Michi Henning (michihenning)
importance: Undecided → Wishlist
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

After discussing this with unity-scopes-api folks on irc, and after getting a bug about the twitter scope showing "&amp;" instead of "&", it seems reasonable to extend this bug to include some known subset of html entities (in addition to a known set of mark ups).

Therefore I am marking the twitter-scope bug a dup of this one.

cheers

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-scopes-api (Ubuntu):
status: New → Confirmed
Changed in unity-scopes-shell (Ubuntu):
status: New → Confirmed
Changed in unity8 (Ubuntu):
status: New → Confirmed
Paty Davila (dizzypaty)
Changed in ubuntu-ux:
assignee: nobody → Paty Davila (dizzypaty)
Changed in unity-scopes-api (Ubuntu):
assignee: Michi Henning (michihenning) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.