Skip to content

Add GraphNote plugin (jh.GraphNote) v1.0.0#711

Open
iamjameshannam wants to merge 7 commits intoNotePlan:mainfrom
iamjameshannam:main
Open

Add GraphNote plugin (jh.GraphNote) v1.0.0#711
iamjameshannam wants to merge 7 commits intoNotePlan:mainfrom
iamjameshannam:main

Conversation

@iamjameshannam
Copy link

This PR adds GraphNote, a visual graph exploration plugin for NotePlan.

Features:

  • Interactive graph of note links, tags, mentions, and external URLs
  • Multiple visualisation modes (force, radial, tree, treemap, sunburst)
  • Filtering, rebuild, and navigation back to notes

Commands:

  • graphnote
  • graphnote-rebuild

Includes required assets:

  • plugin.json
  • script.js
  • d3.v7.min.js

@jgclark jgclark self-requested a review December 29, 2025 22:42
@jgclark jgclark self-assigned this Dec 29, 2025
Copy link
Collaborator

@jgclark jgclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, now that I've had a chance to actually run it for myself, I can see this is great work.
I do have other suggestions and feature requests, but I'm keen to get it in front of others as soon as possible, so I'll just mention one for now. Which is to have another button (all of which could afford to be smaller) to ignore all Calendar notes. In my case they produce a huge amount of noise, which makes seeing anything meaningful difficult. (I have 2,660 calendar notes and 1,400 regular notes.)

Revert .gitignore exception for GraphNote script.js
Tightened up top bar UI styling, added Calendar toggle (to ignore Calendar entries)
Update README with Screen shot embed
@jgclark
Copy link
Collaborator

jgclark commented Dec 31, 2025

Thanks for the updates. There's still one outstanding comment that needs to be addressed before I can do a first release. That's the one about using the settings system, rather than suggesting users update the script.js file. Those changes will be lost when the next version is released ... which is why there's a separate settings system available.

Added:
Calendar Note toggle
AI Plugin settings link
Default Graph type settings
Colour of node settings
Updated for new settings and install process.
@iamjameshannam
Copy link
Author

iamjameshannam commented Jan 6, 2026 via email

@iamjameshannam
Copy link
Author

iamjameshannam commented Jan 11, 2026 via email

@iamjameshannam
Copy link
Author

iamjameshannam commented Jan 22, 2026 via email

@jgclark
Copy link
Collaborator

jgclark commented Jan 23, 2026

Apologies for the delay. I was about to action this when without warning the NP dev released the biggest change to the environment for plugins in 2 years. Experience meant that the two main plugin devs had to focus on testing and working with Eduard to sort out the inevitable issues straight away. Particularly as users started asking for us to support the change in the main plugins. And the plugin devs are simply volunteers, and between us we run 3 charities and 1 business.

@jgclark
Copy link
Collaborator

jgclark commented Jan 23, 2026

So I can now return to GraphNote. The NP changes in v3.20.1 around support for "mainWindow" running for plugin windows and plugin installation methods will mean further changes, sorry. I think they're worth making even before first release, as I know the first piece of feedback will be "can you support running in the main window?".

I commented before that you've submitted just the script.js file, rather than more normal smaller code and module files using flow (or possibly typescript) typing, which are then rolled-up and built into a release package. If you'd delivered it in this way, then I would just make the relatively minor changes to support main window myself, and then show you what I'd done.

I really hoped to release this today, but looking at the code again, I'm not comfortable in updating this single large file, particularly without my usual tooling for roll-up and type checking.

There are also some significant provided helper functions to make it easier to work with the HTMLView APIs that I've developed over the years, and updated in the last 3 weeks. Specifically in helpers/HTMLView.js function showHTMLV2(). From its jsdoc it:

  • Automatically provides the user's current NP theme through a complex them-to-CSS translation process.
  • Most data comes via an opts object, to ease future expansion.
  • Supports running as "main window" (i.e. in Editor) on all platforms, as modal windows on all platforms, and as floating windows on macOS.
  • Adds ability to automatically display floating windows at the last position and size that the user had left them at.

To be clear, you don't have to do all of this, but it will mean that you won't get some of the gradual improvements from updated helper functions over time.

So, back to you. How you would like to proceed?

@jgclark
Copy link
Collaborator

jgclark commented Jan 23, 2026

And, if you're not already on the NP Discord, please join it, and then say hi in the plugin-dev channel. There's been extensive discussion of all this between the NP dev and the plugin devs about window management, which you've missed out on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants