Skip to content
Merged
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
4 changes: 4 additions & 0 deletions dwertheimer.Favorites/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Favorites Plugin Changelog

## [1.3.4] - 2026-01-18 @dwertheimer

- Fixed dark mode issues with favorites browser window by using proper css variables for colors.

## [1.3.3 - waiting for np 3.20.1 release (change showReloadButton to true)] - 2026-01-11 @dwertheimer

- Added reload button to favorites browser window to allow for easy reloading of the window when changes are made to the plugin or the underlying note data.
Expand Down
4 changes: 2 additions & 2 deletions dwertheimer.Favorites/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"plugin.name": "⭐️ Favorites",
"plugin.description": "Get fast access to commonly-used notes. Set any Project Note(s) as a Favorites and have quick access to choose/open the file",
"plugin.author": "@dwertheimer",
"plugin.version": "1.3.3",
"plugin.lastUpdateInfo": "1.3.3: Use new sidebar view feature\n1.3.0: Add new '/favorites browser' command to open favorites in a sidebar window to view and open favorite notes and commands\n1.3.1: Fix request timeout issue\n1.3.2: Fix frontmatter not being removed when unfavoriting",
"plugin.version": "1.3.4",
"plugin.lastUpdateInfo": "1.3.4: Fix dark mode issues (thx @clayrussell)\n1.3.3: Use new sidebar view feature\n1.3.0: Add new '/favorites browser' command to open favorites in a sidebar window to view and open favorite notes and commands\n1.3.1: Fix request timeout issue\n1.3.2: Fix frontmatter not being removed when unfavoriting",
"plugin.dependencies": [],
"plugin.requiredFiles": ["react.c.FavoritesView.bundle.dev.js"],
"plugin.script": "script.js",
Expand Down
52 changes: 27 additions & 25 deletions dwertheimer.Favorites/src/components/FavoritesView.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--np-theme-background, #ffffff);
background: var(--bg-main-color);
width: 100%;
height: 100vh;
}

.favorites-view-window-header {
flex-shrink: 0;
padding: 1rem;
border-bottom: 1px solid var(--np-theme-border, #e0e0e0);
background: var(--np-theme-background-secondary, #f5f5f5);
border-bottom: 1px solid var(--divider-color);
background: var(--bg-alt-color);
}

.favorites-view-title {
margin: 0;
font-size: 1.25rem;
font-weight: 600;
color: var(--np-theme-text, #000000);
color: var(--fg-main-color);
}

.favorites-view-header {
flex-shrink: 0;
padding: 1rem;
border-bottom: 1px solid var(--np-theme-border, #e0e0e0);
background: var(--np-theme-background-secondary, #f5f5f5);
padding: .5rem;
border-bottom: 1px solid var(--divider-color);
background: var(--bg-alt-color);
}

.favorites-view-header-controls {
Expand All @@ -39,11 +39,11 @@

.favorites-view-segmented-control {
display: inline-flex;
background: var(--np-theme-background-tertiary, #f0f0f0);
background: var(--bg-mid-color);
border-radius: 6px;
padding: 2px;
gap: 2px;
border: 1px solid var(--np-theme-border, #e0e0e0);
border: 1px solid var(--divider-color);
flex: 1;
}

Expand All @@ -59,7 +59,7 @@
cursor: pointer;
font-size: 0.875rem;
font-weight: 500;
color: var(--np-theme-text-secondary, #666666);
color: var(--fg-placeholder-color);
transition: all 0.2s ease;
white-space: nowrap;
user-select: none;
Expand All @@ -68,19 +68,19 @@
}

.favorites-segment-button:hover {
background: var(--np-theme-background-hover, rgba(0, 0, 0, 0.05));
color: var(--np-theme-text, #000000);
background: var(--bg-mid-color);
color: var(--fg-main-color);
}

.favorites-segment-button-active {
background: var(--np-theme-background, #ffffff);
color: var(--np-theme-text, #000000);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
background: var(--bg-main-color);
color: var(--fg-main-color);
box-shadow: 0 1px 2px color-mix(in oklch, var(--bg-main-color), black 20%);
font-weight: 600;
}

.favorites-segment-button-active:hover {
background: var(--np-theme-background, #ffffff);
background: var(--bg-main-color);
}

.favorites-segment-icon {
Expand All @@ -95,22 +95,22 @@
align-items: center;
gap: 0.375rem;
padding: 0.5rem 0.75rem;
border: 1px solid var(--np-theme-border, #e0e0e0);
background: var(--np-theme-background, #ffffff);
border: 1px solid var(--divider-color);
background: var(--bg-main-color);
border-radius: 6px;
cursor: pointer;
font-size: 0.875rem;
font-weight: 500;
color: var(--np-theme-text, #000000);
color: var(--fg-main-color);
transition: all 0.2s ease;
white-space: nowrap;
user-select: none;
flex-shrink: 0;
}

.favorites-new-button:hover {
background: var(--np-theme-background-hover, rgba(0, 0, 0, 0.05));
border-color: var(--np-theme-border-hover, #d0d0d0);
background: var(--bg-mid-color);
border-color: var(--divider-color);
}

.favorites-new-button:active {
Expand All @@ -134,14 +134,13 @@

.favorites-item-note.favorites-item-newly-added,
.favorites-item-command.favorites-item-newly-added {
background-color: var(--np-theme-tint, #007aff);
background-color: rgba(0, 122, 255, 0.1); /* Light blue highlight */
background-color: color-mix(in oklch, var(--bg-main-color), var(--tint-color) 20%);
animation: highlightFade 2s ease-out;
}

@keyframes highlightFade {
0% {
background-color: rgba(0, 122, 255, 0.3);
background-color: color-mix(in oklch, var(--bg-main-color), var(--tint-color) 30%);
}
100% {
background-color: transparent;
Expand Down Expand Up @@ -174,7 +173,7 @@
.favorites-item-folder,
.favorites-item-description {
font-size: 0.75rem;
color: var(--np-theme-text-secondary, #666666);
color: var(--fg-placeholder-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down Expand Up @@ -222,3 +221,6 @@
}


.favorites-view-container .filterable-list-filter-row {
background: var(--bg-mid-color);
}
14 changes: 7 additions & 7 deletions helpers/react/FilterableList.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@
.filterable-list-filter-row {
flex-shrink: 0;
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--np-theme-border, #e0e0e0);
background: var(--np-theme-background-secondary, #f5f5f5);
border-bottom: 1px solid var(--divider-color);
background: var(--bg-alt-color);
}

.filterable-list-filter-input {
width: 100%;
padding: 0.5rem 0.75rem;
font-size: 0.9rem;
border: 1px solid var(--np-theme-border, #e0e0e0);
border: 1px solid var(--divider-color);
border-radius: 4px;
background: var(--np-theme-background, #ffffff);
color: var(--np-theme-text, #000000);
background: var(--bg-apple-input-color);
color: var(--fg-main-color);
outline: none;
transition: border-color 0.2s;
}

.filterable-list-filter-input:focus {
border-color: var(--tint-color, #007aff);
border-color: var(--tint-color);
}

.filterable-list-filter-input::placeholder {
color: var(--np-theme-text-secondary, #999999);
color: var(--fg-placeholder-color);
}

36 changes: 18 additions & 18 deletions helpers/react/List.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.list-empty-message {
padding: 2rem;
text-align: center;
color: var(--np-theme-text-secondary, #666666);
color: var(--fg-placeholder-color);
font-style: italic;
}

Expand All @@ -44,23 +44,23 @@
}

.list-item-noteplan-sidebar:hover {
background: var(--np-theme-background-hover, rgba(0, 0, 0, 0.05));
background: var(--bg-mid-color);
}

.list-item-noteplan-sidebar.selected {
background: var(--tint-color, #007aff);
color: white;
border-color: var(--tint-color, #007aff);
background: var(--tint-color);
color: var(--fg-main-color);
border-color: var(--tint-color);
}

.list-item-noteplan-sidebar.selected .list-item-action-button {
color: white;
color: var(--fg-main-color);
opacity: 0.8;
}

.list-item-noteplan-sidebar.selected .list-item-action-button:hover {
opacity: 1;
background: rgba(255, 255, 255, 0.2);
background: color-mix(in oklch, var(--tint-color), var(--fg-main-color) 20%);
}

/* Chips Style */
Expand All @@ -73,8 +73,8 @@
margin-bottom: 0.25rem;
border-radius: 4px;
cursor: pointer;
background: var(--np-theme-background, #ffffff);
border: 1px solid var(--np-theme-border, #e0e0e0);
background: var(--bg-main-color);
border: 1px solid var(--divider-color);
transition: all 0.2s;
outline: none;
display: flex;
Expand All @@ -84,24 +84,24 @@
}

.list-item-chips:hover {
background: var(--np-theme-background-hover, #f0f0f0);
border-color: var(--tint-color, #007aff);
background: var(--bg-mid-color);
border-color: var(--tint-color);
}

.list-item-chips.selected {
background: var(--tint-color, #007aff);
color: white;
border-color: var(--tint-color, #007aff);
background: var(--tint-color);
color: var(--fg-main-color);
border-color: var(--tint-color);
}

.list-item-chips.selected .list-item-action-button {
color: white;
color: var(--fg-main-color);
opacity: 0.8;
}

.list-item-chips.selected .list-item-action-button:hover {
opacity: 1;
background: rgba(255, 255, 255, 0.2);
background: color-mix(in oklch, var(--tint-color), var(--fg-main-color) 20%);
}

/* Item Content */
Expand Down Expand Up @@ -130,7 +130,7 @@
background: transparent;
transition: background 0.2s, opacity 0.2s;
opacity: 0.7;
color: var(--np-theme-text, #000000);
color: var(--fg-main-color);
display: flex;
align-items: center;
justify-content: center;
Expand All @@ -141,7 +141,7 @@
}

.list-item-action-button:hover {
background: var(--np-theme-background-hover, #f0f0f0);
background: var(--bg-mid-color);
}

/* Cursor Decoration - now handled by ModifierHints component */
Expand Down