• Resolved Nick

    (@nickchomey)


    I can’t tell you how thrilled I am to find this. About 6 years ago I spent 6-9 months trying to figure out how to create something like this with d3js, and only succeeded in a very clunky way before abandoning it.

    However, I notice a couple initial bugs with Post Network.

    Upon first installation, when I go to the Visualize tab, it just shows a spinner and generates these php notices:

    Notice: Trying to access array offset on value of type bool in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 134
    
    Notice: Trying to access array offset on value of type bool in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 294
    
    Notice: Trying to access array offset on value of type bool in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 296
    
    Notice: Trying to access array offset on value of type bool in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 294
    
    Notice: Trying to access array offset on value of type bool in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 296
    
    Notice: Trying to access array offset on value of type bool in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 294
    
    Notice: Trying to access array offset on value of type bool in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 296
    
    Notice: Undefined variable: to_post_ids in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 169
    
    Warning: Invalid argument supplied for foreach() in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 169

    If I go to the settings page and set the checkmarks and click save, then all of those notices go away except for these two, and the graph still just shows a spinner:

    Notice: Undefined variable: to_post_ids in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 169
    
    Warning: Invalid argument supplied for foreach() in /home/xyz.com/public_html/wp-content/plugins/post-network/includes/admin.php on line 169

    This is because I only have a few posts and zero links between them.

    So, I think it would be useful to

    1. register the plugin option on first install with update_option()
    2. add some checks to be able to handle and display posts with zero links.

    Finally, I have been thinking about a plugin like this for 6-9 nears, so I have a ton of ideas for improvement. However, there are a few main things that I’d want to know before bothering to write it all out:

    1. would you consider adding functionality to display this graph in the front-end, perhaps via shortcode?
    2. would you consider making it filterable, such that when you are viewing a post, the graph will center on that post and show its linked posts?
    3. would you consider adding tooltips that show up when you click on a node, which can display things like the name of the post, link to it, featured image, etc…. And perhaps if you double click on the node, it navigates to that post?

    These are features that are crucial to what I’d want to see, and I think it would make it extremely useful to many people! If you are interested in the above few ideas, then I’ll be happy to share the rest of my ideas as well as help contribute to the development of the plugin!

    Thanks very much!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Nick

    (@nickchomey)

    One other question: did you give any consideration to using d3js instead of vis.js? It seems to me that d3 is the gold standard for these tools, and therefore has far more power and flexibility, considerably more learning resources, snippets etc…

    Would you consider switching to it before moving too far forward with vis.js? Or are there particular reasons that you chose vis.js instead?

    Thanks!

    Plugin Author Naoto Onodera

    (@naotoonodera)

    Hi @nickchomey

    I am so glad you like the plugin.
    Thank you also for the bug report. I will test it and will fix it in the next release.

    Thank you also for your great ideas about the plugin.
    I wish I could implement everything, but I am concerned that the more advanced it gets, the higher the risk of bugs in the plugin and the more man-hours it takes to administer.

    So for now, I am developing with the theme of “simple”.
    Nevertheless, ideas are always welcome.

    By the way, I have a question about your idea.

    1. what kind of use do you envision for the front-end graph display function?
    2. Am I correct in my understanding that you want the graph to appear on the edit screen of every post?
    3. Even with the current functionality, clicking on a node will jump to the corresponding line in the graph displayed below, with editing links, etc. Why do you want tooltips?

    Finally, as to why I chose vis.js, I considered several other libraries besides vis.js, including d3js at the beginning of the development.
    I chose vis.js for the following three reasons.
    ?Ease of use
    ?The simplicity of the javascript code that needs to be output
    ?The fact that the results were closest to what I was looking for, including physics simulations.

    Best regards

    Thread Starter Nick

    (@nickchomey)

    Thanks for the thoughtful reply! I completely understand your position. Don’t worry about my ideas – I have been looking at various js libraries since I wrote this and agree about visjs. It is one of few that seem to still be active (though it hasn’t had much activity in the past year), but it’s easier to use than cytoscape and D3. So, I’ll figure out how to build what I need on top of Post Network – hopefully you’ll be willing to add some hooks where requested!

    But if you’re curious about what I’m aiming for, here is one of many videos about the notetaking software, obsidian.md. Particularly around 6:20.

    Thanks again for creating this! You have no idea how helpful and encouraging it has been to me!

    Plugin Author Naoto Onodera

    (@naotoonodera)

    @nickchomey

    However, this is not limited to vis.js, but I am trying not to be too dependent on vis.js in case vis.js development stops in the future.

    Also, I understand about adding hooks.
    Please let me know where you would like to add so I can consider adding it.

    I have also watched the video. And I was able to somewhat visualize what you are looking for.

    Thread Starter Nick

    (@nickchomey)

    Yes, I am somewhat concerned that visjs development will end. It really has not had much attention in the past year. But, it is quite functional already and easy to use so hopefully it will continue to work for a while! Would you mind sharing the names of some of the other libraries that you considered using/would consider using in the future?

    I have been doing a bit of my development and added some hooks and made other small improvements. Is Post Network on Github, or somewhere else that is easy to contribute to? If so, I can submit some edits when I’m ready.

    Plugin Author Naoto Onodera

    (@naotoonodera)

    @nickchomey

    The final libraries I was considering were…

    D3.js
    Cytoscape.js
    cola.js
    vis.js

    And as a result, I chose vis.js as you know.

    I have made the Github repository open to the public, so please send your requests here.

    https://github.com/naotoonodera/post-network

    Thread Starter Nick

    (@nickchomey)

    Thanks! Yeah, I found those libraries to be the most attractive ones as well (gojs is another), and agree that visjs seems to be the simplest despite having inferior documentation and examples. It also has some nice features that the others don’t have, like Clustering.

    As it turns out, I’ve already forked and heavily modified Post Network such that it is completely different (focused on the front-end and dynamic population of nodes/edges based on the page being viewed and other user actions). I’m sure it is not coded well and is still a work-in-progress, but it works for me so far.

    But despite having a different plugin now, I’ll be happy to submit a pull request anyway to add some small improvements that should make it easy for others to make basic modifications to Post Network (hooks to change the graph config options, add extra nodes/edges, etc…). I will also continue to monitor updates to Post Network and make suggestions/contributions where appropriate.

    Thanks again for this. It really has been enormously useful to me!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Some feedback for your amazing plugin!’ is closed to new replies.