Skip to content

web search done right

make searchbar and ranking adjuster more visible on low-res displays

Mikkel Denker6fa3ac8d7849
diff --git a/frontend/islands/ExploreSites.tsx b/frontend/islands/ExploreSites.tsx
index cc325d2f..61f13bbb 100644
--- a/frontend/islands/ExploreSites.tsx
+++ b/frontend/islands/ExploreSites.tsx
@@ -67,7 +67,7 @@ export const ExploreSites = () => {
</p>
</div>
<form
- class="flex border rounded-full w-full max-w-lg p-[2px] pl-3 mb-2"
+ class="flex border border-gray-300 rounded-full w-full max-w-lg p-[2px] pl-3 mb-2"
id="site-input-container"
onSubmit={(e) => {
e.preventDefault();
diff --git a/frontend/islands/SearchResultAdjust.tsx b/frontend/islands/SearchResultAdjust.tsx
index bdcbde84..a9243238 100644
--- a/frontend/islands/SearchResultAdjust.tsx
+++ b/frontend/islands/SearchResultAdjust.tsx
@@ -29,7 +29,7 @@ export default function SearchResultAdjust(
) {
return (
<button
- class="adjust-button hidden min-w-fit items-center justify-center md:flex w-5 text-gray-500/25 hover:cursor-pointer hover:text-gray-500 bg-transparent noscript:hidden"
+ class="adjust-button hidden min-w-fit items-center justify-center md:flex w-5 text-gray-700/50 hover:cursor-pointer hover:text-gray-700 bg-transparent noscript:hidden"
data-site={item.site}
data-url={item.url}
onClick={(e) => {
diff --git a/frontend/islands/Searchbar.tsx b/frontend/islands/Searchbar.tsx
index 51478570..02570ab6 100644
--- a/frontend/islands/Searchbar.tsx
+++ b/frontend/islands/Searchbar.tsx
@@ -66,7 +66,7 @@ export const Searchbar = (
<div class="h-10">
<div
id="searchbar"
- class="group absolute z-40 inset-x-0 top-0 grid grid-cols-[auto_1fr_auto] grid-rows-[2.5rem] rounded-3xl border bg-white transition-shadow focus-within:shadow overflow-hidden"
+ class="group absolute z-40 inset-x-0 top-0 grid grid-cols-[auto_1fr_auto] grid-rows-[2.5rem] rounded-3xl border border-gray-300 bg-white transition-shadow focus-within:shadow overflow-hidden"
>
<HiMagnifyingGlass class="col-[1/2] row-start-1 w-5 self-center ml-5 text-gray-400" />
<input
diff --git a/frontend/islands/chat/Chat.tsx b/frontend/islands/chat/Chat.tsx
index d1a2825f..6584d34a 100644
--- a/frontend/islands/chat/Chat.tsx
+++ b/frontend/islands/chat/Chat.tsx
@@ -2,7 +2,6 @@ import { injectGlobal, tx } from "https://esm.sh/@twind/[email protected]";
import { DEFAULT_OPTICS } from "../../search/optics.ts";
import { OpticSelector } from "../OpticsSelector.tsx";
import { Signal, signal, useSignal } from "@preact/signals";
-import { IS_BROWSER } from "$fresh/runtime.ts";
import { ComponentChildren } from "preact";
import { HiPaperAirplaneOutline } from "../../icons/HiPaperAirplaneOutline.tsx";
import { match, P } from "ts-pattern";
diff --git a/frontend/search/index.ts b/frontend/search/index.ts
index 45064770..42b13740 100644
--- a/frontend/search/index.ts
+++ b/frontend/search/index.ts
@@ -120,6 +120,7 @@ export const api = {
const { data, cancel } = send("/beta/api/search", "post", "json", props);
return { data: data.then((res) => res[200]), cancel };
},
+
autosuggest: (props: Props<"/beta/api/autosuggest", "post">) => {
const { data, cancel } = send(
"/beta/api/autosuggest",
@@ -129,6 +130,7 @@ export const api = {
);
return { data: data.then((res) => res[200]), cancel };
},
+
similarSites: (props: Props<"/beta/api/webgraph/similar_sites", "post">) => {
const { data, cancel } = send(
"/beta/api/webgraph/similar_sites",
@@ -138,6 +140,7 @@ export const api = {
);
return { data: data.then((res) => res[200]), cancel };
},
+
knowsSite: (props: Props<"/beta/api/webgraph/knows_site", "post">) => {
const { data, cancel } = send(
"/beta/api/webgraph/knows_site",
@@ -147,6 +150,7 @@ export const api = {
);
return { data: data.then((res) => res[200]), cancel };
},
+
factCheck: (props: Props<"/beta/api/fact_check", "post">) => {
const { data, cancel } = send(
"/beta/api/fact_check",
@@ -156,6 +160,7 @@ export const api = {
);
return { data: data.then((res) => res[200]), cancel };
},
+
alice: (
props: Props<"/beta/api/alice", "get">,
stream: (
@@ -179,6 +184,7 @@ export const api = {
.exhaustive();
});
},
+
summarize: (
props: Props<"/beta/api/summarize", "get">,
stream: (
@@ -202,6 +208,7 @@ export const api = {
.exhaustive();
});
},
+
sitesExportOptic: (props: Props<"/beta/api/sites/export", "post">) => {
const { data, cancel } = send(
"/beta/api/sites/export",
@@ -211,6 +218,7 @@ export const api = {
);
return { data: data.then((res) => res[200]), cancel };
},
+
exploreExportOptic: (props: Props<"/beta/api/explore/export", "post">) => {
const { data, cancel } = send(
"/beta/api/explore/export",
@@ -240,6 +248,7 @@ export const api = {
finished = true;
return data;
});
+
return {
data,
abort: () => {
@@ -249,6 +258,7 @@ export const api = {
},
};
},
+
sendImprovementClick: (
{ queryId, click }: { queryId: string; click: string },
) => {