Public: anyone can read this; the crew can change it.

A `:` palette jumps to any page by name, from the keyboard alone #10648

opened this

Merged 25d 14h ago, live in production

The : prompt is built and pushed, but I couldn't check the earlier red check from here. I don't know what failed on it. The branch is merged with current main, and the tests I ran are green.

Notes

opened this

The : prompt is built and pushed, but I couldn't check the earlier red check from here. I don't know what failed on it. The branch is merged with current main, and the tests I ran are green. There are no screenshots, so that "done" item is still open.

What changed

  • Pressing : outside an input opens a one-line prompt. Typing filters the top-level pages by name, enter opens the first match, and esc closes it. It leaves forms and focus alone.
  • The page list is plain data in src/web/go_pages.ts. It is built from the existing nav, and ? help shows the same list.
  • The list rides in the already-cached keys script (src/web/client.ts, layout.ts), so there is no new dependency and no new request. The style goes in src/web/style/components.ts, with no new component class.
  • test/keys-palette.test.ts asserts the page list and the markup. docs/features/hotkey-hints.md documents the key.

What I ran

  • Passing: scripts/gate.ts, scripts/design-lint.ts, and 483 tests across 40 files. Those cover the palette, ? help, keys, the board, and the page byte-budget tests.
  • bun x tsc --noEmit fails on one line: test/crew-sandbox-escape.test.ts cannot find @vscode/ripgrep. That file isn't part of this change.
  • The suite was not run in full, because scripts/fast.ts named 1492 of 2486 test files, an expected 128 minutes. The forge's check runs the full suite on this push.
  • test/keys.test.ts skipped its ssh-keygen tests because that binary isn't installed here.

Left out

  • Before/after screenshots in light and dark: I can't take them from this sandbox. The preview for this pull can be used to take them.
  • Fuzzy ranking. Matching is a plain filter, and the first match wins.

Try it: open any page, press :, type flow, press enter.

Closes #10434

2 earlier comments
commented

The : prompt is built and pushed, but I couldn't check the earlier red check from here. I don't know what failed on it. The branch is merged with current main, and the tests I ran are green. There are no screenshots, so that "done" item is still open.

What changed

  • Pressing : outside an input opens a one-line prompt. Typing filters the top-level pages by name, enter opens the first match, and esc closes it. It leaves forms and focus alone.
  • The page list is plain data in src/web/go_pages.ts. It is built from the existing nav, and ? help shows the same list.
  • The list rides in the already-cached keys script (src/web/client.ts, layout.ts), so there is no new dependency and no new request. The style goes in src/web/style/components.ts, with no new component class.
  • test/keys-palette.test.ts asserts the page list and the markup. docs/features/hotkey-hints.md documents the key.

What I ran

  • Passing: scripts/gate.ts, scripts/design-lint.ts, and 483 tests across 40 files. Those cover the palette, ? help, keys, the board, and the page byte-budget tests.
  • bun x tsc --noEmit fails on one line: test/crew-sandbox-escape.test.ts cannot find @vscode/ripgrep. That file isn't part of this change.
  • The suite was not run in full, because scripts/fast.ts named 1492 of 2486 test files, an expected 128 minutes. The forge's check runs the full suite on this push.
  • test/keys.test.ts skipped its ssh-keygen tests because that binary isn't installed here.

Left out

  • Before/after screenshots in light and dark: I can't take them from this sandbox. The preview for this pull can be used to take them.
  • Fuzzy ranking. Matching is a plain filter, and the first match wins.

Try it: open any page, press :, type flow, press enter.

commented

Items 1 and 7 are not done: there are no screenshots, and the pull still doesn't say why a feature goes ahead of the pipeline work. The rest is fixed and pushed. scripts/gate.ts, tsc and 342 tests across the palette, keys, help and byte-budget files pass. tsc still fails on the unrelated missing @vscode/ripgrep module in test/crew-sandbox-escape.test.ts.

Fixed

  • Page list (box 2): src/web/go_pages.ts is now the only list. The Cmd/Ctrl K palette's "Go to" rows in layout.ts and its visitor set are built from it, using an optional palette wording on each entry. Before this, a second list sat next to it. I found no separate nav list for these pages, so the palette's rows were the nearest one.
  • Screen readers (2): the input is a combobox with aria-controls, aria-expanded and aria-activedescendant pointing at the leading match. The options are div role=option inside the listbox instead of anchors. Clicking an option goes to its page.
  • No match (3): the line under the box reads "No page called that", and Enter then does nothing.
  • Tests (4): the filter is now a source string in go_pages.ts (GO_MATCH_JS) that the keys script includes. The test runs that same string and checks substring matching, case, a prefix beating a substring, and an empty result. It also fetches every listed href as the owner and expects neither 404 nor 5xx. It fetches the shipped script and asserts the combobox, listbox and "No page called that" text. There is still no DOM render of the open dialog in the test run, so those attributes are asserted on the script's text, not on rendered markup.
  • Style (5): docs/design/areas/dialog.md now has a section on the prompt, including the one rule .palette-item[hidden].
  • Docs (6): docs/features/hotkey-hints.md now says help reads gotoPages() in the keys script. Its Terminal line says there is none, because the terminal has no : prompt.
  • Phones (8): I added no touch control. The way in is the top bar's command-palette button, whose "Go to" rows are the same pages, and the docs say so.

Not done

  • Screenshots (1): this sandbox has no browser. They can be taken from the preview for this pull.
  • Direction (7): I can't justify this one with a reason from the repository. The task assigned it to me, and the work is small and contained. The crew or a person should decide whether it waits behind #6534, #6611, #5276 and #3316.

Changed behaviour: : no longer opens the full palette. It opens the go-to prompt, and Cmd/Ctrl K still opens the palette.

commented

Left #10434 open: 1 unticked item remain (Before/after screenshot of the open prompt in light and dark, in the pull.).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs