hola

The problem with a hidden widget is that it cannot retrieve the current 
>> tiddlers title. 
>>
>
> Why? Most of the widgets does this.
>  
>

Hmm, I don't think so. You can only do this by passing <<currentTiddler>> 
as an argument to the widget and reading that argument later with 
getAttribute(). But this only works if the widget is inside a tiddlers body 
(text). If you create a widget in the tiddler's menu, you cannot get the 
current tiddler and pass it as an argument.   

>  
>
>>  
>> hehe well, I didnt even know that google drive has a quota. But I think 
>> you should not mind the quota. I mean it is more important to have high 
>> usability (ajax automatically started) instead of optimizing for a quota.
>>  
>>
>
> I agree with you. Actually this concern is only for the "for everyone to 
> use" version. When each user has their own GAS on server side this should 
> not be a problem at all.
>

Ah, i get it
 

>
> I feel like we are mixing things an ideas. Let me summarize what we have 
> been talking about so far:
>
>    1. The idea to get from the server all the tiddlers that are only 
>    available on the server. This means that tiddlers in both places are not 
>    included.
>
> this would mean to sync files to the client 

>
>    1. Automatically downloading a server tiddler when displayed. This 
>    deserves thinking about something: If the user has selected to import 
>    tiddlers via the importer, should we save this tiddlers silently or sow 
> the 
>    importer? Since this is not important at all and the tiddler does not 
> exist 
>    already maybe we can avoid the importer thing.
>
> Are you talking about the tw-import mechanism or your import mechanism?

>
>    1. Keeping the downloaded tiddlers automatically in sync with the 
>    server. We have not discussed about this, but your proposal below sounds 
>    like this.
>
>  
Yeah, I am thinking of synchroinzation alot. The point is, many ideas can 
be reused looking sync adapter stuff from tw in syncer.js 
(Syncer.prototype.syncFromServer and especially syncToServer). The process 
decides whether to update a tiddler by looking at the changecount and 
revision (readTiddlerInfo()). If you are not doing it already, try running 
tw on node.js and see how it syncs files when creating a tiddler in one 
browser and after one minute it will appear in the other browser window. 
Syncing is difficult though.

>
>    1. Upload the changed tiddlers at once on single button click. I feel 
>    like we have missed this part.
>
> see my answer later
 

>
>> Here is an idea how it could be implemented
>>
>>    1. When the wiki starts, your plugin loads a tiddler via ajax which 
>>    contains all the names of tiddlers in a json format (an array with all 
>>    names). You save this tiddler as $:/pluginpath/downloadedTiddlers
>>    
>> Actually I prefer to import those tiddlers as a barebones tiddler with 
> some basic information such the id on server side. If I keep them as a json 
> plugin-like tiddlers they will not be searchable. This "placeholder 
> tiddlers" could have a default text of: "This tiddler is being downloaded" 
> and a transclusion of a funny gif image.
>

yes, this is a good idea, however the drawback is you lose fulltext search 
and fields
 

>
>  2. Everytime during a refresh inside your widget's refresh function (or 
>> if you are in a startup module inside you change listener) you check if a 
>> tiddler has been changed that was also inside that list (use 
>> wiki.getTiddlerList() or for json stuff wiki.getTiddlerData()). if yes, you 
>> either upload it directly or save it into a new list tiddler and upload it 
>> later.
>
>
> This sounds like an idea for 3 (keep tiddlers in sync). I prefer to push 
> that tiddlers to an "upload later" list and upload them based on a timer 
> function or something like that. 
>

yes this is a good idea. maybe a button next to the normal save button that 
says (in a symbolic way) upload all changes now.
 

> Making it on every refresh can end with uploads on every keypress. I feel 
> like we have forget about 4 (upload changed tiddlers at once). 
>
 
>
The solution you described sounds like it only works on downloaded 
> tiddlers. Maybe we can hold two list? "Server tiddlers to upload", "user 
> changed tiddlers to upload". The first one could be uploaded every minute 
> while the second one on key-press. How does that sound?
>

Hmm, I thought about it and maybe this will create to much overhead. I 
think a compromise is to use one list and to update every tiddler on the 
server when the user has finished editing (not in draft state). An ajax 
request on every keystroke will be too much.

This is all very difficult :)
Felix

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to