← Back to team overview

zim-wiki team mailing list archive

1:1 vs. piped links

 

I started to comment to pyzim bug
304605<https://bugs.launchpad.net/zim/+bug/304605>but I think it
warrants a wider discussion.

The bug refers to a specific situation: editing an existing link text
modifies the target, thus breaking the link.
But it reflects a wider usability/discoverability issue:
sometimes we want to keep target synced to text, sometimes we don't, and we
lack a good interface for both.

At the ends of the spectrum, I see 2 self-consistent, UI models:

The Text Is The Link:
* All links explicitly say where they point to.  Nothing is hidden.
* Link creation can be as simple as applying a "link" style to typed text.
* Link text can be directly edited to switch the link target.
* Downside: there is no way to beautify links to streamline reading.
* P.S. This model is easily extended to Tomboy-style autolinking.

The Text Is Just A Label:
* All links have text separate from target.  The user controls link
appearance.
* Turning text into a link requires a dialog for the target.
* Changing the text never updates the target.  Beautifying links is easy.
* Switching to a different target requires a dialog.

The first model is nice but insufficient for many users.
The second model is near-optimal when you do need the flexibility, but is
cumbersome if you don't.
Both can apply to external links (URL vs. label) as well as internal (page
name vs. label).

Currently pyzim is close to the second and that's annoying - you have to
type the same thing twice to create a link!

It's interesting to note that Gmail uses the second model (makes sense, mail
links are all external with ugly URL).
But their interface is more user-friendly than Zim's!
Also, they augment it by URL discovery (they automatically turn into 1:1
links).

Note that starting with 1:1 links and later beautifying them is a common
workflow.

I'm not sure how all this should be blended, but here are some tricks/ideas:

* Show broken links in red: this makes it obvious when you are
breaking/retargetting links.

* Don't even show text field in Link dialog, only target.
  This makes it clear that text is edited by directly editing the page.

* Have checkbox or radiobox in Link dialog to toggle 1:1 mode (default on).

* Show the 2 link modes in different colors.  E.g. blue/red for 1:1 links,
green for other links.

* While the editing cursor is on a link, it expands to also show the target,
e.g. [link|target].
  When the cursor leaves the link, it collapses and you see just the text in
blue.

* While the editing cursor is on a link, a tooltip-like mini-dialog hovers
beneath it.
  This is more discoverable and friendly, though less keyboard-friendly.
  Gmail does this.

* Consider Tomboy autolinking for creating links of the simple 1:1 kind?

-- 
Beni Cherniavsky-Paskin <cben@xxxxxxxxxxxx>

Follow ups