[tiddlyweb] Announcing: TiddlyWeb Bag Policy Editor

6 views
Skip to first unread message

jnthnlstr

unread,
Apr 26, 2010, 10:25:16 AM4/26/10
to TiddlyWeb
Hello,

I've made a little web app for editing TiddlyWeb bag policies.

Source: http://github.com/jayfresh/TiddlyWeb-Bag-Policy-Editor
Screenshot: http://img.skitch.com/20100426-eim7mht9r32duafi5pcix5q21y.jpg

It works as a standalone app in Firefox and Safari (and possible
others), but not Chrome (because of lack of cross-domain JavaScript
ability).

I'm hoping that this can be somehow folded into TiddlyRecon [1], and/
or other suitable apps. Please let me know if you want help with that
or want me to make this better.


J.

[1] http://github.com/FND/tiddlyrecon

--
You received this message because you are subscribed to the Google Groups "TiddlyWeb" group.
To post to this group, send email to tidd...@googlegroups.com.
To unsubscribe from this group, send email to tiddlyweb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlyweb?hl=en.

FND

unread,
Apr 26, 2010, 2:56:42 PM4/26/10
to tidd...@googlegroups.com
> I've made a little web app for editing TiddlyWeb bag policies.

Nice! This is exactly the sort of tool we need, and I'm very glad you
gave it a go.
I've been wanting to write similar tools (e.g. a recipe editor) myself,
but have yet to take it further than the widgets we did for TiddlyHoster
(in part because I'm aiming too high). Hopefully that will happen once
the TiddlySpace basics are in place.

It'd be grand if you could add some description of the constraints:
http://tiddlyweb.peermore.com/wiki/#constraint

UI-wise, I'm perfectly happy with the comma-delimited values in a simple
text field.
However, if you get bored, it might be interesting to have a list of
existing users (and, perhaps separately, roles) with checkboxes to
remove them from the policy, using input fields only for new additions.

Do you plan on extending this to support recipes?

I'm sure I'll have more input after a couple of weeks of actual usage.

> I'm hoping that this can be somehow folded into TiddlyRecon [1], and/
> or other suitable apps.

Do you mean TiddlyRecon (the web app) or tiddlywebplugins.console (the
TiddlyWeb vertical providing TiddlyRecon at /console)?
I could definitely imagine your app sitting at /console/policies. I'm
not too keen on tight integration with TiddlyRecon though, as I like
your "do one thing and do it well" approach.

What was your experience using chrjs? I'm keen to hear feedback while
we're still at version 0.x.
(Aside: TiddlyRecon still uses the old chrjs API - just in case anyone
looked at the code recently.)


-- F.

jnthnlstr

unread,
Apr 26, 2010, 3:15:02 PM4/26/10
to TiddlyWeb
Hi,

> Nice! This is exactly the sort of tool we need, and I'm very glad you
> gave it a go.

Thanks.

> It'd be grand if you could add some description of the constraints:http://tiddlyweb.peermore.com/wiki/#constraint

How do you imagine that working/looking?

>
> UI-wise, I'm perfectly happy with the comma-delimited values in a simple
> text field.
> However, if you get bored, it might be interesting to have a list of
> existing users (and, perhaps separately, roles) with checkboxes to
> remove them from the policy, using input fields only for new additions.

I will see how much of a pain comma-delimited is.

>
> Do you plan on extending this to support recipes?

Not really, as I don't use policies on recipes. Do you? Oh! Do you
mean supporting listing the bags in a recipe? That would be pretty
easy.

>
> > I'm hoping that this can be somehow folded into TiddlyRecon [1], and/
> > or other suitable apps.
>
> Do you mean TiddlyRecon (the web app) or tiddlywebplugins.console (the
> TiddlyWeb vertical providing TiddlyRecon at /console)?
>
> I could definitely imagine your app sitting at /console/policies. I'm
> not too keen on tight integration with TiddlyRecon though, as I like
> your "do one thing and do it well" approach.

I was imagining the TiddlyRecon app making use of policy editing, but
I concur with your viewpoint about doing one thing well. So let's
leave it out. I wonder if our WireIt policy editor would be useful
still...

>
> What was your experience using chrjs? I'm keen to hear feedback while
> we're still at version 0.x.

I liked it! I think a little bit of getting started documentation
wouldn't hurt, and the API is buried in the code.

> (Aside: TiddlyRecon still uses the old chrjs API - just in case anyone
> looked at the code recently.)

Yes, I was rather thrown by that... ;)


J.

FND

unread,
Apr 27, 2010, 4:07:57 AM4/27/10
to tidd...@googlegroups.com
>> It'd be grand if you could add some description of the constraints [...]
>
> How do you imagine that working/looking?

Just a short paragraph, between the respective input field and its label
perhaps? The text might simply be copied from the docs I'd linked to.

>> Do you plan on extending this to support recipes?
>
> Not really, as I don't use policies on recipes. Do you? Oh! Do you
> mean supporting listing the bags in a recipe? That would be pretty
> easy.

I was thinking of policies on recipes, as that seemed like a natural
extension of the concept...

> I wonder if our WireIt policy editor would be useful still...

Yes, that's one of the tools I'd hinted at before, sitting in the back
of my mind, nagging...

> I liked [chrjs]! I think a little bit of getting started documentation
> wouldn't hurt

Well, I struggled to come up with more than that demo page; not entirely
sure what else there is to explain, so I'm hoping for specific questions
to guide further documentation...

> the API is buried in the code.

Indeed. I chose to use the facilities JavaScript provides natively
rather than introducing some class-wrapper dependency. Unfortunately,
that makes the code look a little chaotic...

jnthnlstr

unread,
Apr 27, 2010, 8:32:46 AM4/27/10
to TiddlyWeb

> > I liked [chrjs]! I think a little bit of getting started documentation
> > wouldn't hurt
>
> Well, I struggled to come up with more than that demo page; not entirely
> sure what else there is to explain, so I'm hoping for specific questions
>   to guide further documentation...

Which demo page?

>
> > the API is buried in the code.
>
> Indeed. I chose to use the facilities JavaScript provides natively
> rather than introducing some class-wrapper dependency. Unfortunately,
> that makes the code look a little chaotic...

I liked your approach. I was thinking something like this:
http://pastebin.com/X3AmggxJ (can provide diff in a file too if you
want it).

> -- F.


J.

FND

unread,
Apr 27, 2010, 8:44:33 AM4/27/10
to tidd...@googlegroups.com
> Which demo page?

http://github.com/tiddlyweb/chrjs/blob/master/doc/demo.html
http://tiddlyweb.peermore.com/chrjs/demo.html

> I liked your approach. I was thinking something like this:
> http://pastebin.com/X3AmggxJ

Oh, so simply declaring the available classes? Some might call that
redundant bloat, but it would certainly improve readability, so it seems
like a good idea to me. Any other opinions?

Much appreciate this, Jon!


-- F.

jnthnlstr

unread,
Apr 30, 2010, 7:24:29 AM4/30/10
to TiddlyWeb


On Apr 27, 1:44 pm, FND <F...@gmx.net> wrote:
> > Which demo page?
>
> http://github.com/tiddlyweb/chrjs/blob/master/doc/demo.htmlhttp://tiddlyweb.peermore.com/chrjs/demo.html

Ah, yes, I had seen that before but forgotten about it - thanks, that
would have been helpful!

> > I liked your approach. I was thinking something like this:
> >http://pastebin.com/X3AmggxJ
>
> Oh, so simply declaring the available classes? Some might call that
> redundant bloat, but it would certainly improve readability, so it seems
> like a good idea to me. Any other opinions?

Having looked at the demo page, I think it would be good if the API
"spec" also indicated that certain operations were necessary to create
usable objects. For example, when you create a Tiddler, you also have
to set tiddler.bag before you can call .get.


J.

FND

unread,
May 4, 2010, 12:40:19 PM5/4/10
to tidd...@googlegroups.com
> I've been wanting to write similar tools (e.g. a recipe editor) myself

I couldn't let this stand, so made a start:
http://github.com/FND/tiddlywebadmin

Doesn't really do much yet (essentially just modifying bag/recipe
descriptions at this point), but provides a good framework for gradually
adding functionality (editing recipes, modifying policies*).

Further hijacking your thread, back to chrjs:

> Oh, so simply declaring the available classes? Some might call that
> redundant bloat, but it would certainly improve readability, so it
> seems like a good idea to me. Any other opinions?

Seems like nobody objects, so can you raise an issue for this - perhaps
even submit a pull request?

> Having looked at the demo page, I think it would be good if the API
> "spec" also indicated that certain operations were necessary to create
> usable objects. For example, when you create a Tiddler, you also have
> to set tiddler.bag before you can call .get.

That seems sensible. Can you raise an issue for this as well (otherwise
it will just rot in the depths of this thread)?


-- F.


* hopefully reusing your code to create an independent dialog widget

PMario

unread,
May 4, 2010, 3:31:52 PM5/4/10
to TiddlyWeb
hi

On May 4, 6:40 pm, FND <F...@gmx.net> wrote:
> > I've been wanting to write similar tools (e.g. a recipe editor) myself
>
> I couldn't let this stand, so made a start:
>      http://github.com/FND/tiddlywebadmin
>
> Doesn't really do much yet (essentially just modifying bag/recipe
> descriptions at this point), but provides a good framework for gradually
> adding functionality (editing recipes, modifying policies*).
I tryed it:
have a bag: TeamPubMp at http://hoster.peermore.com/bags/TeamPubMp/tiddlers.
It has a description allready. But it doesn't show up with the tool.

-m

FND

unread,
May 5, 2010, 12:35:46 AM5/5/10
to tidd...@googlegroups.com
> I tryed it:
> have a bag: TeamPubMp at http://hoster.peermore.com/bags/TeamPubMp/tiddlers.
> It has a description allready. But it doesn't show up with the tool.

Seems to work for me; set the host to http://hoster.peermore.com and
checked both my public bag and recipe (fnd.lewcid.org-public).
Of course I had to log into hoster first - perhaps that's the issue?
(I'm not authorized to check your TeamPubMp bag, so can't reproduce.)


-- F.

FND

unread,
May 5, 2010, 2:47:25 PM5/5/10
to tidd...@googlegroups.com
> http://github.com/FND/tiddlywebadmin
> Doesn't really do much yet (essentially just modifying bag/recipe
> descriptions at this point)

This now also allows editing recipes - crudely (simple textbox with a
"bag?filter" pair per line), but it's a start...

Future posts about this tool will get a separate thread.


-- F.

PMario

unread,
May 5, 2010, 3:27:03 PM5/5/10
to TiddlyWeb
hi
On May 5, 6:35 am, FND <F...@gmx.net> wrote:
> > I tryed it:
> > have a bag: TeamPubMp athttp://hoster.peermore.com/bags/TeamPubMp/tiddlers.
> > It has a description allready. But it doesn't show up with the tool.
>
> Seems to work for me; set the host tohttp://hoster.peermore.comand
> checked both my public bag and recipe (fnd.lewcid.org-public).
> Of course I had to log into hoster first - perhaps that's the issue?
> (I'm not authorized to check your TeamPubMp bag, so can't reproduce.)

This was the issue. had a look at firebug. There was a forbidden error
message.
A little feedback at the dialog would be cool :)

jnthnlstr

unread,
May 5, 2010, 4:37:05 PM5/5/10
to TiddlyWeb
I like that I can create new bags and recipes now, but what's supposed
to happen when you click on an existing bag/recipe? For me, it pops up
a "new x" dialog.

Is there a general set of use cases behind this app I could see?
Admin'ing TWeb is a pretty broad and totally useful thing, so I'd be
happy to add to your work.


J.

jnthnlstr

unread,
May 5, 2010, 4:39:33 PM5/5/10
to TiddlyWeb

>
> Further hijacking your thread, back to chrjs:
>
> > Oh, so simply declaring the available classes? Some might call that
> > redundant bloat, but it would certainly improve readability, so it
> > seems like a good idea to me. Any other opinions?
>
> Seems like nobody objects, so can you raise an issue for this - perhaps
> even submit a pull request?

Well, the PasteBin was a patch, so feel to apply it. :)

> > Having looked at the demo page, I think it would be good if the API
> > "spec" also indicated that certain operations were necessary to create
> > usable objects. For example, when you create a Tiddler, you also have
> > to set tiddler.bag before you can call .get.
>
> That seems sensible. Can you raise an issue for this as well (otherwise
> it will just rot in the depths of this thread)?

I'm not sure how this would work - are you aware of any libraries
where the object declarations (or whatever) have outlined what the
function paramaters are?

I know of http://datatables.net - that's got about a million comments
about how to use the functions. I don't know that I like that approach
because it requires maintenance and I'm lazy. On the other hand, it's
easy to read...


J.

FND

unread,
May 6, 2010, 6:14:27 AM5/6/10
to tidd...@googlegroups.com
> I like that I can create new bags and recipes now, but what's supposed
> to happen when you click on an existing bag/recipe?

It's supposed to load the bag/recipe and populate the form fields.

> For me, it pops up a "new x" dialog.

For me, the dialog was titled "Add {Bag,Recipe}".
Just committed a fix; should now read "{Bag,Recipe}: <name>".

> Is there a general set of use cases behind this app I could see?
> Admin'ing TWeb is a pretty broad and totally useful thing, so I'd be
> happy to add to your work.

The goal here is to provide a tool that makes it easier to create and
modify bags and recipes.

We've had a few instances (ambiguity intended) where people asked for
new bags/recipes, generally derived from an existing entity (e.g.
defining a group's standard policy). Setting this up is a bit fiddly
right now.
Imagine a hackday with various groups using TiddlyWeb to create content
or write applications. Or a company/team using TiddlyWeb as their CMS,
or whatever.

Long-term, it'd be nice to have a collection of reusable widgets
("chrjs-ui"?) which could be easily added to TiddlyWiki, TiddlyHoster,
TiddlyRecon, or any other application.

FND

unread,
May 7, 2010, 11:17:36 AM5/7/10
to tidd...@googlegroups.com
> Well, the PasteBin was a patch, so feel to apply it. :)

That's in my queue now. Will need to obsess a little more about the
phrasing.

>>> Having looked at the demo page, I think it would be good if the API
>>> "spec" also indicated that certain operations were necessary to create
>>> usable objects. [...]
>
> I'm not sure how this would work - are you aware of any libraries
> where the object declarations (or whatever) have outlined what the
> function paramaters are?

Well, I was just gonna write some text - something along the lines of
"Note that, while the bag argument is optional, the bag attribute is
required for server interaction" (hopefully less opaque).
Also see (the end of) this thread:
http://groups.google.com/group/tiddlywikidev/t/35b9c2ea5433c36b
Does that seem sensible?


-- F.

jnthnlstr

unread,
May 11, 2010, 6:45:36 AM5/11/10
to TiddlyWeb

>
> > I'm not sure how this would work - are you aware of any libraries
> > where the object declarations (or whatever) have outlined what the
> > function paramaters are?
>
> Well, I was just gonna write some text - something along the lines of
> "Note that, while the bag argument is optional, the bag attribute is
> required for server interaction" (hopefully less opaque).
> Also see (the end of) this thread:http://groups.google.com/group/tiddlywikidev/t/35b9c2ea5433c36b
> Does that seem sensible?

Your conclusion seemed to be "let's just do it", so if you do that,
I'll happily provide feedback. :)


J.
Reply all
Reply to author
Forward
0 new messages