Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion notes/panel.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion notes/plugin.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id = "noctalia/notes"
name = "Notes"
version = "1.0.3"
version = "1.0.4"
plugin_api = 9
author = "noctalia"
license = "MIT"
Expand Down