Enhance the todo tracker sidebar panel with: - Group todos by heading from the source file - Display nested (indented) todos as a tree - Drag-and-drop to reorder todos within/across heading groups - Keyboard navigation (arrow keys, Enter to open, M to move, toggle hotkey) - Right-click context menu replacing the ellipsis button - Proper focus management (no focus stealing on refresh) - Platform-aware Obsidian hotkey matching for toggle checkbox Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
109 lines
1.9 KiB
CSS
109 lines
1.9 KiB
CSS
/* Todo Tracker Styles */
|
|
|
|
.todo-tracker-container {
|
|
padding: 10px;
|
|
outline: none;
|
|
}
|
|
|
|
.todo-tracker-header {
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
padding-bottom: 10px;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
margin-bottom: 10px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.todo-tracker-empty {
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
padding: 20px 0;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Heading Groups */
|
|
.todo-tracker-group {
|
|
margin-bottom: 12px;
|
|
border-radius: 4px;
|
|
transition: background-color 0.15s ease;
|
|
}
|
|
|
|
.todo-tracker-group-heading {
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
color: var(--text-muted);
|
|
padding: 4px 4px 4px 0;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
/* Todo Lists */
|
|
.todo-tracker-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.todo-tracker-nested-list {
|
|
list-style: none;
|
|
padding-left: 20px;
|
|
margin: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Todo Items */
|
|
.todo-tracker-item {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
padding: 6px 4px;
|
|
border-radius: 4px;
|
|
cursor: grab;
|
|
transition: background-color 0.15s ease;
|
|
}
|
|
|
|
.todo-tracker-item:hover {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
.todo-tracker-item input[type="checkbox"] {
|
|
flex-shrink: 0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.todo-tracker-item-text {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.todo-tracker-item-completed {
|
|
text-decoration: line-through;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Keyboard focus */
|
|
.todo-tracker-item-focused {
|
|
outline: 2px solid var(--interactive-accent);
|
|
outline-offset: -2px;
|
|
background-color: var(--background-modifier-hover);
|
|
}
|
|
|
|
/* Drag and drop */
|
|
.todo-tracker-item-dragging {
|
|
opacity: 0.4;
|
|
}
|
|
|
|
.todo-tracker-drop-above {
|
|
border-top: 2px solid var(--interactive-accent);
|
|
}
|
|
|
|
.todo-tracker-drop-below {
|
|
border-bottom: 2px solid var(--interactive-accent);
|
|
}
|
|
|
|
.todo-tracker-drag-over {
|
|
background-color: var(--background-modifier-hover);
|
|
}
|