Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface Props {
showSaved: boolean;
setShowSaved: React.Dispatch<React.SetStateAction<boolean>>;
savedCases: SavedCase[];
matchTotal: number | null;
onBrowseAll: () => void;
onShuffle: () => void;
}
Expand All @@ -19,7 +18,6 @@ export default function LibraryHeader({
showSaved,
setShowSaved,
savedCases,
matchTotal,
onBrowseAll,
onShuffle,
}: Props) {
Expand All @@ -44,13 +42,6 @@ export default function LibraryHeader({
? "Back to browse"
: `Saved${savedCases.length ? ` (${savedCases.length})` : ""}`}
</button>
{!showSaved && matchTotal !== null && (
<span aria-live="polite" className={styles.matchTotal}>
{`${matchTotal.toLocaleString()} ${
matchTotal === 1 ? "case matches" : "cases match"
}`}
</span>
)}
</div>
</div>
);
Expand Down
14 changes: 13 additions & 1 deletion PanTS-Demo/src/routes/Homepage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default function Homepage() {
showSaved={dash.showSaved}
setShowSaved={dash.setShowSaved}
savedCases={dash.savedCases}
matchTotal={dash.matchTotal}
onBrowseAll={dash.handleBrowseAll}
onShuffle={dash.handleShuffle}
/>
Expand Down Expand Up @@ -96,6 +95,19 @@ export default function Homepage() {
onCompare={dash.handleCompare}
/>
)}
{/* Match count moved out of the header to a fixed bar at the bottom of the
screen, so it's out of the way while filtering. */}
{!dash.showSaved && dash.matchTotal !== null && (
<div
aria-live="polite"
className="fixed bottom-4 left-4 z-40 rounded-full border border-black/10 bg-white/95 px-4 py-2 text-sm font-medium text-gray-700 shadow-md backdrop-blur"
>
{`${dash.matchTotal.toLocaleString()} ${
dash.matchTotal === 1 ? "case matches" : "cases match"
}`}
</div>
)}

<SiteFooter />
</div>
);
Expand Down
18 changes: 0 additions & 18 deletions PanTS-Demo/src/routes/LandingPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { segmentation_categories } from "../../helpers/constants";
import Header from "../../components/Header";
import SiteFooter from "../../components/SiteFooter";
Expand Down Expand Up @@ -31,7 +30,6 @@ const easeOutCubic = (progress: number): number => {
};

export default function LandingPage() {
const navigate = useNavigate();
const [animationProgress, setAnimationProgress] = useState(0);

useEffect(() => {
Expand Down Expand Up @@ -109,22 +107,6 @@ export default function LandingPage() {
</div>
))}
</div>
<div className={styles.heroActions}>
<button
type="button"
className={styles.btnPrimary}
onClick={() => navigate("/dashboard")}
>
Browse Dataset
</button>
<button
type="button"
className={styles.btnSecondary}
onClick={() => navigate("/upload")}
>
Upload Dataset
</button>
</div>
</main>
<SiteFooter />
</div>
Expand Down
6 changes: 5 additions & 1 deletion PanTS-Demo/src/routes/UploadPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,11 @@ const UploadPage: React.FC = () => {
width: "36px", height: "36px", borderRadius: "8px", flexShrink: 0,
background: "rgba(15, 23, 42, 0.04)", border: "1px solid rgba(15, 23, 42, 0.12)",
display: "flex", alignItems: "center", justifyContent: "center",
}}><div className="upload-spinner" /></div>
}}>{/* A static pulsing dot per scan instead of a spinning wheel:
multiple in-flight scans shouldn't each spin. The single
spinner lives in the batch ProcessingSummaryBar. */}
<span className="animate-pulse" style={{ width: 8, height: 8, borderRadius: "50%", background: "#0F172A", display: "block" }} />
</div>
<div>
<div style={{ fontFamily: "'Space Grotesk', sans-serif", fontSize: "14px", fontWeight: 600, color: "#111111" }}>{u.label}</div>
<div style={{ fontFamily: "'JetBrains Mono', monospace", fontSize: "11px", color: "#6a6a6a", marginTop: "2px" }}>
Expand Down
Loading