Skip to content

Commit 01189f1

Browse files
committed
Fixes to includedCalendarSections
1 parent 120763b commit 01189f1

4 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎jgclark.Dashboard/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"plugin.id": "jgclark.Dashboard",
55
"plugin.name": "🎛 Dashboard",
66
"plugin.icon": "fa-gauge-high",
7-
"plugin.iconColor": "purple-600",
7+
"plugin.iconColor": "red-600",
88
"plugin.description": "A Dashboard for NotePlan, that in one place shows:\n- a compact list of open tasks and checklists from today's note\n- scheduled open tasks and checklists from other notes.\n- similarly for yesterday's note, tomorrow's note, and the weekly, monthly and quarterly notes too (if used)\n- all overdue tasks\n- all open tasks and checklists that contain particular @tags or #mentions of your choosing\n- the next notes ready to review (if you use the 'Projects and Reviews' plugin).\nIt includes many other ways of speeding up managing your tasks: see the website for more details.",
99
"plugin.author": "@jgclark",
1010
"plugin.comment": "TODO: On full release, change minAppVersion down to 3.7?",

‎jgclark.Dashboard/src/dashboardHelpers.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
//-----------------------------------------------------------------------------
33
// Dashboard plugin helper functions
4-
// Last updated 2026-01-16 for v2.4.0.b15, @jgclark
4+
// Last updated 2026-01-22 for v2.4.0.b17, @jgclark
55
//-----------------------------------------------------------------------------
66

77
import pluginJson from '../plugin.json'
@@ -691,13 +691,14 @@ export function filterParasByIncludedCalendarSections(
691691
if (!dashboardSettings.includedCalendarSections) {
692692
return paras
693693
}
694+
const includedCalendarSections = stringListOrArrayToArray(dashboardSettings.includedCalendarSections, ',')
694695

695696
const filteredParas = paras.filter((p) => {
696697
// only apply to calendar notes
697698
if (p.note?.type !== 'Calendar') return true
698699
// Apply to all H4/H3/H2 headings in the hierarchy for this para
699700
const theseHeadings = getHeadingHierarchyForThisPara(p)
700-
return theseHeadings.some((h) => dashboardSettings.includedCalendarSections.includes(h))
701+
return theseHeadings.some((h) => includedCalendarSections.includes(h))
701702
})
702703
logTimer(functionName, startTime, `- after filtering out calendar headings: ${filteredParas.length} paras`)
703704
return filteredParas

‎jgclark.Dashboard/src/dashboardSettings.js‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
//-----------------------------------------------------------------------------
33
// Settings for the dashboard - loaded/set in React Window
4-
// Last updated 2025-12-04 for v2.4.0, @jgclark
4+
// Last updated 2026-01-22 for v2.4.0.b17, @jgclark
55
//-----------------------------------------------------------------------------
66

77
import { defaultSectionDisplayOrder } from './constants.js'
@@ -82,7 +82,7 @@ export const dashboardSettingDefs: Array<TSettingItem> = [
8282
type: 'heading',
8383
label: 'What to Include and Exclude',
8484
description:
85-
"These settings control what Spaces, folders and items are included and excluded in Dashboard's many sections. It will first use only the included Spaces. Then, it includes the folders from the next setting, and removes any specified from the following setting. Finally, individual lines in notes can be ignored by adding terms to the last setting.",
85+
"These settings control what Spaces, folders and items are included and excluded in Dashboard's many sections. It will first use only the included Spaces. Then, it includes the folders from the next setting, and removes any specified from the following setting. Then certain Sections within Calendar notes can be included. Finally, individual lines in notes can be ignored by adding terms to the last setting.",
8686
},
8787
{
8888
key: 'includedTeamspaces',
@@ -105,21 +105,21 @@ export const dashboardSettingDefs: Array<TSettingItem> = [
105105
compactDisplay: true,
106106
},
107107
{
108-
key: 'includedCalendarSections',
109-
label: 'Calendar note Sections to Include',
108+
key: 'excludedFolders',
109+
label: 'Folders to Exclude',
110110
description:
111-
"Comma-separated list of calendar note section headings to include when selecting open tasks/checklists to show. The matches are partial, so 'Home' will include 'Home' and 'The Home Areas' etc. If left blank, all sections are included.",
111+
"Comma-separated list of folder(s) to ignore when selecting open tasks/checklists to show. The matches are partial, so 'Work' will exclude 'Work' and 'Work/CompanyA' etc. To ignore notes at the top-level (not in a folder), include '/' in the list. (@Trash is always ignored, but other special folders need to be specified, e.g. @Archive, @Templates.)",
112112
type: 'input',
113-
default: '',
113+
default: '@Archive, @Templates, Saved Searches',
114114
compactDisplay: true,
115115
},
116116
{
117-
key: 'excludedFolders',
118-
label: 'Folders to Exclude',
117+
key: 'includedCalendarSections',
118+
label: 'Calendar note Sections to Include',
119119
description:
120-
"Comma-separated list of folder(s) to ignore when selecting open tasks/checklists to show. The matches are partial, so 'Work' will exclude 'Work' and 'Work/CompanyA' etc. To ignore notes at the top-level (not in a folder), include '/' in the list. (@Trash is always ignored, but other special folders need to be specified, e.g. @Archive, @Templates.)",
120+
"Comma-separated list of calendar note section headings to include when selecting open tasks/checklists to show. The matches are partial, so 'Home' will include 'Home' and 'The Home Areas' etc. If left blank, all sections are included.",
121121
type: 'input',
122-
default: '@Archive, @Templates, Saved Searches',
122+
default: '',
123123
compactDisplay: true,
124124
},
125125
{

‎jgclark.Dashboard/src/types.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @flow
22
//-----------------------------------------------------------------------------
33
// Types for Dashboard code
4-
// Last updated 2026-01-19 for v2.4.0.b16 by @jgclark
4+
// Last updated 2026-01-22 for v2.4.0.b17 by @jgclark
55
//-----------------------------------------------------------------------------
66
// Types for Settings
77

@@ -79,8 +79,9 @@ export type TDashboardSettings = {
7979
hidePriorityMarkers: boolean,
8080
ignoreChecklistItems: boolean,
8181
ignoreItemsWithTerms: string, // Note: Run through stringListOrArrayToArray() before use
82-
includedTeamspaces: Array<string>, // Array of teamspace IDs to include ('private' for Private space)
82+
includedCalendarSections: string, // Note: Run through stringListOrArrayToArray() before use
8383
includedFolders: string, // Note: Run through stringListOrArrayToArray() before use
84+
includedTeamspaces: Array<string>, // Array of teamspace IDs to include ('private' for Private space)
8485
showFolderName: boolean, // Note: was includeFolderName before 2.2.0.
8586
showScheduledDates: boolean, // Note: was includeScheduledDates before 2.2.0.rename to show...
8687
showTaskContext: boolean, // Note: was includeTaskContext before 2.2.0.

0 commit comments

Comments
 (0)