Spaces:
Sleeping
Sleeping
Yuchen Yuan commited on
Commit ·
2ab0857
1
Parent(s): 8742007
Add Support popover listing NSF funding acknowledgments
Browse filesNew SupportPopover in TopBar (between Developers and the divider),
same UX as Papers/Developers popovers. Lists 5 NSF awards:
- 2507948 (SPV) — Synthesis, Profiling, and Verification
- 2513431 (QuAIM) — Quantum Cyberinfrastructure
- 2440637 (AutoQC) — CAREER: Deployment Automation
- 2311949 (TeReQuLe) — Temporal-Reliable Quantum Learning
- 2320957 (QuacyTrain) — Quantum Research Workforce Dev
Each entry links to the NSF award search page. Footer carries the
standard NSF disclaimer.
frontend/src/components/SupportPopover.tsx
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { useEffect, useRef, useState } from "react";
|
| 2 |
+
import { Heart } from "lucide-react";
|
| 3 |
+
|
| 4 |
+
/**
|
| 5 |
+
* Popover listing the NSF awards that fund the lab's research.
|
| 6 |
+
*
|
| 7 |
+
* Same open/close UX as the Papers and Developers popovers
|
| 8 |
+
* (outside-click + Escape dismiss). Each award links to the NSF
|
| 9 |
+
* award-search page. A small disclaimer at the bottom carries the
|
| 10 |
+
* standard NSF acknowledgment language.
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
interface Award {
|
| 14 |
+
id: string;
|
| 15 |
+
shortName: string;
|
| 16 |
+
title: string;
|
| 17 |
+
period: string;
|
| 18 |
+
url: string;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
const AWARDS: Award[] = [
|
| 22 |
+
{
|
| 23 |
+
id: "2507948",
|
| 24 |
+
shortName: "SPV",
|
| 25 |
+
title: "Synthesis, Profiling, and Verification of Quantum Circuits",
|
| 26 |
+
period: "2025–2028",
|
| 27 |
+
url: "https://www.nsf.gov/awardsearch/showAward?AWD_ID=2507948",
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
id: "2513431",
|
| 31 |
+
shortName: "QuAIM",
|
| 32 |
+
title:
|
| 33 |
+
"QuAIM: A Quantum Cyberinfrastructure with Automated Implementation Toolkits for Scientific Discovery",
|
| 34 |
+
period: "2025–2028",
|
| 35 |
+
url: "https://www.nsf.gov/awardsearch/showAward?AWD_ID=2513431",
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
id: "2440637",
|
| 39 |
+
shortName: "AutoQC",
|
| 40 |
+
title:
|
| 41 |
+
"Efficient and Scalable Deployment Automation for Quantum-Centric Computing",
|
| 42 |
+
period: "2025–2030",
|
| 43 |
+
url: "https://www.nsf.gov/awardsearch/showAward?AWD_ID=2440637",
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
id: "2311949",
|
| 47 |
+
shortName: "TeReQuLe",
|
| 48 |
+
title:
|
| 49 |
+
"An Integrated Framework for Enabling Temporal-Reliable Quantum Learning on NISQ-era Devices",
|
| 50 |
+
period: "2023–2027",
|
| 51 |
+
url: "https://www.nsf.gov/awardsearch/showAward?AWD_ID=2311949",
|
| 52 |
+
},
|
| 53 |
+
{
|
| 54 |
+
id: "2320957",
|
| 55 |
+
shortName: "QuacyTrain",
|
| 56 |
+
title:
|
| 57 |
+
"Quantum Research Workforce Development on End-to-End Quantum Systems Integration",
|
| 58 |
+
period: "2023–2026",
|
| 59 |
+
url: "https://www.nsf.gov/awardsearch/showAward?AWD_ID=2320957",
|
| 60 |
+
},
|
| 61 |
+
];
|
| 62 |
+
|
| 63 |
+
export function SupportPopover() {
|
| 64 |
+
const [open, setOpen] = useState(false);
|
| 65 |
+
const rootRef = useRef<HTMLDivElement>(null);
|
| 66 |
+
|
| 67 |
+
useEffect(() => {
|
| 68 |
+
if (!open) return;
|
| 69 |
+
const onDoc = (e: MouseEvent) => {
|
| 70 |
+
if (!rootRef.current?.contains(e.target as globalThis.Node)) {
|
| 71 |
+
setOpen(false);
|
| 72 |
+
}
|
| 73 |
+
};
|
| 74 |
+
const onKey = (e: KeyboardEvent) => {
|
| 75 |
+
if (e.key === "Escape") setOpen(false);
|
| 76 |
+
};
|
| 77 |
+
document.addEventListener("mousedown", onDoc);
|
| 78 |
+
document.addEventListener("keydown", onKey);
|
| 79 |
+
return () => {
|
| 80 |
+
document.removeEventListener("mousedown", onDoc);
|
| 81 |
+
document.removeEventListener("keydown", onKey);
|
| 82 |
+
};
|
| 83 |
+
}, [open]);
|
| 84 |
+
|
| 85 |
+
return (
|
| 86 |
+
<div ref={rootRef} className="relative">
|
| 87 |
+
<button
|
| 88 |
+
type="button"
|
| 89 |
+
onClick={() => setOpen((v) => !v)}
|
| 90 |
+
className="btn-ghost"
|
| 91 |
+
title="Funding acknowledgments"
|
| 92 |
+
aria-label="Support"
|
| 93 |
+
aria-haspopup="menu"
|
| 94 |
+
aria-expanded={open}
|
| 95 |
+
>
|
| 96 |
+
<Heart className="w-3.5 h-3.5" />
|
| 97 |
+
<span className="hidden sm:inline">Support</span>
|
| 98 |
+
</button>
|
| 99 |
+
{open && (
|
| 100 |
+
<div
|
| 101 |
+
role="menu"
|
| 102 |
+
className="fixed right-3 top-14 sm:absolute sm:right-0 sm:top-full sm:mt-1 rounded-lg border border-edge bg-surface shadow-xl z-30 p-3 w-[min(26rem,calc(100vw-1.5rem))]"
|
| 103 |
+
>
|
| 104 |
+
<div className="text-xs uppercase tracking-wider text-mute mb-2">
|
| 105 |
+
Supported by NSF
|
| 106 |
+
</div>
|
| 107 |
+
<div className="space-y-1.5">
|
| 108 |
+
{AWARDS.map((a) => (
|
| 109 |
+
<a
|
| 110 |
+
key={a.id}
|
| 111 |
+
href={a.url}
|
| 112 |
+
target="_blank"
|
| 113 |
+
rel="noopener noreferrer"
|
| 114 |
+
className="flex items-baseline gap-2 px-2 py-1.5 rounded-md hover:bg-surfaceAlt transition-colors group"
|
| 115 |
+
>
|
| 116 |
+
<span className="shrink-0 font-mono text-[11px] text-accent">
|
| 117 |
+
{a.shortName}
|
| 118 |
+
</span>
|
| 119 |
+
<span className="flex-1 min-w-0">
|
| 120 |
+
<span className="text-[12px] text-ink line-clamp-1 group-hover:underline decoration-accent/40 underline-offset-2">
|
| 121 |
+
{a.title}
|
| 122 |
+
</span>
|
| 123 |
+
<span className="block text-[10px] text-mute">
|
| 124 |
+
NSF #{a.id} · {a.period}
|
| 125 |
+
</span>
|
| 126 |
+
</span>
|
| 127 |
+
</a>
|
| 128 |
+
))}
|
| 129 |
+
</div>
|
| 130 |
+
<div className="mt-3 pt-2 border-t border-edge text-[10px] text-mute leading-relaxed">
|
| 131 |
+
This material is based upon work supported by the National Science
|
| 132 |
+
Foundation. Any opinions, findings, and conclusions or
|
| 133 |
+
recommendations expressed in this material are those of the
|
| 134 |
+
author(s) and do not necessarily reflect the views of the National
|
| 135 |
+
Science Foundation.
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
)}
|
| 139 |
+
</div>
|
| 140 |
+
);
|
| 141 |
+
}
|
frontend/src/components/TopBar.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
| 10 |
import { ThemeSwitcher } from "./ThemeSwitcher";
|
| 11 |
import { PapersPopover } from "./PapersPopover";
|
| 12 |
import { DevelopersPopover } from "./DevelopersPopover";
|
|
|
|
| 13 |
import { TipIcon } from "./TipIcon";
|
| 14 |
|
| 15 |
/**
|
|
@@ -144,6 +145,7 @@ export function TopBar({
|
|
| 144 |
</a>
|
| 145 |
<PapersPopover />
|
| 146 |
<DevelopersPopover />
|
|
|
|
| 147 |
<span
|
| 148 |
className="hidden sm:inline-block w-px h-5 bg-edge/60 mx-0.5"
|
| 149 |
aria-hidden="true"
|
|
|
|
| 10 |
import { ThemeSwitcher } from "./ThemeSwitcher";
|
| 11 |
import { PapersPopover } from "./PapersPopover";
|
| 12 |
import { DevelopersPopover } from "./DevelopersPopover";
|
| 13 |
+
import { SupportPopover } from "./SupportPopover";
|
| 14 |
import { TipIcon } from "./TipIcon";
|
| 15 |
|
| 16 |
/**
|
|
|
|
| 145 |
</a>
|
| 146 |
<PapersPopover />
|
| 147 |
<DevelopersPopover />
|
| 148 |
+
<SupportPopover />
|
| 149 |
<span
|
| 150 |
className="hidden sm:inline-block w-px h-5 bg-edge/60 mx-0.5"
|
| 151 |
aria-hidden="true"
|