felixhayashi / TW5-TiddlyMap

Map drawing and topic visualization for your wiki
http://tiddlymap.org
BSD 2-Clause "Simplified" License
846 stars 127 forks source link

Issue opening in new window: Mobile mode should be smarter #180

Open danielo515 opened 8 years ago

danielo515 commented 8 years ago

Hello Felix,

Finally I'm using tiddlymap in my daily work, but it is a bit uncomfortable to use. My sidebar is very tiny, and every time I want to use the map, I have to open it in full-scren mode. Today an idea came to my mind:

Hey!, tiddlywiki has a cool new feature: open in new window. What if I open the map in a new window? That way I can continue working with my wiki, while I have the map in a big cool window.

This is what I got:

image

As you can see, not a small window, neither a mobile phone. This is not the first time mobile mode disturbs me. I like to use my windows in half screen mode, and tiddlymap detects is as a "mobile" device.

Could you please try to fix this? I think it would be a cool idea tho make a show up video of this feature, opening the map editor in a separate window.

Regards

felixhayashi commented 8 years ago

Hi @danielo515

Finally I'm using tiddlymap in my daily work,

That is great!

My sidebar is very tiny, and every time I want to use the map, I have to open it in full-scren mode.

Yes, with a small sidebar TiddlyMap is not nice to work with. I agree.

Hey!, tiddlywiki has a cool new feature: open in new window. What if I open the map in a new window? That way I can continue working with my wiki, while I have the map in a big cool window.

Opening in a new window is indeed a very nice idea! I think I will use this feature somehow for TiddlyMap. I created an issue for this: #181

Could you please try to fix this?

Sorry Danielo, but I did really understand the exact problem. You mean that the screenshot shows an empty map? Or do you mean that the editor is not displayed in mobile mode?

danielo515 commented 8 years ago

Hello @felixhayashi

Sorry Danielo, but I did really understand the exact problem. You mean that the screenshot shows an empty map?

My complain is that I see an empty map. I don't understand the problem. If I open the tiddler http://tiddlymap.org/#%24%3A%2Fplugins%2Ffelixhayashi%2Ftiddlymap%2Fhook%2Feditor on tiddlymap.org it works fine. But if I open it on my personal wiki I see nothing. Maybe it's because node?

danielo515 commented 8 years ago

I just checked with latest tiddlymap version and the issue remains. Maybe the problem is tiddlywiki version? 5.1.9

danielo515 commented 8 years ago

Tiddlywiki version is not the problem neither. I have tested with 5.1.10

I think it is just that Tiddlymap refuses to work with my work wiki. This has been happening since very early versions of TW.

To be more concise on the problem, the map is displayed for one or two seconds, and then disappears.

Regards

felixhayashi commented 8 years ago

Hi @danielo515

I think it is just that Tiddlymap refuses to work with my work wiki. This has been happening since very early versions of TW.

To be more concise on the problem, the map is displayed for one or two seconds, and then disappears.

super strange!

Maybe it's because node?

I tested it in node, works fine in all my private wikis…

I think it is just that Tiddlymap refuses to work with my work wiki. This has been happening since very early versions of TW.

  1. Maybe you can go to "TiddlyMap configuration" and enable debug output.
  2. open the browser console.
  3. Then clear all debug output
  4. Then open the editor in a new window.
  5. paste the output here.

Otherwise it is hard to debug because it works everywhere I tested it.

danielo515 commented 8 years ago

Hello @felixhayashi

I have attached the log output.... Thank you very much for your help

Not, not possible to attach a file. May I send it to you by email?

felixhayashi commented 8 years ago

@danielo515

May I send it to you by email?

sure, that's fine. But I think you can drop a simple text file into the comment textfield of this issue or not? Whatever suits you the best ;)

danielo515 commented 8 years ago

Sadly Github does not allow me to attach a file unless I have write permissions. This does not happen with images.

Anyway, here is the file

=== Refresh 110 ===
Tiddler modified: $:/state/popup/more--1933829136 $tw.Tiddler {fields: Object}
timer: Caretaker handling changes: 2.633ms
@MAIN_EDITOR Retrieving or generating the view holder reference
@MAIN_EDITOR Using default (global) view holder
Full reload of view config
@MAIN_EDITOR Retrieved view "Tables" from holder "$:/plugins/felixhayashi/tiddlymap/misc/defaultViewHolder"
@MAIN_EDITOR Initializing and rendering the graph
A callback was registered for changes of "$:/state/sidebar"
@MAIN_EDITOR Loaded graph options Object {locale: "en_EN", clickToUse: false, autoResize: false, height: "100%", width: "100%"…}
@MAIN_EDITOR Rebuilding graph
timer: Creating adjacency list: 1936.788ms
timer: Get neighbours: 2160.146ms
timer: Assembling Graph: 2417.878ms
timer: Reloading Network: 2439.438ms
@MAIN_EDITOR Registering refresh trigger []
=== Refresh 111 ===
Tiddler deleted: $:/state/popup/more--1933829136
Tiddler modified: $:/temp/tmap/nodes/Tables $tw.Tiddler {fields: Object}
timer: Caretaker handling changes: 2.268ms
A graph has been removed.
syncer-browser: Retrieving skinny tiddler list
felixhayashi commented 8 years ago

Hmm this last "A graph has been removed." is only called by the caretaker (TiddlyMap's background daemon) when map widget is not part of the dom anymore! But I tested it with chrome and firefox and all my wikis and it works everywhere. What I will do is I will add some more debug messages to the next version of tiddlymap, maybe we can find the problem this way. Could you please also paste the widget code (<$tiddlymap…) you use in the tiddler that you open in the new window?

danielo515 commented 8 years ago

Hello @felixhayashi

Thank you for your dedication on this matter.

The widget I am using is just a transclusion of the sidebar map.

Regards

felixhayashi commented 8 years ago

Hola @danielo515

could you please try to use the editor in your tiddler without transclusion like this and see if it works?

<$tiddlymap editor="advanced" click-to-use="false"></$tiddlymap>

In any case using this code is better than transclusion of the sidebar editor. Transclusion is problematic here because the widget will possess the same tiddlymap object id as the sidebar editor which confuses tiddlymap.

-Felix