SharedTiddlersPlugin prerelease (evolution of the IncludePlugin)

167 views
Skip to first unread message

Yakov

unread,
Sep 29, 2012, 8:19:35 PM9/29/12
to tiddly...@googlegroups.com
Hi,

at last I'm able to release the plugin I announced somewhat half a year ago: the descendant of the IncludePlugin named SharedTiddlersPlugin [1] (as it finally has an ok quality to publish).

For those who is not familiar with IncludePlugin [2] - this is all about fetching tiddlers from other TiddlyWiki to a TiddlyWiki document to view and use them (as for now, without editing them). But you can go straight to the documentation of the new plugin to learn about it.

This first released version (1.4) is oriented on more flexible fetching and using fetched tiddlers as parts of the theme and got the following major enhancments:
* possibility to include only some tiddlers from a TiddlyWiki (the set of tiddlers defined by filters)
* name conflicts handling system (priority system + notifications), which allows, for instance, include PageTemplate so that it "substites" the one in the main document, be it shadowed or not
* autorefresh to get included parts of theme applied at once
* extended documentation in one tabbed tiddler (SharedTiddlersPluginInfo)
----------------
The plugin still has some quality issues, namely:
* as a "quickfix" for some unexplored bug, "missing" and "orhpans" lists don't account included tiddlers
* including from web doesn't work in a local TiddlyWiki -- in current browsers (like FF 15, Opera 12 or Safari 5) it doesn't even in IncludePlugin. Both use loadRemoteFile function (is deprecated, I know, but the recomendation in [3] doesn't change anything).
* also, the code can be made more tidy

It would be nice if you take a look at the plugin, its documentation and licence and share you thoughts (especially about the licence as I'm new to this things). It would be extra nice if suggest a clue for the loadRemoteFile problem.

@Jeremy
Finally, TW has problems with saving (and other permissions) in FireFox 15; while TiddlyFox solves the saving problem, it doesn't help with including which is forbidden. So Jeremy, please, if you have some time, try to fix this (is there a thread for feedback on TiddlyFox? I have two more important suggestions).
 
After some of this is solved, I'll make a "release" in the TiddlyWiki group.

There are, of'course, many plans to improve and extend the plugin, but I have to start sharing it at some point, I think.

Best regards,
Yakov.

PMario

unread,
Sep 30, 2012, 2:12:50 PM9/30/12
to TiddlyWikiDev
I didn't read the IncludePlugin source so I don't know, how exactly
file reading is done. But if it is based on "extended functionalities"
mentioned in the "mozilla bug report"[1] even manually granted access
will be removed with FF17. Functions like this have been depricated
since "Firefox 7 see: [1] comment 79"

Using the TiddlyFox mechanism may be an option but you'll neet to test
it with a FF nightly build to test with FF17

have fun!
mario

[1] (read the whole stuff, even if it is long)
https://bugzilla.mozilla.org/show_bug.cgi?id=546848

Yakov

unread,
Oct 3, 2012, 8:24:23 PM10/3/12
to tiddly...@googlegroups.com
Hi Mario,

> I didn't read the IncludePlugin source so I don't know, how exactly 
> file reading is done. 

like I said, file reading is done via loadRemoteFile [1] which uses httpReq [2] which, in turn, uses jQuery.ajax. I don't know what permissions it needs, but as the plugin doesn't work in FF 15, I guess this is because of those permissions. Hm.. I should test this in TW 2.6.6 though, as jQuery was updated there; but what I'm wondering about is that jQuery would hardly use the enablePrivilege() FireFox-specific things to implement a function that works in other browsers without it.

>  [1] (read the whole stuff, even if it is long)

I must admit, that wasn't a good suggestion. I spent several hours and the only conclusion I made is that yes, enablePrivilege() is going to be removed in FF 17, but Stephen Gallagher suggested delaying it to FF 18. And in the last  (for now, #117)  comment Florian Bender linked another "bug report" which suggest some solution [3] which is rather irrelevant for TW. Also, this reading is quite tiring, as the whole thing is close to flame :)

So, unless the problem of SharedTIddlersPlugin in FF 15 is not connected with enablePrivilege(), TiddlyFox is the only hope. Although, speaking about FF for desktop, TiddlySaver.jar could be a solution, couldn't it?

***

Any suggestions regarding the licence of STP?

Best regards,
Yakov.

Yakov

unread,
Nov 22, 2012, 3:14:35 PM11/22/12
to tiddly...@googlegroups.com
All right, gentlemen (and ladies),

first, I'd like to appologize to Mario if I sounded rude, my bad.

And next, here's a new version of the plugin, with some new minor and major features and improvements [1]. Currently, I'm introducing the shared-customizations-system to TWs on my Android device, so some things that weren't actually working before (like applying included PageTemplate) work now. There are two new tools as well: the wikifyIncluded macro and the ImporteIncluded shadow which can be useful for plugins and other things. Also, I found that many plugins can be turned into evaluated transclusions rather easily (but with some precautions), so things like RearrangeTiddlersPlugin can be easily shared between wikis (will add this to the docs later).

The only two things (besides plugins) that are not applied when shared are ViewTemplate (currently, have no idea how to deal with it as simple refreshing of tiddlers by the macros.include.handler induces an infinite loop once a tiddler with the macro is displayed) and ToolbarCommands (is not applied to tiddlers, even to those opened anew). Including from web doesn't work yet, but as it's not my prime purpose, I'll look into it when I have some extra time.

Some questions.

* What does the SiteUrl tiddler do? What difference does it make if I set a url in there?

* A coding quesion: can anyone suggest a neat way to process a parameter of a macro which can be written as both

   hide

and

   hide:true

(the second approach is kept for backward compability, but I'd rather use the first one).

* And finally, does anyone feel that the documentation is rather complicated?

I think I'll post this or the next release in the TiddlyWiki group soon.

Yakov

unread,
Dec 15, 2012, 5:50:29 PM12/15/12
to tiddly...@googlegroups.com
Ok, the discussion moves to the TiddlyWiki group [1], version 1.4.4 released (now all the parts of themes work).

Reply all
Reply to author
Forward
0 new messages