Spaces:
Sleeping
Sleeping
Commit History
-
Extract shared TipIcon; add hover-tooltip on family badge + live-IBM chip
Yuchen YuanPull the inline ⓘ tooltip from NodeParamEditor.FieldLabel into a shared `TipIcon` component so other places that need the same 'short label, long explanation behind a hover' affordance can reuse it without copying the named-group / no-aria-label / pointer-events gotchas. (Three iterations earlier in this session were spent re-discovering each one.) Two concrete spots where the shared component now adds context: * QNode family badge (SOURCE / BACKEND / ALGORITHM / METRIC / SINK). Useful tag for someone fluent in workflow-editor lingo, opaque to a non-quantum first-time visitor. New per-family hint explains what each role does in plain language. * TopBar 'live ibm: ...' status chip. Already had a long native `title` tooltip, but native titles race our CSS tooltips and have the 1-2 s display delay. Replaced with TipIcon next to the chip text — instant, theme-styled, and the chip stays clickable to toggle live mode. NodeParamEditor.FieldLabel collapses to a thin call-site…0f6846e -
Param hint: scope group-hover to a NAMED Tailwind group
Yuchen YuanReported: hovering anywhere on a node card (not the ⓘ icon) made every param tooltip pop up at once. Cause: QNode's .node-card already carries class="group" to drive the × delete button's hover-reveal, and Tailwind's unnamed `group-hover:` matches ANY ancestor with class `group`. So three tooltips with plain `group-hover:block` were latching onto the node-card group. Switch the icon wrapper to a named group (`group/tip`) and update the children to `group-hover/tip:block` / `group-focus/tip:block`. Tailwind v3 scopes named groups strictly, so only hovering the icon itself fires the tooltip.f6e6b69 -
Param hint tooltip: drop aria-label so native fallback can't race ours
Yuchen YuanUser report: the CSS tooltip was being preempted by a 1-2 second delayed bubble. Tracked it down to `aria-label` on the icon wrapper — when the element also carries `cursor: help`, browsers (macOS Chrome especially) treat it like `title` and render the delayed native tooltip on top of our instant CSS one. Fix: remove `aria-label` and `role=img` from the wrapper. The tooltip span itself contains the visible hint text and carries `role=tooltip`, so screen readers read it without the duplicate native overlay. The HelpCircle icon picks up `aria-hidden=true` so it isn't announced as a separate element. Also added `tabIndex=0` + `group-focus:block` so keyboard users tabbing through the params can read each hint without a mouse, and a small focus-ring for accessibility.28ba56f -
Param hint tooltip: CSS group-hover instead of native title
Yuchen YuanUser report: hovering the ⓘ icon flipped the cursor to cursor:help but no tooltip ever appeared. Native browser `title` has a 1-2 second delay before showing on macOS Chrome and silently disappears in some configurations — bad foundation for a help affordance. Replace with a CSS-only tooltip: small absolute-positioned span that pops up via `group-hover`. Anchored above the icon (bottom-full mb-1), capped at 14rem wide so it doesn't overflow narrow nodes, z-50 to clear React Flow's edge layer, pointer-events-none so it doesn't extend its own visibility. aria-label stays on the icon wrapper for screen readers.0eed8f4 -
Param hints move from inline text to a hover tooltip on a ⓘ icon
Yuchen YuanThe plain-language hints I added in the previous commit took up too much vertical space — every dropdown / number field got a 1-2 line explanation rendered all the time. Compact pipelines (3-4 nodes) suddenly looked like forms. Hide hints behind a small HelpCircle icon next to each field label. Hover (or focus, for keyboard users) shows the full text via the native browser tooltip — no portals, no positioning math, free screen-reader support via aria-label. Clicking the icon doesn't re-focus the wrapped input (preventDefault + stopPropagation), so it stays a pure read-only affordance. Range still renders inline below number inputs because concrete bounds (0.50 – 0.99) are worth glancing at every edit, not buried behind a tooltip.1619c45 -
Param hints: explain what each control does in plain language
Yuchen YuanEvery editable param now has a hint that tells the user (a) what the control actually means and (b) which way to push it for which effect. Previously fake_backend's dropdown showed 'FakeFez · 156q (Heron r2)' with zero context — a non-quantum reader had no idea Heron was a chip family or why three options exist; Qshot's snapshot dropdown was even worse, listing dates with no explanation of what a 'snapshot' is or why dates differ. New hints, all under one line: * fake_backend.backend_name → 'Each option is a simulated copy of a real IBM chip. The choice mainly affects which gate-error rates and qubit connectivity the noise model uses.' * qshot.noise_snapshot → 'A real IBM chip's calibration captured on a specific date — different days have different noise levels, so the recommended shot count shifts too.' * qshot.alpha (was 'fraction of converged fidelity to hit', a domain-of-art phrasing) → 'Fraction of the best-possible accuracy you want. 0.95 = aim for 95% — higher me…cadac03 -
Generalise inline param editor; tunables for QuCAD + fake_backend
Yuchen YuanThe Qshot block had a hand-written inline editor; promote it to a schema-driven component so other blocks can opt in by listing `params: NodeParamSpec[]` in their NodeSpec — no per-block wiring. The single rule for what becomes user-tunable: it has to be an actual function argument on the algorithm's public API (Qshot.predict args, QuCAD's run_qucad_training_noisy args, fake_backend handler's backend_name lookup). Module-level constants the original author tuned during training stay locked — exposing them would invalidate bundled state. What's now tunable from the canvas (in addition to Qshot): * QuCAD — three ADMM hyperparameters: - `iterations` (1..20, default 3) — more = sparser pruning, slower - `lam` regularisation strength (1e-4..0.05, default 0.005) - `rho` ADMM penalty (10..5000, default 500) Inline hints flag the trade-off direction. * fake_backend — 3-way dropdown over the Heron-family fakes the backend handler can actually load: FakeFez (default) / FakeMarrak…94039f2