web: draw the attention bell as one monochrome svg
Replace the yellow emoji in the Runs heading with a 20px inline-SVG outline bell that inherits currentColor. The badge, count model, accessible name, click behaviour, in-place refresh and Escape focus return are unchanged. Cover the glyph in ui-smoke: tag/viewBox/paths, 20px size, no emoji or glyph class, badge text/count/label, badge position:absolute with a no-shift rect measurement at 1440x900 and 420x900, glyph survival across a count change, and the zero state at both widths. R15 records the new captures.
This commit is contained in:
@@ -42,6 +42,31 @@ export function createAttentionView(rt) {
|
||||
const selectRun = (...args) => rt.selectRun(...args);
|
||||
|
||||
|
||||
/**
|
||||
* The monochrome outlined bell for the Runs heading: an inline SVG stroked with
|
||||
* `currentColor` so it follows the button's text colour instead of the colour
|
||||
* emoji's fixed yellow. Decorative — the button's `aria-label` carries the name.
|
||||
*/
|
||||
function attentionBellIcon() {
|
||||
const NS = "http://www.w3.org/2000/svg";
|
||||
const svg = document.createElementNS(NS, "svg");
|
||||
svg.setAttribute("class", "attention-bell-icon");
|
||||
svg.setAttribute("viewBox", "0 0 24 24");
|
||||
svg.setAttribute("aria-hidden", "true");
|
||||
svg.setAttribute("focusable", "false");
|
||||
for (const d of ["M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9", "M10.3 21a1.94 1.94 0 0 0 3.4 0"]) {
|
||||
const path = document.createElementNS(NS, "path");
|
||||
path.setAttribute("d", d);
|
||||
path.setAttribute("fill", "none");
|
||||
path.setAttribute("stroke", "currentColor");
|
||||
path.setAttribute("stroke-width", "1.7");
|
||||
path.setAttribute("stroke-linecap", "round");
|
||||
path.setAttribute("stroke-linejoin", "round");
|
||||
svg.append(path);
|
||||
}
|
||||
return svg;
|
||||
}
|
||||
|
||||
/**
|
||||
* The attention bell action, shown in the Runs list heading (R15). Its
|
||||
* accessible name comes from `attentionBadgeLabel`; the visible badge is drawn
|
||||
@@ -59,7 +84,7 @@ function renderAttentionBell() {
|
||||
title: label,
|
||||
onclick: openAttentionSheet,
|
||||
});
|
||||
button.append(h("span", { class: "attention-bell-glyph", "aria-hidden": "true", text: "\uD83D\uDD14" }));
|
||||
button.append(attentionBellIcon());
|
||||
if (count > 0) {
|
||||
button.append(
|
||||
h("span", {
|
||||
|
||||
Reference in New Issue
Block a user