Links as calm chips; the focused link glows #162

Closed
opened 2026-10-14 06:40:04 +00:00 by kayg · 4 comments
Owner

kayg: links shouldn't be underlined. They should read as calm, clean chips (reference screenshots below).

Links to notes:

  • Show as a soft pill inline with the text: a small note icon, then the title, on a faint fill with a hairline edge and a whisper of shadow. The text colour is quiet.
  • No underline and no dashed line.
  • The pill keeps the line height, so lines never jump.

Focused or active link (caret on it, hovered, or selected with the keyboard):

  • The same pill gets a soft, warm multicolour gradient ring, cyan into yellow into orange, plus a little lift.
  • The change is instant with the keyboard and a quick fade with the mouse.
  • Unfocused links stay quiet; the focused one is the only thing that glows.

Other link types:

  • External links: italic or accent-coloured text with no underline, and a very faint dotted line only on hover. A trailing ↗ only on hover.
  • Unlinked mentions and anything that currently uses the dashed underline (including the log-line link from the smart →) get the same calm treatment. No dashed lines anywhere.

The [[ picker: it uses the same note icon for each row, with roomy rows and a soft panel.

Source mode shows the raw markdown, without pills.

Constraints:

  • No layout shift.
  • Caret movement across a pill works like plain text (the pill is decoration, never an atomic widget that eats the caret).
  • Works with hidden syntax, the tree lines, IME and wrapping.
  • Test at 320–1440, light and dark.

Do not name the reference product in code, commits or docs.

kayg: links shouldn't be underlined. They should read as calm, clean chips (reference screenshots below). **Links to notes:** - Show as a soft pill inline with the text: a small note icon, then the title, on a faint fill with a hairline edge and a whisper of shadow. The text colour is quiet. - No underline and no dashed line. - The pill keeps the line height, so lines never jump. **Focused or active link** (caret on it, hovered, or selected with the keyboard): - The same pill gets a soft, warm multicolour gradient ring, cyan into yellow into orange, plus a little lift. - The change is instant with the keyboard and a quick fade with the mouse. - Unfocused links stay quiet; the focused one is the only thing that glows. **Other link types:** - External links: italic or accent-coloured text with no underline, and a very faint dotted line only on hover. A trailing ↗ only on hover. - Unlinked mentions and anything that currently uses the dashed underline (including the log-line link from the smart →) get the same calm treatment. No dashed lines anywhere. **The `[[` picker:** it uses the same note icon for each row, with roomy rows and a soft panel. **Source mode** shows the raw markdown, without pills. **Constraints:** - No layout shift. - Caret movement across a pill works like plain text (the pill is decoration, never an atomic widget that eats the caret). - Works with hidden syntax, the tree lines, IME and wrapping. - Test at 320–1440, light and dark. Do not name the reference product in code, commits or docs.
Author
Owner

Today's dashed log link, then the references:

Today's dashed log link, then the references: ![](https://git.kayg.org/attachments/db66ca2e-d696-4964-892b-a6fab1d11824) ![](https://git.kayg.org/attachments/eabb2bb2-09c6-4916-8233-7cb173c36d08) ![](https://git.kayg.org/attachments/3deb6c8a-2559-4d70-9ed5-f41de9e572e4) ![](https://git.kayg.org/attachments/c3d0b376-af25-426b-95e7-42b24d4564d6) ![](https://git.kayg.org/attachments/f370c9a1-45e9-4da5-8897-a8c42a26a7d5)
Author
Owner

Evidence for PR #231 (real server and engine, production build). Each picture: a paragraph with three note links with the caret on the second (the one that glows), a web link (↗ pill), a long log-line link that wraps into one pill per line, a link to a missing note (faded pill, no dashes), and links inside nested list items with the tree lines from #133.

The [[ picker is not in here: it moved to #165, which can reuse .link-chip and the --icon-note-link / --icon-web-link masks.

320 light (Chromium, WebKit)

chromium-320-light.png webkit-320-light.png

320 dark (Chromium, WebKit)

chromium-320-dark.png webkit-320-dark.png

390 light (Chromium, WebKit)

chromium-390-light.png webkit-390-light.png

390 dark (Chromium, WebKit)

chromium-390-dark.png webkit-390-dark.png

1440 light (Chromium whole window, then the text close up in Chromium and WebKit)

chromium-1440-light.png chromium-1440-light-text.png webkit-1440-light-text.png

1440 dark (Chromium whole window, then the text close up in Chromium and WebKit)

chromium-1440-dark.png chromium-1440-dark-text.png webkit-1440-dark-text.png

Pointer moving across the three links (frames top to bottom, caret elsewhere): each pill lights as the pointer reaches it and goes back the moment it leaves; the wrapped third link lights on both lines; nothing moves.

chromium-1440-light: strip-chromium-1440-light.png

webkit-1440-dark: strip-webkit-1440-dark.png

chromium-390-dark: strip-chromium-390-dark.png

webkit-390-light: strip-webkit-390-light.png

Evidence for PR #231 (real server and engine, production build). Each picture: a paragraph with three note links with the caret on the second (the one that glows), a web link (↗ pill), a long log-line link that wraps into one pill per line, a link to a missing note (faded pill, no dashes), and links inside nested list items with the tree lines from #133. The `[[` picker is not in here: it moved to #165, which can reuse `.link-chip` and the `--icon-note-link` / `--icon-web-link` masks. **320 light** (Chromium, WebKit) ![chromium-320-light.png](https://git.kayg.org/attachments/7939c75c-b9bf-4fb9-8b30-ae7d895eae5c) ![webkit-320-light.png](https://git.kayg.org/attachments/c1ca934a-ca92-46f7-8f08-21e735130d2a) **320 dark** (Chromium, WebKit) ![chromium-320-dark.png](https://git.kayg.org/attachments/50f520cf-a82c-4d4c-8d44-7ebc73d84891) ![webkit-320-dark.png](https://git.kayg.org/attachments/17e6a434-dcc3-4843-88d3-4d4cd562ff1c) **390 light** (Chromium, WebKit) ![chromium-390-light.png](https://git.kayg.org/attachments/a73e330a-0b7e-41af-9df2-912f1271ae0e) ![webkit-390-light.png](https://git.kayg.org/attachments/151ac354-108b-43a4-bc58-629a62306590) **390 dark** (Chromium, WebKit) ![chromium-390-dark.png](https://git.kayg.org/attachments/fe0a4200-4a07-448b-b481-06d03d401c5c) ![webkit-390-dark.png](https://git.kayg.org/attachments/2f6a8212-1dd4-4dd6-8985-eac32bef0d64) **1440 light** (Chromium whole window, then the text close up in Chromium and WebKit) ![chromium-1440-light.png](https://git.kayg.org/attachments/3f45113f-9431-4d75-8ff0-af0b398da78e) ![chromium-1440-light-text.png](https://git.kayg.org/attachments/d0a4ce74-92eb-4282-b0db-cc1bc9927661) ![webkit-1440-light-text.png](https://git.kayg.org/attachments/7917f35a-2b4a-4026-9a4e-501b2f236c4f) **1440 dark** (Chromium whole window, then the text close up in Chromium and WebKit) ![chromium-1440-dark.png](https://git.kayg.org/attachments/2a53ddbe-582b-478b-96fa-bd93f437f0d4) ![chromium-1440-dark-text.png](https://git.kayg.org/attachments/116190af-3247-426a-b38b-99a6354ac2b1) ![webkit-1440-dark-text.png](https://git.kayg.org/attachments/889fb759-20a1-4085-8a15-9979bb83ab6e) **Pointer moving across the three links** (frames top to bottom, caret elsewhere): each pill lights as the pointer reaches it and goes back the moment it leaves; the wrapped third link lights on both lines; nothing moves. chromium-1440-light: ![strip-chromium-1440-light.png](https://git.kayg.org/attachments/c7bc265f-e701-4539-b411-64eb178307aa) webkit-1440-dark: ![strip-webkit-1440-dark.png](https://git.kayg.org/attachments/9663dd1e-958b-4eda-86ed-f7f4b827027f) chromium-390-dark: ![strip-chromium-390-dark.png](https://git.kayg.org/attachments/2a008deb-18bd-47c2-a25a-272d1671b5ae) webkit-390-light: ![strip-webkit-390-light.png](https://git.kayg.org/attachments/44ea24c3-3b5e-4b40-aacb-915a75b0aa82)
Author
Owner

Perf for PR #231: a note with 500 links (100 paragraphs × 5 links), dev against the branch, same machine, alternating runs.

Caveat: the shared machine was at a load average of about 100 the whole time, so absolute numbers are inflated many times over and noisy. Only the before/after comparison means anything.

The editor's own work per step: the update (decorations and DOM) plus a forced layout, measured in the page. Median and p95 in ms, 300 keystrokes and 600 caret moves per run:

dev run 1 branch run 1 dev run 2 branch run 2
Chromium: typing between links 28.2 / 193.6 27.2 / 228.2 56.9 / 398.6 30.4 / 289.5
Chromium: typing inside a link 26.1 / 133.9 30.8 / 205.3 42.9 / 356.6 34.1 / 169.0
Chromium: caret moving across links 9.4 / 87.1 11.6 / 159.1 22.0 / 209.2 16.8 / 52.0
WebKit: typing between links (timed out) (timed out) 22 / 252 19 / 50
WebKit: typing inside a link 14 / 96 18 / 41
WebKit: caret moving across links 1 / 17 1 / 9

No regression shows above the noise. Why it stays cheap:

  • The link list comes out of the same pass that already hides syntax; no second walk of the tree.
  • Moving the caret only redraws the chips when it lands on or leaves a link (binary search over the visible links); everywhere else a caret move costs nothing new.
  • The chips cover only what CodeMirror draws, never the whole note.

The decoration pass alone (buildHidden over a 6,000-character drawn range with 200 links, vitest, A/B in one process): dev 5.74 / 5.95 ms, branch (including building the chip marks) 4.41 / 5.30 ms. The same, within noise. (On this loaded machine the existing 4 ms guard in hidden-cost.test.ts and tree-cost.test.ts fails on dev too; CI runs them on a quiet runner.)

Perf for PR #231: a note with **500 links** (100 paragraphs × 5 links), dev against the branch, same machine, alternating runs. Caveat: the shared machine was at a load average of about 100 the whole time, so absolute numbers are inflated many times over and noisy. Only the before/after comparison means anything. **The editor's own work per step**: the update (decorations and DOM) plus a forced layout, measured in the page. Median and p95 in ms, 300 keystrokes and 600 caret moves per run: | | dev run 1 | branch run 1 | dev run 2 | branch run 2 | |---|---|---|---|---| | Chromium: typing between links | 28.2 / 193.6 | 27.2 / 228.2 | 56.9 / 398.6 | 30.4 / 289.5 | | Chromium: typing inside a link | 26.1 / 133.9 | 30.8 / 205.3 | 42.9 / 356.6 | 34.1 / 169.0 | | Chromium: caret moving across links | 9.4 / 87.1 | 11.6 / 159.1 | 22.0 / 209.2 | 16.8 / 52.0 | | WebKit: typing between links | (timed out) | (timed out) | 22 / 252 | 19 / 50 | | WebKit: typing inside a link | | | 14 / 96 | 18 / 41 | | WebKit: caret moving across links | | | 1 / 17 | 1 / 9 | No regression shows above the noise. Why it stays cheap: - The link list comes out of the same pass that already hides syntax; no second walk of the tree. - Moving the caret only redraws the chips when it lands on or leaves a link (binary search over the visible links); everywhere else a caret move costs nothing new. - The chips cover only what CodeMirror draws, never the whole note. **The decoration pass alone** (`buildHidden` over a 6,000-character drawn range with 200 links, vitest, A/B in one process): dev 5.74 / 5.95 ms, branch (including building the chip marks) 4.41 / 5.30 ms. The same, within noise. (On this loaded machine the existing 4 ms guard in `hidden-cost.test.ts` and `tree-cost.test.ts` fails on dev too; CI runs them on a quiet runner.)
Author
Owner

PR #251 (replaces #231): the link you are on now lights in the accent: an accent edge, a soft accent tint and an accent icon, plus the same lift. No gradient anywhere. The caret is on "Underworld notes"; in the all-accents pictures the pointer is also over the web link.

Two accents (Sea, Rosewood), 390 and 1440, light and dark:

390 light, Chromium: Sea, Rosewood

chromium-390-light-sea.png chromium-390-light-rosewood.png

390 dark, Chromium: Sea, Rosewood

chromium-390-dark-sea.png chromium-390-dark-rosewood.png

1440 light, Chromium: Sea, Rosewood

chromium-1440-light-sea.png chromium-1440-light-rosewood.png

1440 dark, Chromium: Sea, Rosewood

chromium-1440-dark-sea.png chromium-1440-dark-rosewood.png

1440 WebKit, Sea: light, dark

webkit-1440-light-sea.png webkit-1440-dark-sea.png

Every accent, light and dark (top to bottom: Clay, Custom #8a3fd1, Dusk, Marigold, Moss, Rosewood, Sea):

chromium: light, dark

grid-chromium-light.png grid-chromium-dark.png

webkit: light, dark

grid-webkit-light.png grid-webkit-dark.png

PR #251 (replaces #231): the link you are on now lights in the **accent**: an accent edge, a soft accent tint and an accent icon, plus the same lift. No gradient anywhere. The caret is on "Underworld notes"; in the all-accents pictures the pointer is also over the web link. **Two accents (Sea, Rosewood), 390 and 1440, light and dark:** 390 light, Chromium: Sea, Rosewood ![chromium-390-light-sea.png](https://git.kayg.org/attachments/7caed024-cf69-4fa0-b201-3d580a2e195c) ![chromium-390-light-rosewood.png](https://git.kayg.org/attachments/45e3f66f-62ee-4918-ae67-9aa936c0df19) 390 dark, Chromium: Sea, Rosewood ![chromium-390-dark-sea.png](https://git.kayg.org/attachments/ea0cc74b-c75b-4556-aef3-2f9938a56680) ![chromium-390-dark-rosewood.png](https://git.kayg.org/attachments/f298ac9d-8602-45cc-b2a9-1f98d12a2d47) 1440 light, Chromium: Sea, Rosewood ![chromium-1440-light-sea.png](https://git.kayg.org/attachments/c4394802-ac40-49e0-871c-eb5f51f73055) ![chromium-1440-light-rosewood.png](https://git.kayg.org/attachments/e023c178-620e-4bd1-bc60-d8894480a817) 1440 dark, Chromium: Sea, Rosewood ![chromium-1440-dark-sea.png](https://git.kayg.org/attachments/2bfe8b11-dd58-4478-8dac-75271fe3f4e2) ![chromium-1440-dark-rosewood.png](https://git.kayg.org/attachments/2a32c9ed-26bc-4e22-bac7-7c97a2efcda6) 1440 WebKit, Sea: light, dark ![webkit-1440-light-sea.png](https://git.kayg.org/attachments/6e1a62f5-a6eb-4d00-95f4-6aff9f7625fd) ![webkit-1440-dark-sea.png](https://git.kayg.org/attachments/7721a3cf-0d87-42ea-a0fb-47d95dc9136b) **Every accent, light and dark** (top to bottom: Clay, Custom #8a3fd1, Dusk, Marigold, Moss, Rosewood, Sea): chromium: light, dark ![grid-chromium-light.png](https://git.kayg.org/attachments/2da565d1-1f24-4ea9-b772-4553b44cc209) ![grid-chromium-dark.png](https://git.kayg.org/attachments/88499ce9-e28f-49e5-8a69-b08f3afd549e) webkit: light, dark ![grid-webkit-light.png](https://git.kayg.org/attachments/328c632c-3b89-4cac-b8fe-becc60999693) ![grid-webkit-dark.png](https://git.kayg.org/attachments/4369253b-f00f-4268-991c-47a8b882901d)
kayg closed this issue 2026-10-14 12:15:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#162
No description provided.