feat: show note emoji icon in wikilinks, relationships, and backlinks

Display the note's frontmatter emoji before its title in the editor
wikilink renderer, relationship LinkButtons, and backlinks panel for
consistent emoji visibility across the app.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-03-18 18:30:50 +01:00
parent a1600d5dee
commit 2f43b4bfeb
5 changed files with 77 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ import type { VaultEntry } from '../../types'
import { getTypeColor, getTypeLightColor } from '../../utils/typeColors'
import { getTypeIcon } from '../NoteItem'
import { findEntryByTarget } from '../../utils/wikilinkColors'
import { isEmoji } from '../../utils/emoji'
export function isWikilink(value: string): boolean {
return /^\[\[.*\]\]$/.test(value)
@@ -30,8 +31,10 @@ export function resolveRefProps(ref: string, entries: VaultEntry[], typeEntryMap
const resolved = resolveRef(ref, entries)
const refType = resolved?.isA ?? null
const te = typeEntryMap[refType ?? '']
const icon = resolved?.icon
return {
label: wikilinkDisplay(ref),
emoji: icon && isEmoji(icon) ? icon : null,
typeColor: getTypeColor(refType, te?.color),
bgColor: getTypeLightColor(refType, te?.color),
isArchived: resolved?.archived ?? false,