silverbullet icon indicating copy to clipboard operation
silverbullet copied to clipboard

Feature: better text handling

Open bilogic opened this issue 1 year ago • 4 comments

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.

bilogic avatar Jun 13 '24 12:06 bilogic

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.

zefhemel avatar Jun 14 '24 04:06 zefhemel

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 avatar Jun 14 '24 05:06 bilogic

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.

bilogic avatar Jun 16 '24 06:06 bilogic

I literaly suffer (sic!) with similar issue with [name](hyperlink)s, especially on mobile (e.g., Firefox on Android). There is simply no way to edit a link once you have created one. The issue is slightly better on desktop browser where I can point the caret right after/before a link and move into it using arrow keys in order to edit it. But this is not the case in mobile browser(s) where there are no arrow keys on the on-screen phone keyboard at all! Whenever you click either the [name] or the (hyperlink) part, the browser pops up a small window asking for permission to open the link, well, because there is a link, in fact. :grimacing:

I think there no simple solution to this exists except that links would be accessible for edits only with special extra action (e.g., Link: Edit) and displaying small icon to call it right after the link (or something alike) and not rendering a HTML link if in the link and the link is in edit mode.

Other solution may be to expose caret movement commands like Caret: Move Left, Caret: Move Up etc., we could use to add icons to the top bar for mobile browsers to cope with this issue. Remember, there is also no Control key on mobiles natively.

Another solution would be to adopt "visual" and "edit" modes, either for Markdown AST leaves or for the whole document (ala how vi(1) works). In the "edit" (or "insert") mode things like ## and [name](link) will be visible, in the "visual" mode they won't but will be rendered as usual instead. The switching could be automatic, based on caret traversing the Markdown AST and opening the CM just for the leaf beying edited. Just some ideas... :grinning:

This issue is extremely annoying because it makes using Silverbullet on mobile phone almost impossible and fast browsing through notes on desktop worse than it could be.

@zefhemel Do you have some other ideas how this could be solved, please, you can share with us? Thank you.

mjf avatar Sep 17 '24 06:09 mjf