AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] Links behaviour

Open apomalyn opened this issue 3 years ago • 5 comments

Describe the bug

I did found some issues with the link usage. Here is the list of what I found (if prefixed with 🐛 it's a bug, otherwise it's a behaviour problem):

  1. 🐛 Links aren't clickable
  2. 🐛 Can't remove a link without deleting the text that contains the link
  3. 🐛 On the link edition/creation dialog you can type anything and it's still accepted, it should only accept URL (from web URL to system (I don't know how they are called) URL like mailto, call, etc.)
  4. Link icon on the tool bar disabled until you select some text, even if your cursor is on a existing link.
  5. UPDATE 🐛 On a link if you add text, the link is cut in two.
Link cut in two

Screen Recording 2022-06-28 at 12 09 34

Expected behavior

  1. A link should be clickable (or a tooltip should indicate how to open it, like for example: Ctrl + click)
  2. On the dialog to set a link we could have a 'delete'/'clear' button, when we clear the URL text field and click on 'save' the link should be deleted.
  3. If the URL is invalid the 'save' button should be disabled and an error message under the text field should explain the error
  4. If the cursor is positioned in a link, the link button is enabled.
  5. The added text should be added to the link.

Desktop (please complete the following information):

  • OS: MacOS
  • Version: 0.0.4.1

apomalyn avatar Apr 14 '22 19:04 apomalyn

@appflowy I updated the description to add another bug:

UPDATE 🐛 On a link if you add text, the link is cut in two.

apomalyn avatar Jun 28 '22 16:06 apomalyn

Thanks @apomalyn

appflowy avatar Jul 03 '22 03:07 appflowy

When the user clicks on link text nothing really happens. Ideally Appflowy would expand the link so the user can edit both the link text and the URL independently.

Normally we type [link text](http://site.com) by hand. When we do Appflowy does not recognize that this is a link. IMHO that would be very desirable. It's what a WYSIWYG Markdown editor would be expected to do.

johnblommers avatar Aug 03 '22 20:08 johnblommers

When the user clicks on link text nothing really happens. Ideally Appflowy would expand the link so the user can edit both the link text and the URL independently.

Exact. Let me update the expected behaviour to include on a long hover, the user could see a helper that should allow to open or edit the link. Is it okay with you?

Normally we type [link text](http://site.com) by hand. When we do Appflowy does not recognize that this is a link. IMHO that would be very desirable. It's what a WYSIWYG Markdown editor would be expected to do.

Currently, AppFlowy doesn't support Markdown at all (correct me if I'm wrong @appflowy)

apomalyn avatar Aug 03 '22 21:08 apomalyn

A long hover over a link sounds like a terrific solution.

So I just assumed Workflowy was a Markdown editor?

johnblommers avatar Aug 04 '22 03:08 johnblommers

Hi @apomalyn , the link feature has been significantly improved. Please have a try!

Most of the issues you reported are fixed, except for handling invalid URLs. I'll create a new issue for that. Hope to get more feedback from you soon!

  • [x] Links aren't clickable
  • [x] Can't remove a link without deleting the text that contains the link
  • [ ] On the link edition/creation dialog you can type anything and it's still accepted, it should only accept URL (from web URL to system (I don't know how they are called) URL like mailto, call, etc.)
  • [x] Link icon on the tool bar disabled until you select some text, even if your cursor is on a existing link.
  • [x] UPDATE 🐛 On a link if you add text, the link is cut in two.

annieappflowy avatar Apr 05 '23 09:04 annieappflowy