Skip to content

Commit 0cb958d

Browse files
committed
Merge branch 'main' of https://github.com/NotePlan/plugins
2 parents 9842b8d + 58ee1f9 commit 0cb958d

16 files changed

Lines changed: 446 additions & 195 deletions

File tree

helpers/HTMLView.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,13 +995,18 @@ export function convertNPBlockIDToHTML(input: string): string {
995995
* @param {string} commandName to call when button is 'clicked'
996996
* @param {string} commandArgs (may be empty)
997997
* @param {string?} tooltipText to hover display next to button
998+
* @param {boolean} nativeTooltips use native browser tooltips (default: false)
998999
* @returns {string}
9991000
*/
1000-
export function makePluginCommandButton(buttonText: string, pluginName: string, commandName: string, commandArgs: string, tooltipText: string = ''): string {
1001+
export function makePluginCommandButton(buttonText: string, pluginName: string, commandName: string, commandArgs: string, tooltipText: string = '', nativeTooltips: boolean = false): string {
10011002
const output = tooltipText
1002-
? `<button class="PCButton tooltip" data-tooltip="${tooltipText}" data-plugin-id="${pluginName}" data-command="${commandName}" data-command-args="${String(
1003+
? (nativeTooltips ?
1004+
`<button class="PCButton" title="${tooltipText}" data-plugin-id="${pluginName}" data-command="${commandName}" data-command-args="${String(
10031005
commandArgs,
10041006
)}">${buttonText}</button>`
1007+
: `<button class="PCButton tooltip" data-tooltip="${tooltipText}" data-plugin-id="${pluginName}" data-command="${commandName}" data-command-args="${String(
1008+
commandArgs,
1009+
)}">${buttonText}</button>`)
10051010
: `<button class="PCButton" data-plugin-id="${pluginName}" data-command="${commandName}" data-command-args="${commandArgs}" >${buttonText}</button>`
10061011
return output
10071012
}

jgclark.Dashboard/src/react/components/Header/Header.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/* Settings for flex-based layout */
66
.header {
7-
font-size: 0.92rem;
7+
font-size: 0.9rem;
88
/* Define grid-template-areas for better control */
99
/* display: grid; */
1010
display: flex;
@@ -104,7 +104,7 @@
104104
/* For buttons in header area */
105105
/* TODO: Ideally rationalise this with the addButton icon-buttons in the sectionInfo area */
106106
.HAButton {
107-
font-size: 0.92rem;
107+
font-size: 0.9rem;
108108
font-weight: 500;
109109
border-style: solid;
110110
border-width: 1px;

jgclark.Dashboard/src/react/components/RefreshControl.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { logDebug, logInfo } from '@helpers/dev'
1111

1212
type Props = {
1313
refreshing: boolean,
14-
firstRun: boolean,
14+
firstRun?: boolean,
1515
handleRefreshClick: () => void,
1616
}
1717

@@ -32,11 +32,11 @@ const RefreshControl = (props: Props): React$Node => {
3232
<>
3333
<i className={refreshing ? 'fa-regular fa-arrow-rotate-right fa-spin' : 'fa-regular fa-arrow-rotate-right'}></i>
3434
{/* <span className="pad-left">{refreshing ? 'Refreshing' : 'Refresh'}</span> */}
35-
<span className={refreshing || firstRun ? "pad-left greyedText" : "pad-left"}>{firstRun ? 'Generating' : 'Refresh'}</span>
35+
<span className={refreshing || firstRun ? 'pad-left greyedText' : 'pad-left'}>{firstRun ? 'Generating' : 'Refresh'}</span>
3636
</>
3737
}
3838
clickHandler={handleRefreshClick}
39-
disabled={refreshing || firstRun}
39+
disabled={Boolean(refreshing || firstRun)}
4040
className="HAButton refreshButton"
4141
/>
4242
)

jgclark.Dashboard/src/refreshClickHandlers.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,11 @@ export async function incrementallyRefreshSomeSections(
9696
await refreshSomeSections({ ...data, sectionCodes: [sectionCode] }, calledByTrigger)
9797
logTimer(`clickHandlers`, start, `incrementallyRefreshSomeSections getting ${sectionCode})`)
9898
}
99-
const updates: any = { refreshing: false }
99+
const updates: any = { refreshing: false, firstRun: false }
100100
if (setFullRefreshDate) updates.lastFullRefresh = new Date()
101101
await setPluginData(updates, `Ending incremental refresh for sections ${String(sectionCodes)} (after ${timer(incrementalStart)})`)
102102
logTimer('incrementallyRefreshSomeSections', incrementalStart, `for ${sectionCodes.length} sections`, 2000)
103103

104-
await setPluginData({ firstRun: false, refreshing: false }, `End of incremental refresh, so setting firstRun + refreshing to false`)
105-
106104
// re-calculate done task counts (if the appropriate setting is on)
107105
const NPSettings = await getNotePlanSettings()
108106
if (NPSettings.doneDatesAvailable) {

jgclark.NoteHelpers/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This plugin (now a Core Plugin bundled with NotePlan 3.16.1 onwards) provides co
2626
- **open note new window** (alias **onw**): open a user-selected note in a new window (and places the cursor at what it judges to be the start of the main content)
2727
- **open note new split** (alias **ons**): open a user-selected note in a new split of the main window (and places the cursor at what it judges to be the start of the main content)
2828
- **open url from a note**: asks for a note, and then presents a list of URLs found in that note. The selected one is then opened in your default browser. (There's a setting to ignore URLs in closed tasks.)
29-
- **rename note filename**: renames the currently open note to one you specify. Note: this changes the underlying _filename_ not the visible _title_.
29+
- **rename note filename**: renames the currently open note to one you specify. Note: this changes the underlying _filename_ not the visible _title_. This has proved very helpful for people renaming notes who have imported them from other systems, including Obsidian.
3030
- **rename filename to title**: renames the current filename to the title of the note
3131
- **rename inconsistent note filenames**: renames the files of notes whose filenames are inconsistent with their titles. When run it offers to rename all in one go, or to go one by one so you can choose which ones to rename.
3232
- **reset title to match filename**: resets the current note title to match its filename.

jgclark.Reviews/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# What's changed in 🔬 Projects + Reviews plugin?
22
See [website README for more details](https://github.com/NotePlan/plugins/tree/main/jgclark.Reviews), and how to configure.
33

4+
## [1.1.0] - 2025-02-03
5+
### New
6+
- Supports 'Perspectives' from Dashboard plugin. (If you turn the feature on in settings), the Project List will automatically use the current 'Perspective' definition from the Dashboard plugin to determine which folders are included and excluded.
7+
- where you have more than one project tag, each tag is shown in a section that can be collapsed or expanded using the triangle icons ▼ or ▶.
8+
9+
### Changed
10+
- changed the top-middle box of controls to be a top bar, with only the controls that can't live in the popup 'edit dialog' boxes.
11+
- top bar now shows the current Perspective name (if used).
12+
- other improvements of the 'rich' style Project List, to bring more in line with the Dashboard plugin. Including a simpler style of tooltips that aren't clipped.
13+
- now supports multiple next action tags, and shows all of them in the Project List. (requested by @matt.)
14+
- when you run '/cancel project' it now asks for a progress comment (like happens when you pause a project).
15+
- the heading of the edit dialog box now shows the note title (not filename), and the current review interval
16+
417
## [1.0.2] - 2024-12-28 (unreleased)
518
- now uses the user's 'Editor Font Size' setting to determine the base font size for the rich view of the Project List -- and so can be changed up and down quite easily -- rather than using what the Theme defines.
619
- small layout tweaks

jgclark.Reviews/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ After each project name (the title of the note) is an edit icon, which when clic
1313

1414
![Edit dialog](edit-dialog-1.0.png)
1515

16-
User George (@george65) has recorded two video walkthroughs that show most of what the plugin does (recorded using an earlier version of the plugin):
16+
User George (@george65) has recorded two video walkthroughs that show most of what the plugin does (recorded using an earlier version of the plugin, so the UI is different):
1717

1818
- [Inside Look: How George, CMO of Verge.io, Uses NotePlan for Effective Project Management](https://www.youtube.com/watch?v=J-FlyffE9iA) featuring this and my Dashboard plugin.
1919
[![thumbnail](effective-PM-with-George-thumbnail.jpg)](https://www.youtube.com/watch?v=J-FlyffE9iA)
@@ -90,12 +90,12 @@ Other notes:
9090
- If there are multiple copies of a metadata field, only the first one is used.
9191
- I'm sometimes asked why I use `@reviewed(2021-06-25)` rather than `@reviewed/2021-06-25`. The answer is that while the latter form is displayed in a neater way in the sidebar, the date part isn't available in the NotePlan API as the part after the slash is not a valid @tag as it doesn't contain an alphabetic character.
9292

93-
## Reviewing Projects and/or Areas
94-
Use the '**Hashtags to review**' setting to control which notes are included in the review lists:
95-
- If this setting is empty, then it will include all notes for review that include a `@review(...)` string.
96-
- if it is set (e.g. `#project, #area, #goal`), then it will include just those notes which also have one or more of those tags.
97-
- Particularly if you have a large collection of notes in NP, you can also specify a 'Folders to include for reviews' setting (which includes any sub-folders).
98-
- You can specify folders to ignore using the 'Folders to Ignore for reviews' setting; I have this set to `Summaries, Reviews, Saved Searches`. Any sub-folders of these will also be ignored. (Note that the special Templates, Archive and Trash are always excluded.)
93+
## Selecting notes to include
94+
There are 2 parts of this:
95+
1. Use the '**Hashtags to review**' setting to control which notes are included in the review lists. If it is set (e.g. `#project, #area, #goal`), then it will include just those notes which also have one or more of those tags. If this setting is empty, then it will include all notes for review that include a `@review(...)` string.
96+
2. Then specifiy which folders you want to include and/or exclude notes from. There are 2 ways to do this:
97+
1. From v1.1 you can use the '**Use Perspectives**' setting to control which folders are included. This requires the [Dashboard plugin](https://github.com/NotePlan/plugins/blob/main/jgclark.Dashboard/) to be installed, and if set then it uses the current Perspective's settings instead of the following 2 settings.
98+
2. Or Use the 'Folders to Include' and 'Folders to Exclude' settings to put a comma-separated list of folders to include and exclude. I have this set to `Summaries, Reviews, Saved Searches`. Any sub-folders of these will also be ignored. (Note that the special Templates, Archive and Trash are always excluded.)
9999

100100
When you have [configured the plugin](#configuration), and added suitable metadata to notes, you're then ready to use some or all of the following commands:
101101

@@ -107,16 +107,16 @@ You can set the '**Output style to use**'. This is either a '**Rich**' (HTML, sh
107107
![Example of 'Markdown' style of Project Lists](review-list-markdown-0.11@2x.png)
108108

109109
Notes about the displays:
110-
- the **Rich style** _isn't a normal NotePlan note that is saved and can be accessed again later_. You will need to re-run the command to see the list again once you close the window. This 'Rich' style mimics the NotePlan Theme you use (though see below on how to override this). In this style this heading row deliberately 'sticks' to the top of the window as you scroll the list:
110+
- the **Rich style** is a temporary HTML window that picks up the NotePlan Theme you use (though see below on how to override this). In this style there's a heading row deliberately 'sticks' to the top of the window as you scroll the list:
111111
![Buttons in 'Rich' style](top-controls-1.0.png)
112-
- in the Rich style, all #tags to review get shown one after the other in a single window.
112+
- in the Rich style, all #tags to review get shown one after the other in a single window. These can be collapsed and expanded as a group using the triangle icons ▼ or ▶.
113113
- if you can make the window wide enough it will display in 2 (or even 3!) columns
114-
- the **Markdown style** list _is_ stored in summary note(s) in the 'Reviews' folder (or whatever you set the 'Folder to store' setting to be).
114+
- the **Markdown style** list _is_ stored as a summary note(s) in the 'Reviews' folder (or whatever you set the 'Folder to store' setting to be).
115115
- the button 'Start reviews' / 'Start reviewing notes ready for review' is a shortcut to the '/start reviews' command (described below).
116116
- each project title is also an active link which can be clicked to take you to that project note. (Or Option-click to open that in a new split window, which keeps the review list open.)
117117

118118
Other settings:
119-
- Next action tag: #hashtag to include in a task or checklist to indicate its the next action in this project (optional; default '#next').
119+
- Next action tag(s): optiona list of #hashtags to include in a task or checklist to indicate its the next action in this project (comma-separated; default '#next').
120120
- Display next actions in output? Whether to display the next action in the output? This requires the previous setting to be set. Note: If there are multiple items with the next action tag, only the first is shown.
121121
- Folders to Include (optional): Specify which folders to include (which includes any of their sub-folders) as a comma-separated list. This match is done anywhere in the folder name, so you could simply say `Project` which would match for `Client A/Projects` as well as `Client B/Projects`. Note also:
122122
- if you specify the root folder `/` this only includes the root folder itself, and not all its sub-folders.
@@ -146,7 +146,7 @@ This kicks off the most overdue review by opening that project's note in the edi
146146

147147
### "/finish project review" command
148148
This updates the current open project's `@reviewed(date)`, and if a Rich style project list is open, it is refreshed.
149-
If the 'Next action tag' setting is set, then it will warn if it finds no example of that tag on all open tasks/checklists.
149+
If the 'Next action tag(s)' setting is set, then it will warn if it finds no example of those tags on all open tasks/checklists.
150150

151151
### "/next project review" command
152152
This updates this project's `@reviewed(date)`, and jumps to the next project to review. If there are none left ready for review it will show a congratulations message.

0 commit comments

Comments
 (0)