Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Make the palette the only search surface

1265ea552fb7346628c1e742a63c758c819379c5 · Keenan Nemetz · 10d ago · parent 6c03e6d3

Make the palette the only search surface

The full /search page repeated the palette's query and visibility rule, so
one of the two had to become the source of truth. Keep the palette: it
shows the first 30 matches, says when a query found more, and is reachable
from every page and with the keyboard shortcut.

The top bar no longer carries a Search destination or a form fallback; its
launcher is a plain button, and the palette dialog never navigates to a
page behind it.

server/web/static/app.js +3−12

@@ -697,15 +697,6 @@ const copyText = (value, done) => {
697 697 event.preventDefault();
698 698 open();
699 699 });
700 // Enter on the launcher, or a browser that fires the form event after the
701 // click, opens the palette instead of navigating. Without this script the
702 // form still reaches /search.
703 if (launcher.form) {
704 launcher.form.addEventListener('submit', (event) => {
705 event.preventDefault();
706 open();
707 });
708 }
709 700 }
710 701
711 702 document.addEventListener('keydown', (event) => {
@@ -740,11 +731,11 @@ const copyText = (value, done) => {
740 731 });
741 732
742 733 form.addEventListener('submit', (event) => {
734 // The palette is the whole search surface, so Enter must never navigate to
735 // a page behind it. With no selected row there is nothing to open yet.
736 event.preventDefault();
743 737 const list = rows();
744 // No selection means the reader asked for the whole result list; the form's
745 // own GET to /search is the answer, so let it run.
746 738 if (selected < 0 || !list[selected]) return;
747 event.preventDefault();
748 739 window.location.assign(list[selected].href);
749 740 });
750 741