Slack: transcript rows get their own class; Names switch works with the new rows; notices switch renamed

The row shared its class with the Send tile's status line, so every
transcript row was drawn at 0.8em, muted and nowrap; rows are .sl-row now
and read at the tile's text size. The Names switch targeted the old
markup (name line directly in the row) and hid nothing once the rows
gained a body. "System lines" reads "Channel notices", with a help line
naming what those are.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Waters Church
2026-09-14 17:10:36 -04:00
co-authored by Claude Fable 5.1
parent cc148926be
commit 0acaf47ac7
3 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -812,7 +812,7 @@ function createTranscriptTile({ root, moduleApi }) {
/** A message or a thread reply as one row; returns the row and its body (replies nest in the body). */
function buildLine(m, reply = false) {
const line = el('div', reply ? 'sl-reply' : 'sl-msg');
const line = el('div', reply ? 'sl-reply' : 'sl-row');
line.dataset.ts = m.ts;
line.classList.toggle('sl-me', Boolean(m.me));
line.classList.toggle('sl-bot', Boolean(m.bot));
@@ -876,7 +876,7 @@ function createTranscriptTile({ root, moduleApi }) {
});
}
entriesEl.addEventListener('contextmenu', (e) => {
const line = e.target.closest('.sl-msg, .sl-reply');
const line = e.target.closest('.sl-row, .sl-reply');
if (!line || !entriesEl.contains(line)) return;
const m = messagesByTs.get(line.dataset.ts);
if (!m) return;
+3 -2
View File
@@ -117,8 +117,9 @@
},
"showSystem": {
"type": "switch",
"label": "System lines",
"default": true
"label": "Channel notices",
"default": true,
"help": "Joins, leaves, topic changes, pins and other housekeeping lines."
}
}
}
+5 -6
View File
@@ -87,8 +87,9 @@
to { opacity: 1; transform: none; }
}
/* one row: the picture, then everything else */
[data-module="slack"] .sl-msg,
/* one row: the picture, then everything else (.sl-row — .sl-msg is the
send tile's status line, a different thing) */
[data-module="slack"] .sl-row,
[data-module="slack"] .sl-reply {
display: flex;
align-items: flex-start;
@@ -153,10 +154,8 @@
font-variant-numeric: tabular-nums;
}
[data-module="slack"] .sl-wrap:not(.show-times) .sl-time { display: none; }
[data-module="slack"] .sl-wrap:not(.show-names) .sl-msg > .sl-meta,
[data-module="slack"] .sl-wrap:not(.show-names) .sl-reply > .sl-meta { display: none; }
[data-module="slack"] .sl-wrap.show-times:not(.show-names) .sl-msg > .sl-meta,
[data-module="slack"] .sl-wrap.show-times:not(.show-names) .sl-reply > .sl-meta { display: flex; }
[data-module="slack"] .sl-wrap:not(.show-names) .sl-body > .sl-meta { display: none; }
[data-module="slack"] .sl-wrap.show-times:not(.show-names) .sl-body > .sl-meta { display: flex; }
[data-module="slack"] .sl-wrap.show-times:not(.show-names) .sl-name { display: none; }
[data-module="slack"] .sl-wrap:not(.show-system) .sl-entry.sl-system { display: none; }