Skip to content

feat(builder): advertise the format-token autocomplete#1561

Closed
chhoumann wants to merge 1 commit into
chhoumann/1558-preview-noticesfrom
chhoumann/1542-advertise-token-autocomplete
Closed

feat(builder): advertise the format-token autocomplete#1561
chhoumann wants to merge 1 commit into
chhoumann/1558-preview-noticesfrom
chhoumann/1542-advertise-token-autocomplete

Conversation

@chhoumann

Copy link
Copy Markdown
Owner

Closes #1542. Stacked on #1560 — review that first; this branch adds one commit.

The problem

Typing {{ in a format field opens a list of every token, each with a one-line
description (that part shipped in #1549). Nothing in the UI said so. The reporter
found it by typing {{ on a hunch while looking for the syntax; a new user has
no reason to try that, and no other in-app way to learn which tokens exist.

Ask 1 was deliberately left out of #1549 because its two natural homes belonged
to siblings from the same walkthrough: #1541 (docs links in the UI) and #1544 (a
worked-example placeholder). Both have now shipped, and #1541 explicitly left
"docs links inside the builders" to this issue. So this closes #1542.

The change

The affordance is two characters, so the honest fix is to name the two
characters, right below the caret:

Type {{ to insert a token · Format syntax

"Format syntax" is the docs entry point #1541 deferred here: the token language
is the one part of the builder you cannot work out by looking at it.

Capture to (empty field) Capture format
hint hint

Decisions worth arguing with

It hides once the value contains {{. The hint has done its job, and a line
that never goes away is exactly the permanent chrome an "Insert token" button
was rejected for in the issue thread. Stateless — no setting, no migration.

Three of the five token fields, not all five. Capture format, File name
format, and Capture to — the last being the only format field a brand-new
Capture builder renders, since the other two sit behind default-off toggles.

Deliberately not on insert-after / insert-before: their own descriptions tell
you to type a literal heading like ## Tasks, so a token-less value is the
documented normal state there and the hint would nag forever. Not on the template
path field either — it has no token autocomplete at all.

Not a persisted "you've seen this" flag. It was the obvious alternative and
it is worse in four ways: settingsStore mutations rewrite the whole
data.json, so the suggester would write to disk on a keystroke; no Svelte
component subscribes to the store, so the flag would not be reactive and the
hint would linger until the builder was reopened; settings are per-vault, so
"user lifetime" is false; and one stray {{ would delete the affordance
vault-wide with no way to bring it back.

Not the placeholder alone. It vanishes on the first keystroke and on every
existing choice, and cannot carry the docs link. #1544 already shipped that
pattern on "Capture to" without closing this ask.

Not { as the trigger, and not open-on-focus. Both were rejected in the
issue thread: { + Enter would insert a token instead of a newline in a capture
format holding JSON or code, and open-on-focus fires on every builder open and
races the file suggester on "Capture to".

Validation

  • pnpm run build, pnpm lint, full suite: 4042 passed, 0 failed.
  • 4 new component tests (copy, docs link + rel/target, hide-on-{{,
    show-again-when-tokens-removed).
  • Verified in this worktree's isolated Obsidian 1.13.0 vault: both hints render,
    both link to the live docs URL, and the hint disappears the moment a token is
    typed.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying quickadd with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5dc16fe
Status: ✅  Deploy successful!
Preview URL: https://91e8d695.quickadd.pages.dev
Branch Preview URL: https://chhoumann-1542-advertise-tok.quickadd.pages.dev

View logs

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 49e50e91-a6a2-48a2-b8d2-58f2109e9c31

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chhoumann/1542-advertise-token-autocomplete

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chhoumann
chhoumann force-pushed the chhoumann/1542-advertise-token-autocomplete branch from f74ae6c to 16153ee Compare July 26, 2026 21:22
@chhoumann
chhoumann force-pushed the chhoumann/1558-preview-notices branch from 37c4629 to f9f28b4 Compare July 26, 2026 21:56
@chhoumann
chhoumann force-pushed the chhoumann/1542-advertise-token-autocomplete branch from 16153ee to 6e98a51 Compare July 26, 2026 21:56
@chhoumann
chhoumann marked this pull request as ready for review July 26, 2026 22:02
@chhoumann
chhoumann force-pushed the chhoumann/1558-preview-notices branch from f9f28b4 to 54bee88 Compare July 26, 2026 22:16
@chhoumann
chhoumann force-pushed the chhoumann/1542-advertise-token-autocomplete branch 3 times, most recently from a159c3e to f98929b Compare July 26, 2026 22:31
Closes #1542.

Typing `{{` in a format field opens a list of every token, each with a one-line
description (shipped in #1549). Nothing in the UI said so - the reporter only
found it by typing `{{` on a hunch while looking for the syntax. Ask 1 of #1542
was deliberately left open because its two natural homes belonged to #1541
(docs links in the UI) and #1544 (a worked-example placeholder); both have
shipped, and #1541 explicitly left "docs links inside the builders" here.

The affordance is two characters, so the honest fix is to name the two
characters, right below the caret:

    Type {{ to insert a token · Format syntax

"Format syntax" is the docs entry point #1541 deferred: the token language is
the one part of the builder you cannot work out by looking at it.

The hint hides once the value contains `{{`. It has done its job, and a line
that never goes away is the permanent chrome an "Insert token" button was
rejected for.

On three of the five token-autocomplete fields: Capture format, File name
format, and Capture to - the only one a brand-new Capture builder renders, since
the other two sit behind default-off toggles. Deliberately NOT on insert-after /
insert-before: their own descriptions tell you to type a literal heading like
`## Tasks`, so a token-less value is the documented normal state there and the
hint would nag forever.

Also considered and rejected:

- Triggering the popup on a single `{`, which would make `{` + Enter insert a
  token instead of a newline in a capture format holding JSON or code.
- Opening the list on focus: fires on every builder open, and races the file
  suggester on "Capture to".
- Persisting a `hasUsedTokenAutocomplete` setting. Settings mutations rewrite
  the whole data.json, so the suggester would write to disk on a keystroke; no
  Svelte component subscribes to the store, so it would not be reactive; settings
  are per-vault, so "user lifetime" is false; and one stray `{{` would delete
  the affordance vault-wide with no way back.
- Teaching via the placeholder alone: it vanishes on the first keystroke and on
  every existing choice, and cannot carry the docs link.
@chhoumann
chhoumann force-pushed the chhoumann/1542-advertise-token-autocomplete branch from f98929b to 5dc16fe Compare July 26, 2026 22:37
@chhoumann
chhoumann deleted the branch chhoumann/1558-preview-notices July 27, 2026 05:07
@chhoumann chhoumann closed this Jul 27, 2026
@chhoumann

Copy link
Copy Markdown
Owner Author

Superseded by #1570.

GitHub closed this permanently when #1560 merged and its base branch was deleted — a closed PR's base cannot be changed and it cannot be reopened, so the rebased work moved to a fresh PR against master.

Same single commit, cherry-picked onto 5e18213e. The only file overlapping the merged preview work was styles.css, where the two blocks turned out to be adjacent rather than conflicting; the diff against master is byte-identical to what this PR had against its old base (7 files, +107). Re-verified live on merged master before opening #1570.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant