silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.01k stars 138 forks source link

Feature: better text handling #890

Open bilogic opened 2 weeks ago

bilogic commented 2 weeks ago

Problem: When there are URLs in the text, trying to move cursor rapidly with a mouse or touch often results in accidental clicks, this immediately causes a browser to open up trying to load the URL

Perhaps there can be an additional pop up for the user to click on more time to load the URL? On desktop, user can directly launch by holding ctrl + click.

zefhemel commented 2 weeks ago

Would a pop-up really help? Clicking a link opens a tab, which is a kind of pop-up already that you can just close.

FYI: Holding down Alt (or Option on Mac) and clicking a link will avoid the navigation behavior and just move the cursor there.

bilogic commented 2 weeks ago

Would a pop-up really help? Clicking a link opens a tab, which is a kind of pop-up already that you can just close.

Currently, clicking on a link has a very "heavy" reaction: it opens a new browser tab which changes a large portion of the display (1), yes it can be closed, but if the link happen to have something interesting, such as an ad etc (2), both points make it very disruptive to the train of thought.

What I mean was a small pop up in SB for the user to click again, it can show the link itself or Open in browser, the user has the option to click the pop up to load the link, or ignore it and continue along his way, and this comes from experience with VSCode.

Let me list the common scenarios where I run into this unwanted behavior:

  1. I wanted to edit my URL by moving the text cursor to the middle of a URL with a mouse click, but forgot to press alt -> heavy reaction
  2. I was just trying to move my text cursor near a link, but accidentally clicked onto the link instead -> heavy reaction
  3. I want to copy the link with my mouse cursor and send to a friend -> heavy reaction

FYI: Holding down Alt (or Option on Mac) and clicking a link will avoid the navigation behavior and just move the cursor there.

Hmm, in the course of using SB, I think we navigate/edit text alot more often than clicking on links, yes? Thus probably better for the behavior to be inverted, i.e. navigating to directly to links require a keystroke to be pressed, most commonly ctrl/cmd

bilogic commented 2 weeks ago

image

This is what happens in the terminal of VSCode when I click on the URL, it shows a pop up in which I can click on Follow link or hold down ctrl and click the URL again.