Replace feed indicator emoji with geometric glyphs
Emoji shipped as per-item feed data from the ten bundled plugins, against
the no-emoji brand rule. Replaced with single geometric marks, following the
precedent already in the tree at bookmarks.js:62-64 (star glyphs, not emoji).
The two severity ladders (earthquakes magnitude, NWS alert severity) become
a fill ladder instead of a colour ladder: circle empty to full. That reads in
a monochrome theme and does not lean on red/green to carry the meaning, which
the coloured-circle emoji did.
Also corrects the doc comments that told plugin authors to use emoji here:
the plugin_authoring.md field table, BiteDisplay::indicator and its setter,
DbFeedItem::bite_indicator, both item DTO fields, and the components.js
empty-state icon option. Leaving those would have reintroduced emoji through
the next plugin written against them.
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
15 files changed,
+35 insertions,
-29 deletions
| 114 |
114 |
|
| `author` | String | Attribution line (feed name, username, etc.) |
|
| 115 |
115 |
|
| `text` | String | Primary display text (truncated title or summary) |
|
| 116 |
116 |
|
| `secondary` | String or `()` | Optional secondary info (score, comment count) |
|
| 117 |
|
- |
| `indicator` | String or `()` | Optional type indicator (emoji or short string) |
|
|
117 |
+ |
| `indicator` | String or `()` | Optional type indicator, a short string. The bundled plugins use single geometric glyphs (`◆`, `▲`, `★`) and a fill ladder (`○ ◔ ◑ ●`) for severity, so an indicator reads in a monochrome theme and does not rely on colour. |
|
| 118 |
118 |
|
|
| 119 |
119 |
|
### `content`
|
| 120 |
120 |
|
|
| 160 |
160 |
|
author: author_display,
|
| 161 |
161 |
|
text: bite_text,
|
| 162 |
162 |
|
secondary: "[" + category + "]",
|
| 163 |
|
- |
indicator: "📄"
|
|
163 |
+ |
indicator: "▤"
|
| 164 |
164 |
|
},
|
| 165 |
165 |
|
content: #{
|
| 166 |
166 |
|
title: title,
|
| 171 |
171 |
|
author: author,
|
| 172 |
172 |
|
text: truncate(title, 100),
|
| 173 |
173 |
|
secondary: secondary,
|
| 174 |
|
- |
indicator: "💻"
|
|
174 |
+ |
indicator: "▧"
|
| 175 |
175 |
|
},
|
| 176 |
176 |
|
content: #{
|
| 177 |
177 |
|
title: title,
|
| 177 |
177 |
|
body += "**Alert level:** " + alert + "\n";
|
| 178 |
178 |
|
}
|
| 179 |
179 |
|
|
| 180 |
|
- |
// Indicator based on magnitude
|
| 181 |
|
- |
let indicator = "🟢";
|
|
180 |
+ |
// Indicator based on magnitude. Geometric glyphs, not emoji (brand rule);
|
|
181 |
+ |
// the ladder reads as fill rather than colour, so it survives a monochrome
|
|
182 |
+ |
// theme and does not lean on red/green to carry the meaning.
|
|
183 |
+ |
let indicator = "○";
|
| 182 |
184 |
|
if mag >= 7.0 {
|
| 183 |
|
- |
indicator = "🔴";
|
|
185 |
+ |
indicator = "●";
|
| 184 |
186 |
|
} else if mag >= 5.0 {
|
| 185 |
|
- |
indicator = "🟠";
|
|
187 |
+ |
indicator = "◑";
|
| 186 |
188 |
|
} else if mag >= 3.0 {
|
| 187 |
|
- |
indicator = "🟡";
|
|
189 |
+ |
indicator = "◔";
|
| 188 |
190 |
|
}
|
| 189 |
191 |
|
|
| 190 |
192 |
|
let secondary = "M" + mag + " · " + place;
|
| 201 |
201 |
|
author: owner,
|
| 202 |
202 |
|
text: truncate(name + ": " + description, 100),
|
| 203 |
203 |
|
secondary: secondary,
|
| 204 |
|
- |
indicator: "⭐"
|
|
204 |
+ |
indicator: "★"
|
| 205 |
205 |
|
},
|
| 206 |
206 |
|
content: #{
|
| 207 |
207 |
|
title: name,
|
| 168 |
168 |
|
item_type = item.type;
|
| 169 |
169 |
|
}
|
| 170 |
170 |
|
|
| 171 |
|
- |
// Determine indicator
|
| 172 |
|
- |
let indicator = "🔗";
|
|
171 |
+ |
// Determine indicator. Geometric glyphs, not emoji (brand rule); the
|
|
172 |
+ |
// default triangle matches HN's own upvote mark.
|
|
173 |
+ |
let indicator = "▲";
|
| 173 |
174 |
|
if item_type == "job" {
|
| 174 |
|
- |
indicator = "💼";
|
|
175 |
+ |
indicator = "■";
|
| 175 |
176 |
|
} else if item_type == "poll" {
|
| 176 |
|
- |
indicator = "📊";
|
|
177 |
+ |
indicator = "▣";
|
| 177 |
178 |
|
} else if item_url == () {
|
| 178 |
|
- |
indicator = "💬";
|
|
179 |
+ |
indicator = "◇";
|
| 179 |
180 |
|
}
|
| 180 |
181 |
|
|
| 181 |
182 |
|
// Create secondary text
|
| 163 |
163 |
|
author: author,
|
| 164 |
164 |
|
text: truncate(title, 100),
|
| 165 |
165 |
|
secondary: secondary,
|
| 166 |
|
- |
indicator: "🦞"
|
|
166 |
+ |
indicator: "◆"
|
| 167 |
167 |
|
},
|
| 168 |
168 |
|
content: #{
|
| 169 |
169 |
|
title: title,
|
| 146 |
146 |
|
author: "NASA",
|
| 147 |
147 |
|
text: truncate(title, 100),
|
| 148 |
148 |
|
secondary: secondary,
|
| 149 |
|
- |
indicator: "🔭"
|
|
149 |
+ |
indicator: "✦"
|
| 150 |
150 |
|
},
|
| 151 |
151 |
|
content: #{
|
| 152 |
152 |
|
title: title,
|
| 172 |
172 |
|
body += "**Instructions:** " + instruction;
|
| 173 |
173 |
|
}
|
| 174 |
174 |
|
|
| 175 |
|
- |
// Indicator based on severity
|
| 176 |
|
- |
let indicator = "🌤";
|
|
175 |
+ |
// Indicator based on severity. Same fill ladder as earthquakes.rhai:
|
|
176 |
+ |
// geometric glyphs, not emoji (brand rule), and escalation shown by how
|
|
177 |
+ |
// full the circle is rather than by colour.
|
|
178 |
+ |
let indicator = "○";
|
| 177 |
179 |
|
if severity == "Extreme" {
|
| 178 |
|
- |
indicator = "🔴";
|
|
180 |
+ |
indicator = "●";
|
| 179 |
181 |
|
} else if severity == "Severe" {
|
| 180 |
|
- |
indicator = "🟠";
|
|
182 |
+ |
indicator = "◑";
|
| 181 |
183 |
|
} else if severity == "Moderate" {
|
| 182 |
|
- |
indicator = "🟡";
|
|
184 |
+ |
indicator = "◔";
|
| 183 |
185 |
|
}
|
| 184 |
186 |
|
|
| 185 |
187 |
|
let secondary = severity;
|
| 133 |
133 |
|
bite: #{
|
| 134 |
134 |
|
author: author,
|
| 135 |
135 |
|
text: bite_text,
|
| 136 |
|
- |
indicator: "📰"
|
|
136 |
+ |
indicator: "◈"
|
| 137 |
137 |
|
},
|
| 138 |
138 |
|
content: #{
|
| 139 |
139 |
|
title: title,
|
| 144 |
144 |
|
author: "xkcd",
|
| 145 |
145 |
|
text: "#" + num + ": " + truncate(title, 90),
|
| 146 |
146 |
|
secondary: truncate(alt, 80),
|
| 147 |
|
- |
indicator: "📐"
|
|
147 |
+ |
indicator: "◇"
|
| 148 |
148 |
|
},
|
| 149 |
149 |
|
content: #{
|
| 150 |
150 |
|
title: "#" + num + ": " + title,
|