← Commit history

adom-fields 0.7.11: the sidebar buttons light up while their panel is open

John Lauer ·9e894ccb80 · ·parent 90bd6d1
7 files changed +18−14
Cargo.lock+1−1
@@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"  [[package]] name = "adom-fields"-version = "0.7.10"+version = "0.7.11" dependencies = [  "clap",  "png",
Cargo.toml+1−1
@@ -1,6 +1,6 @@ [package] name = "adom-fields"-version = "0.7.10"+version = "0.7.11" edition = "2021" license = "MIT" description = "Adom Fields: where the current and the heat go on your board. Current density, copper heat flow and board temperature from the board file itself, in 3D, for the AI to drive and the human to explore."
bin/adom-fields
⋯ 1 unchanged line ⋯
docs/release-0.7.11.mdadded+3
@@ -0,0 +1,3 @@+# adom-fields 0.7.11++- The sidebar buttons (nets and issues) light up while their panel is open, like the other header toggles.
package.json+1−1
@@ -1,7 +1,7 @@ {   "slug": "adom-fields",   "type": "app",-  "version": "0.7.10",+  "version": "0.7.11",   "title": "Adom Fields",   "brief": "Adom Fields: where the current and the heat go on your board.",   "summary": "Current density on the copper, heat flow through the pours and the vias, and the temperature over the board, solved from the board file itself and shown on the board in 3D. The AI does the analysis and drives the view; the human orbits, zooms, hovers for the number under the cursor, and reads the nets by what they carry and the issues by what to fix. A step in Adom's AI Flow: the walkthrough goes into the video.",
page.json+7−9
@@ -1,7 +1,7 @@ {   "slug": "adom-fields",   "type": "app",-  "version": "0.7.10",+  "version": "0.7.11",   "title": "Adom Fields",   "brief": "Adom Fields: where the current and the heat go on your board.",   "summary": "Current density on the copper, heat flow through the pours and the vias, and the temperature over the board, solved from the board file itself and shown on the board in 3D. The AI does the analysis and drives the view; the human orbits, zooms, hovers for the number under the cursor, and reads the nets by what they carry and the issues by what to fix. A step in Adom's AI Flow: the walkthrough goes into the video.",@@ -17,10 +17,7 @@     "vias",     "3d",     "analysis",-    "eda",-    "current flow animation",-    "voltage",-    "river"+    "eda"   ],   "status": "live",   "discovery_pitch": "Solve where the current and the heat go on a KiCad board and show it on the board in 3D: current density per net, heat flow per layer with the vias, temperature over the board, the nets by what they carry, the issues with the fix. One command to solve, one to serve, one to drive it on camera.",@@ -40,10 +37,11 @@     "fields",     "flow of current",     "river view",-    "voltage drop in 3d",-    "ground bounce",+    "energy flow on a board",+    "poynting vector",+    "speed of light on a pcb",+    "electron drift speed",     "exploded layer stack",-    "current through vias",     "explain the view out loud",     "narrate the fields",     "energy cycle",@@ -126,4 +124,4 @@     "name": "John Lauer",     "email": "[email protected]"   }-}\ No newline at end of file+}
src/ui/app.js+5−2
@@ -246,6 +246,9 @@     explain(q, true);   }   window.fieldsNarrate = { explain, stop: stopNarration, text: narrationText, mode: () => narr.mode };+  // the sidebar buttons light while their panel is on screen (a wide window shows both panels all the time)+  function syncSideBtns() { for (const [btn, side] of [['#btnNets', '#left'], ['#btnIssues', '#right']]) { const b = $(btn), p = $(side); if (!b || !p) continue; const on = getComputedStyle(p).display !== 'none'; b.classList.toggle('is-on', on); b.setAttribute('aria-pressed', on); } }+  window.addEventListener('resize', syncSideBtns); setTimeout(syncSideBtns, 0);   function syncNarrSeg() { for (const b of document.querySelectorAll('#narrMode button')) { const on = b.dataset.n === narr.mode; b.classList.toggle('is-on', on); b.setAttribute('aria-pressed', on); } }   function partsMode() { const m = state.view.parts || 'auto'; if (m !== 'auto') return m; return state.view.quantity === 'signals' ? 'off' : 'ghost'; }   function applyParts() {@@ -448,8 +451,8 @@     const n = e.target.closest('[data-net]'); if (n) return post('ui/select', { net: state.view.net === n.dataset.net ? '' : n.dataset.net });     const c = e.target.closest('[data-chip]'); if (c) return post('ui/select', { chip: c.dataset.chip });     const is = e.target.closest('[data-issue]'); if (is) return post('ui/issue', { index: +is.dataset.issue });-    if (e.target.closest('#btnNets')) { $('#left').classList.toggle('is-open'); $('#right').classList.remove('is-open'); }-    if (e.target.closest('#btnIssues')) { $('#right').classList.toggle('is-open'); $('#left').classList.remove('is-open'); }+    if (e.target.closest('#btnNets')) { $('#left').classList.toggle('is-open'); $('#right').classList.remove('is-open'); syncSideBtns(); }+    if (e.target.closest('#btnIssues')) { $('#right').classList.toggle('is-open'); $('#left').classList.remove('is-open'); syncSideBtns(); }     if (e.target.closest('#btnExplain')) { if (narr.audio || narr.busy) return stopNarration(); return explain(state.view.quantity, false); }     const nm = e.target.closest('#narrMode button'); if (nm) { narr.mode = nm.dataset.n; try { localStorage.setItem('fields.narrate', narr.mode); } catch (err) { void err; } syncNarrSeg(); if (narr.mode !== 'ask') toast(narr.mode === 'first' ? 'Each view explains itself the first time you open it' : 'Every view explains itself when you open it'); return; }     if (e.target.closest('#btnSilk')) return setView({ silk: state.view.silk === false });