diff --git a/notes/panel.luau b/notes/panel.luau index 71bea8f..4b0df17 100644 --- a/notes/panel.luau +++ b/notes/panel.luau @@ -192,15 +192,25 @@ local function togglePin(file) render() end +local function truncateText(text, maxLength) + if #text <= maxLength then + return text + end + return text:sub(1, maxLength - 3) .. "..." +end + local function listRow(file) local pinned = pins[file] == true -- Both row states keep the same leading text button so the row height (set -- by the text-button tier) never changes when the confirm controls swap in. + local displayName = displayName(file) + local truncated = truncateText(displayName, 34) local title = { - text = displayName(file), + text = truncated, variant = "ghost", contentAlign = "start", flexGrow = 1, + tooltip = displayName, onClick = function() openNote(file) end, diff --git a/notes/plugin.toml b/notes/plugin.toml index 22d9ad1..1176938 100644 --- a/notes/plugin.toml +++ b/notes/plugin.toml @@ -1,6 +1,6 @@ id = "noctalia/notes" name = "Notes" -version = "1.0.3" +version = "1.0.4" plugin_api = 9 author = "noctalia" license = "MIT"