felixhayashi / TW5-TiddlyMap

Map drawing and topic visualization for your wiki

Home Page:http://tiddlymap.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable hierarchical layouts issues if other layout loaded first

gtothill opened this issue · comments

Hi Felix,
I feel bad about raising an issue so soon after you incorporated the hierarchical layout feature but I think I may have found a bug and I wanted to point it out in case it affected others or had any impact on core functionality elsewhere.

I do not have the coding expertise to delve into a probable cause but I have tried to isolate the problem and I can certainly recreate it consistently as follows:

Observed behavior:

  1. If the wiki is opened with Live view as the default view all works as expected. nodes are hierarchical, obey positioning rules, track nodes in the story river and reset if home is selected to open only the root (home) tiddler. This is very cool and just what I envisaged.
  2. If the default view is opened at any time (either because it is the default view or at any time after the initial load), hierarchical behavior fails. Orphaned nodes appear as the algorithm (node tree) is traversed, edges are missing from some of the stages and the map does not reset when the home is selected.

Expected behavior:

  1. The behavior seen in 1) above (correct graph display when no other views are loaded), should be reproduced even after another view (i.e. the default view) has been opened first.

Steps to debug:

  1. Created a new wiki and imported clean versions of all plugins. 2) No additional plugins. 3) Built new decision tree. 4) Applied reasonable hierarchical settings. 5) Loaded Live view first and tested. 6) Loaded default view followed by Live view and tested.

Hope this helps and sorry to have to raise a bug after all your hard work. Let me know if there is anything that I can do to research this at this stage.

All the best,

Geoff.

Hi Geoff,

really nothing wrong about raising a follow up issue 🙂

If the default view is opened at any time (either because it is the default view or at any time after the initial load), hierarchical behavior fails. Orphaned nodes appear as the algorithm (node tree) is traversed, edges are missing from some of the stages and the map does not reset when the home is selected.

Although your problem description is structured and clear, It is still a bit difficult to understand for me what you are visually experiencing without any screenshots.

In the comment (#346 (comment)) to the previously closed ticket I wrote

Tracing can also be enabled for the "live view", however in your case I suggest that you create dedicated maps for your decision trees.

The reason I wrote this is that with the live view you have less control over what is rendered since it simply picks up those tiddlers that gained focus in TiddlyWiki's "story river". With the new "tracing" mechanism enabled, this can lead to disconnected trees (what you described as "orphaned" nodes, I assume) since these nodes where scrolled into focus (thus are captured in the "live view") but do not have a connection to previously traced nodes in the "live view", it may look something like this:

Selection_016

(here I visited "Getting started" and then switched to "Using Map as a Raster" by navigating in the story river resulting in two disconnected trees.

If you instead created dedicated maps for your decision trees (as I showcased in the videos; checkout the view "Decision Tree" at http://tiddlymap.org) you would not experience this "orphan node" behaviour since you reached all nodes within the map via clicks thus guaranteeing those nodes being connected.

Anyhow, if you still want to stick with the "live view", then some thing I can definitly do is that when a user clicks on TiddlyWiki's "Home Button", I can listen to this event and also reset the live view. So far, this "reset" has to be done manually by clicking on the "restart" button in the tracing menu (see uploaded video link below). Would this fix be fine for you?

Apart from this, can you please watch the video I uploaded here https://youtu.be/X2YqNjKRrQM and confirm that the behaviour starting from second 27 (after I clicked "restart") to second 50 is matching your expected behaviour of the live view? Thanks.

Thanks Felix,

That was very helpful and I revisited your video and read your responses in more detail. I have conducted a few more tests and I am seeing a behavior that I did not expect, even in the absence of using a hierarchical graph view. Live view behaves differently depending on whether an another view has been loaded before.

I have produced an explanatory video that you can find here .

It may be that I'm just not setting the Wiki up properly and this is something that you have seen before.

Thanks for taking a look at it for me.

All the best,

Geoff.

Thanks Geoff for providing this video. It was very helpful in understanding how you actually use the story river in combination with the live view to create the "decision tree" experience for your Covit-19 decision tree.

This is indeed a bug that stems from my recent code additions. I think I can fix it fast.

Hi @gtothill, I just pushed a new version. Would you mind pulling the latest TiddlyMap version into the wiki referenced in your video to verify that the bug has been successfully resolved with this new release? Thanks.

If not, please do not hesitate to tell me.
Have a nice evening.

Hi @felixhayashi ,

Thanks for the new build. I'm afraid there still seem to be some remaining problems. I think these are related to the handling and saving of the neighborhood scope (and possibly other elements of tiddlymap settings).

I have provided a video describing this issue here.

Regards and, as ever, thanks,

Geoff.

Hi @gtothill

thanks again for your feedback. I tried to reproduce the behaviour you showcased by creating and uploading a separate demo wiki that matches your case – but for me everything seems to work correctly.

The demo is found here:
http://tiddlymap.org/decision-tree-demo.html

Here is a video how I am using the demo:
https://youtu.be/4OZHPeyfAQ4

However, I noticed that in your video in the live view you have the "tracing mode" active (it has a blue highlight color indicating it is active). When "tracing" is active, the behaviour with the "orphans" (e.g. occuring in minute 01:43 in your video where you you first visited "Have you also become breathless recently?" and then later "New call to COVID-19 symptom checker") is a valid behaviour.

Regarding the "saved changes button" being red, this issue is already tracked here (admittingly a bit hidden): #342

Hi @felixhayashi,

Thanks for your reply - you have sharp eyes!

Sorry to have distracted you with this last issue - I hadn't properly understood the effect of each part of the functionality that you have recently added. You are of course, quite right, the problems were completely caused by having tracing enabled. Properly setting that switch allowed the appropriate settings to be made in the map in question and it behaves as predicted.

Can I take a moment to thank you again for TiddlyMap and in particular for your recent work on hierarchical views. For me, this unlocks a huge amount of functionality. I have been able to produce algorithms with this solution that are intuitive and elegant and that is very much appreciated.

Kind regards,

Geoff.

Ah, that's great news 🙂

Thanks for your kind words. I am glad to hear that you can make good use of the tool – especially in the medical sector. Admittedly, TiddlyMap has its limits and may not always cater to all needs, but, in combination with TiddlyWiki, it certainly helps to provide a good mix of visual- and textual-display of information.

All the best, and good luck with further work on the COVID-19 wiki-project!
Felix