Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plugin: Graph Link Types #2914

Merged
merged 4 commits into from Feb 26, 2024
Merged

Conversation

natefrisch01
Copy link
Contributor

@natefrisch01 natefrisch01 commented Jan 10, 2024

I am submitting a new Community Plugin

Repo URL

Link to my plugin: https://github.com/natefrisch01/Graph-Link-Types

Release Checklist

  • I have tested the plugin on
    • Windows
    • macOS
    • Linux
    • Android (if applicable)
    • iOS (if applicable)
  • My GitHub release contains all required files
    • main.js
    • manifest.json
    • styles.css (optional)
  • GitHub release name matches the exact version number specified in my manifest.json (Note: Use the exact version number, don't include a prefix v)
  • The id in my manifest.json matches the id in the community-plugins.json file.
  • My README.md describes the plugin's purpose and provides clear usage instructions.
  • I have read the developer policies at https://docs.obsidian.md/Developer+policies, and have assessed my plugins's adherence to these policies.
  • I have read the tips in https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines and have self-reviewed my plugin to avoid these common pitfalls.
  • I have added a license in the LICENSE file.
  • My project respects and is compatible with the original license of any code from other plugins that I'm using.
    I have given proper attribution to these other projects in my README.md.

@github-actions github-actions bot changed the title Add Plugin: Graph Link Types Add plugin: Graph Link Types Jan 10, 2024
@natefrisch01 natefrisch01 changed the title Add plugin: Graph Link Types Add Plugin: Graph Link Types Jan 10, 2024
@natefrisch01 natefrisch01 changed the title Add Plugin: Graph Link Types Add plugin: Graph Link Types Jan 10, 2024
@natefrisch01
Copy link
Contributor Author

"Remember to add a comma after the closing brace, }, of the previous entry." from https://docs.obsidian.md/Plugins/Releasing/Submit+your+plugin lead to the automated check failing, so I removed the comma.

@natefrisch01
Copy link
Contributor Author

@joethei when you do end up taking a look at this, let me know if you have any suggestions for improvement! Working with Obsidian's graph-view seems to requires some pretty hacky solutions, but I did my best to make them safe by adding interfaces, waiting after a layout change to look for the renderer, etc. But perhaps you have some tricks to make it as reliable as possible - thanks for your time!

@joethei
Copy link
Collaborator

joethei commented Jan 29, 2024

You should move all code files into a separate src folder, that makes it easier to review and maintain.

"description": "Link types for Obsidian graph view.",
You don't need to mention Obsidian here.

console.error("Dataview plugin is not available.");
This should also be shown in a notice to the user, not many users will open the console to read the error message (and on mobile it's more complicated to open it)

As for your issue with windows, you need to listen to the window-open event.

@joethei joethei added Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made and removed Ready for review labels Jan 29, 2024
@natefrisch01
Copy link
Contributor Author

Sweet, thanks for taking a look! I'll check out the window event, regroup the code into to a source folder, and change that description.

@natefrisch01
Copy link
Contributor Author

natefrisch01 commented Jan 29, 2024

@joethei All fixes (window event, regroup the code into to a source folder, new notice, and change description) are present in new release 0.2.4 Thanks!

@ObsidianReviewBot ObsidianReviewBot added Ready for review and removed Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made labels Jan 30, 2024
@liamcain
Copy link
Collaborator

liamcain commented Feb 26, 2024

To use the Graph Link Types plugin, ensure the Dataview plugin is installed in Obsidian

I don't see why this plugin requires dataview. You should also listen for the metadata change events built-in to Obsidian so that it can Natively support properties and not require DV.

  • fontFamily: 'Arial', you should pull this out of the css var var(--font-default) so that it matches the rest of the API

@liamcain liamcain merged commit 011e792 into obsidianmd:master Feb 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants