Skip to content

Commit c35f885

Browse files
committed
fix(ui): replace color emoji with monochrome marks and SVG icons
- Memo categories in the memo editor read as draft / note with text marks, the memo hover no longer starts with a speech-bubble emoji, and the delete toast and the bulk-delete button use a trash SVG in the current text color - The graph snapshot draws its memo mark as a pencil glyph and the empty-search hint loses its light-bulb emoji - Color emoji stood out against the monochrome SVG icons the rest of the UI uses, which memo-list.js already states as the house rule
1 parent 481f485 commit c35f885

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

static/js/editor.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,11 +493,13 @@ function toggleLineMemoInline() {
493493

494494
// memo 編集 popup の category 選択肢。null は「category 未設定 (= 旧メモ)」用。
495495
const _MEMO_CATEGORIES = [
496-
{ value: 'draft', label: '📝 draft' },
496+
// option はテキストしか持てないので記号はモノクロの文字で揃える
497+
// (カラー絵文字は他の記号から浮く。memo-list.js のメモ印 ✎ と同じ)
498+
{ value: 'draft', label: '✎ draft' },
497499
{ value: 'ok', label: '✓ ok' },
498500
{ value: 'warn', label: '⚠ warn' },
499501
{ value: 'error', label: '✕ error' },
500-
{ value: 'note', label: '📌 note' },
502+
{ value: 'note', label: ' note' },
501503
];
502504

503505
function _mkCategorySelect(currentCat) {
@@ -1262,7 +1264,7 @@ async function ensureEditor() {
12621264
suffix = `\n\n*実態: ${defFile}:${n.match.line}*`;
12631265
}
12641266
contents.push({value:
1265-
`💬 **${n.label || shortPath(n.match?.file||'')+':'+(n.match?.line||'')}**\n\n${n.memo}${suffix}`
1267+
`**${n.label || shortPath(n.match?.file||'')+':'+(n.match?.line||'')}**\n\n${n.memo}${suffix}`
12661268
});
12671269
});
12681270
contents.push({value: '---'});

static/js/graph.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2797,10 +2797,10 @@ async function exportNodeSnapshot() {
27972797
ctx.fill();
27982798
ctx.stroke();
27992799

2800-
// 📝 アイコン + テキスト
2800+
// メモ印(モノクロ記号。カラー絵文字は他の記号から浮く)とテキスト
28012801
ctx.fillStyle = '#666';
28022802
ctx.font = `${FONT_SIZE - 1}px sans-serif`;
2803-
ctx.fillText('📝', bx + MEMO_PAD - 2, by + (bh - FONT_SIZE) / 2);
2803+
ctx.fillText('', bx + MEMO_PAD - 2, by + (bh - FONT_SIZE) / 2);
28042804
ctx.fillStyle = '#333';
28052805
ctx.font = MEMO_FONT;
28062806
ctx.fillText(memoText, bx + MEMO_PAD + 18, by + (bh - (FONT_SIZE - 1)) / 2);

static/js/memo-list.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ function saveMemoGroups(arr) {
3131

3232
// カラー絵文字 (⚡) は他のモノクロアイコンから浮くため、currentColor の SVG で持つ。
3333
const INSERTION_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 16 16" style="vertical-align:middle"><path d="M9 1.5 3.5 9H7l-1.5 5.5L11 7H7.5L9 1.5z" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/></svg>`;
34+
// 削除の印も同じ理由で SVG。トーストと一括削除ボタンで共用する
35+
const TRASH_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" viewBox="0 0 16 16" style="vertical-align:middle"><path d="M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l.7 9h5.6l.7-9" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/></svg>`;
3436

3537
function getAllMemosOrdered() {
3638
const lineMemos = getLineMemos();
@@ -186,7 +188,7 @@ function _showUndoToast(label) {
186188
clearTimeout(_memoListUndoTimer);
187189
const toast = document.createElement('div');
188190
toast.id = 'memo-undo-toast';
189-
toast.innerHTML = `<span>🗑 ${esc(label)}</span>` +
191+
toast.innerHTML = `<span>${TRASH_ICON_SVG} ${esc(label)}</span>` +
190192
`<button id="memo-undo-btn" title="Ctrl+Z でも可">元に戻す</button>`;
191193
document.body.appendChild(toast);
192194
document.getElementById('memo-undo-btn').onclick = _undoMemoDelete;
@@ -411,7 +413,7 @@ function renderMemoList() {
411413
const bulkBtn = document.createElement('button');
412414
bulkBtn.id = 'memo-list-bulk-del-drafts';
413415
bulkBtn.className = 'memo-bulk-btn';
414-
bulkBtn.textContent = '🗑 draft メモ全削除';
416+
bulkBtn.innerHTML = `${TRASH_ICON_SVG} draft メモ全削除`;
415417
bulkBtn.title = 'カテゴリ "draft" のメモを一括削除 (確認 dialog あり)';
416418
bulkBtn.onclick = _bulkDeleteDrafts;
417419
actionBar.appendChild(bulkBtn);

static/js/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function doSearch() {
196196
// 0件の理由 (glob ミス / regex ボタン押し忘れ) があれば結果パネルに表示。
197197
// 「存在しない」と「検索条件のミス」をユーザーが区別できるようにする。
198198
if(d.count === 0 && d.hint) {
199-
id('results').innerHTML = `<div class="search-hint">💡 ${esc(d.hint)}</div>`;
199+
id('results').innerHTML = `<div class="search-hint">${esc(d.hint)}</div>`;
200200
}
201201
saveSearchTab(q, d.count, title, overText);
202202
if(typeof updateSearchTitle === 'function') updateSearchTitle(q, d.count);

0 commit comments

Comments
 (0)