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

Change the link icon action when clicked to give user options

Open timbl opened this issue 4 years ago • 3 comments

— the “goto this” brings up new windows which is not what you want. Chromium doesnt come with tabs, so electron does not have hat problem so I’m using drag into the URI bar to navigate When you edit something, you can use any local unix text editor

Tim Berners-Lee @timbl 17:44 Tim: Lets have a choice of 4 or 6 options when you click on that icon, liek open her, open new tab, ope new window, open here in the same mashlib code.

timbl avatar Mar 24 '21 17:03 timbl

I would like this menu be very easy to customize. So perhaps the easiest is to create the menu with the options you mention, then look for a global window.SolidContextMenu variable, and if found, use it to add items to the menu. Menu items could be web apps (e.g. open current resource in Penny web app) or, in the case of Data Kitchen, local apps (e.g. open current resource in emacs, notepad, or protege).

Something like this:

    window.SolidContextMenu = [
      { label:"Penny", type:"webApp", url "https://penny.vincenttunru.com/explore/?url=%s"},
      { label:"emacs", type:localApp, command: "/usr/bin/emacs %s"},
    ]

When solid-ui constructs the menu, it will substitute the current resource URL for %s in all options. It will then set the action for web apps to open the url in a new window. For local apps, It will pass the command. to a window.runSolidContextMenu() method the app developer is responsible for creating.

jeff-zucker avatar Mar 24 '21 19:03 jeff-zucker

Penny?

timbl avatar Mar 25 '21 18:03 timbl

@Vinnl 's penny-pod-inspector run as a web app, see https://penny.vincenttunru.com/

jeff-zucker avatar Mar 25 '21 19:03 jeff-zucker