Overview: click a chip in Your line at a glance to open that member's Activity panel on My line

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-15 18:54:00 -05:00
parent 0da7c796b8
commit b7cc06b28c
4 changed files with 19 additions and 3 deletions
+13 -1
View File
@@ -430,7 +430,7 @@
const levels = r.levels || [];
const total = levels.reduce((n, L) => n + L.members.length, 0);
if ($('treeSub')) $('treeSub').textContent = total ? total + ' across 3 levels' : 'share your link to grow';
const chip = (m, q) => '<span class="lt-node' + (q ? ' qualified' : (m.email ? '' : ' deep')) + '" title="' + esc(m.name || 'member') + (q ? ' · bought a $20+ package (counts for their sponsor)' : ' · no $20+ buy yet') + (m.buyers ? ' · ' + m.buyers + ' qualifying buyer' + (m.buyers === 1 ? '' : 's') + ' of their own' : '') + '">' + esc(String(m.name || 'M').replace(/^@/, '').slice(0, m.own ? 20 : 14)) + (m.buyers ? '<i class="lt-n" title="their own qualifying buyers">' + m.buyers + '</i>' : '') + '</span>';
const chip = (m, q) => '<span class="lt-node' + (q ? ' qualified' : (m.email ? '' : ' deep')) + (m.ref && !m.own ? ' lt-go' : '') + '"' + (m.ref && !m.own ? ' role="button" tabindex="0" data-goref="' + esc(m.ref) + '"' : '') + ' title="' + esc(m.name || 'member') + (q ? ' · bought a $20+ package (counts for their sponsor)' : ' · no $20+ buy yet') + (m.buyers ? ' · ' + m.buyers + ' qualifying buyer' + (m.buyers === 1 ? '' : 's') + ' of their own' : '') + '">' + esc(String(m.name || 'M').replace(/^@/, '').slice(0, m.own ? 20 : 14)) + (m.buyers ? '<i class="lt-n" title="their own qualifying buyers">' + m.buyers + '</i>' : '') + '</span>';
const rowFor = lvl => {
const L = levels.find(x => x.level === lvl); const members = L ? L.members : [];
// gold = the contract counted this member as one of your qualifying buyers (not "the first N chips")
@@ -440,8 +440,15 @@
return '<div class="lt-row"><span class="lt-cap">L' + lvl + '</span><div class="lt-nodes">' + html + '</div></div>';
};
el.innerHTML = '<div class="lt-top"><span class="lt-you">YOU</span></div><div class="lt-stem"></div>' + rowFor(1) + rowFor(2) + rowFor(3);
// click a chip to drill down: My line opens with that person's Activity panel expanded (Marty, 2026-09-15)
const go = ref => { LINE_FOCUS_REF = ref; setPane('line'); };
el.querySelectorAll('[data-goref]').forEach(n => {
n.addEventListener('click', () => go(n.dataset.goref));
n.addEventListener('keydown', e => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); go(n.dataset.goref); } });
});
} catch (e) {}
}
let LINE_FOCUS_REF = null; // set by an Overview chip click; consumed once My line has rendered
// "What's new" card: latest notes + what is being built; a dot marks notes newer than the member's last look (Marty, 2026-09-14)
let newsLoaded = false;
async function loadNews() {
@@ -1489,6 +1496,11 @@
el.querySelectorAll('[data-cemail]').forEach(b =>
b.addEventListener('click', () => openConvo(b.dataset.cemail, b.dataset.cname)));
el.querySelectorAll('[data-act]').forEach(b => b.addEventListener('click', () => toggleLineActivity(b)));
if (LINE_FOCUS_REF) {
const ref = LINE_FOCUS_REF; LINE_FOCUS_REF = null;
const b = el.querySelector('[data-act="' + ref.replace(/"/g, '') + '"]');
if (b) { const row = b.closest('.lin-row'); if (row) { row.classList.add('lin-focus'); setTimeout(() => row.classList.remove('lin-focus'), 4000); } toggleLineActivity(b); setTimeout(() => (row || b).scrollIntoView({ behavior: 'smooth', block: 'center' }), 150); }
}
} catch (e) {}
}
// who is working: per-member activity drop-down under the row (any of the three levels)