Minor ux nits (#4327)

* k

* quick fix
This commit is contained in:
pablonyx 2025-03-21 14:50:56 -07:00 committed by GitHub
parent 61facfb0a8
commit fce81ebb60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 33 deletions

View File

@ -54,6 +54,7 @@ export const SourceCard: React.FC<{
<div className="flex items-center gap-1 mt-1">
<ResultIcon doc={document} size={18} />
<div className="text-text-700 text-xs leading-tight truncate flex-1 min-w-0">
{truncatedIdentifier}
</div>

View File

@ -49,7 +49,7 @@ export function SearchResultIcon({ url }: { url: string }) {
if (!faviconUrl) {
return <SourceIcon sourceType={ValidSources.Web} iconSize={18} />;
}
if (url.includes("docs.onyx.app")) {
if (url.includes("onyx.app")) {
return <OnyxIcon size={18} className="dark:text-[#fff] text-[#000]" />;
}

View File

@ -17,12 +17,11 @@ export function WebResultIcon({
try {
hostname = new URL(url).hostname;
} catch (e) {
// console.log(e);
hostname = "docs.onyx.app";
hostname = "onyx.app";
}
return (
<>
{hostname == "docs.onyx.app" ? (
{hostname.includes("onyx.app") ? (
<OnyxIcon size={size} className="dark:text-[#fff] text-[#000]" />
) : !error ? (
<img

View File

@ -26,35 +26,6 @@ export const ResultIcon = ({
);
};
// export default function SourceCard({
// doc,
// setPresentingDocument,
// }: {
// doc: OnyxDocument;
// setPresentingDocument?: (document: OnyxDocument) => void;
// }) {
// return (
// <div
// key={doc.document_id}
// onClick={() => openDocument(doc, setPresentingDocument)}
// className="cursor-pointer h-[80px] text-left overflow-hidden flex flex-col gap-0.5 rounded-lg px-3 py-2 bg-accent-background hover:bg-accent-background-hovered w-[200px]"
// >
// <div className="line-clamp-1 font-semibold text-ellipsis text-text-900 flex h-6 items-center gap-2 text-sm">
// {doc.is_internet || doc.source_type === "web" ? (
// <WebResultIcon url={doc.link} />
// ) : (
// <SourceIcon sourceType={doc.source_type} iconSize={18} />
// )}
// <p>{truncateString(doc.semantic_identifier || doc.document_id, 20)}</p>
// </div>
// <div className="line-clamp-2 text-sm font-semibold"></div>
// <div className="line-clamp-2 text-sm font-normal leading-snug text-text-700">
// {doc.blurb}
// </div>
// </div>
// );
// }
interface SeeMoreBlockProps {
toggleDocumentSelection: () => void;
docs: OnyxDocument[];