solid-focus icon indicating copy to clipboard operation
solid-focus copied to clipboard

Feature Request: Add links to tasks

Open angelo-v opened this issue 1 year ago • 6 comments

One of the big advantages of Solid is the ability to link data. To use that power in Focus I would like to be able to link tasks to other things.

Imagine a Task "Cook dinner" with a link to a recipe that I can open in Umai.

In a later stage this could advance to a "Open With" feature, but as a first step it would just be nice to add links

angelo-v avatar Sep 12 '24 17:09 angelo-v

I like the idea, but do you have any suggestions on how to do this in RDF and the UI?

In Umai, I already "support" linking recipes by adding links on the text. For example, if you add the link to another recipe (even if that's the url of the document, not only the url in Umai), it'll capture the navigation rather than visiting the url. You can see this for example in my recipe for Ramen (However, in this case there is a bug I'm aware of where you need to open the entire cookbook or it doesn't work).

You can also do that in Focus, since it supports markdown; but currently I'm not capturing any links.

Maybe another solution would be to support attachments, and other than files support attaching "things". For example, I could say that something is a schema:Recipe and provide the url for the resource. That, combined with being able to link to attachments in the text in some way could work. Though I'm not sure what to use for "attachaments" in RDF, or if I have to make something up.

Any ideas?

NoelDeMartin avatar Sep 13 '24 00:09 NoelDeMartin

Nice feature in Umai, did not know that. For generic attachments there is <http://www.w3.org/2005/01/wf/flow#attachment> which SolidOS is using and I am also going to implement into PodOS.

angelo-v avatar Sep 16 '24 17:09 angelo-v

By the principle of least privilege, Focus shouldn't actually know about and ask for permission of arbitrary RDF things.

The way open-with should eventually work (in an SAI forward compatible way), is to discover the user's app launcher, which will then display or redirect to the relevant app. There a variety of options on how discovery could work and I'm slowly working on a guide that keeps those options open for now: https://jg10.solidcommunity.net/open-with/guide.html#app-launcher-discovery

The current functionality to specify links in markdown is therefore 80% of the way there, and the key question is how UX might be improved within the current and future constraints of Solid.

jg10-mastodon-social avatar Jun 23 '25 11:06 jg10-mastodon-social

By the principle of least privilege, Focus shouldn't actually know about and ask for permission of arbitrary RDF things.

An extra clarification on this one, prompted by https://github.com/NoelDeMartin/solid-focus/issues/15#issuecomment-2706782441 : Focus could ask for permission for additional RDF things like shopping lists, pantry lists, and recipes. Each request would need to be approved by the user given that it would constitute the app gaining access to new data and a new type of data.

jg10-mastodon-social avatar Jun 28 '25 00:06 jg10-mastodon-social

It would be great to improve on both pasting bare URLs and manually writing markdown links. I did a bit of digging and found that the ClipboardItem API supports copying HTML, not just plain text. I've filed a suggestion on Umai https://github.com/NoelDeMartin/umai/issues/31 because I understand this functionality is already supported e.g. to paste formatted links into Google Docs.

In receiving applications, such as Focus, the paste event can be intercepted, and instead of by default pasting plain text into a textarea, the HTML link could be converted to markdown and inserted.

https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event

In principle the HTML could include other metadata too, for example providing the URI of the resource and indicating it's a recipe, in RDFa:

<a 
 href="https://umai.noeldemartin.com/viewer?url=https://noeldemartin.solidcommunity.net/cookbook/ramen%23it"  
 about="https://noeldemartin.solidcommunity.net/cookbook/ramen#it"
 typeof="https://schema.org/Recipe"
>
 Ramen
</a>

In principle when intercepting this kind of information, Focus could write custom markdown knowing that it's a recipe.

I think it's the copying application's responsibility to follow the principle of least privilege - it needs to clearly convey to the user how much information is being shared.

jg10-mastodon-social avatar Jun 28 '25 12:06 jg10-mastodon-social