Grouping / Collapsing functionality

7 views
Skip to first unread message

James K

unread,
Aug 28, 2009, 5:42:40 AM8/28/09
to WireIt
Recently I have been modifying the WireIt editor to support grouping/
collapsing of containers down into one composite container.

It is still very rough and the code isn't very nice at the moment but
I thought I'd try and get some feed back on it from a user point of
view and also to see if the WireIt community liked the idea and if it
was worth pursuing.

I have put a copy of it up at http://dev.lshift.net/james/wireit/

Eric Abouaf

unread,
Sep 1, 2009, 4:39:39 PM9/1/09
to wir...@googlegroups.com
Hi james,

Very nice work ! It definitly takles a major issue in the WiringEditor with great success.

The jsBox example was trying to solve the spaghetti issue by composing smaller graphs. It introduced the input/output containers to create a reusable FormContainer.
Your solution aims to produce an InOutContainer. (labeled inputs/outputs only)
It has the great advantage to work within the same Layer !

I think we should provide both as "plugins" for the WiringEditor.


Here are my remarks from a user perspective :
 * we could add a cmd+click handler to select the containers for grouping
 * a selection tool on the canvas can also be a very efficient way to group
 * we could add a tooltip where the mouse lastly clicked to form the group
 * add a "double click" handler to expand/collapse the group

From a developper perspective:
 * we could use an InOutContainers for collapsed groups (so you can see the labels)
 * Have you already tried it with the loading/saving capabilities of the WiringEditor ?
    Could you send a brief description of the json format it returns ?
 
Do you have a repository for this code ? (If not, you should fork the project on github)
I would be delighted to hit some bugs...

Thanks,
Eric
--
Eric Abouaf
eric....@gmail.com
Tél: 06 29 86 37 89

James K

unread,
Sep 2, 2009, 7:29:43 AM9/2/09
to WireIt
Hi,

Thanks for the reply.

Not entirely sure what you mean by a cmd+click handler (like ctrl
+click?) but other than that the user interface suggestions sound
good, I have actaully already started work on a selection tool.

Developer stuff:
I'm hoping the grouping/collapsing will be more general than just for
InOutContainers, it should currently work for form containers as well
(allowing you to keep fields from the grouped containers and show them
on the result).
I haven't given a full save/load a go yet but I think it should work.

About the JSON, the getValue function hasn't been modified so is the
same as FormContainer the getConfig function however has been
modified.
Since the fields and terminals of any one group container are variable
the field and terminal configurations are returned.
Also the "groupConfig" is returned, like WiringEditor.getValue it
contains the wires and the modules that are in the group. It also
contains a map from the external fields/terminals to the internal
ones, the position of the center of the group (so when you expanded
the containers can be placed relatively) and there is also
"serialised" version of the group object that was made into the
GroupContainer.
Not sure about going into the specifics of the JSON format at the
moment since they might changed relatively quickly

I have been working on a local git repository cloned from git hub a
while ago. I think to fork I'll have to merge in my changes to the
latest version? (not used GitHub before)
I don't have much time at the moment but I'll try and get that done
soonish.

James
> On Fri, Aug 28, 2009 at 11:42 AM, James K <ghostf...@googlemail.com> wrote:
>
> > Recently I have been modifying the WireIt editor to support grouping/
> > collapsing of containers down into one composite container.
>
> > It is still very rough and the code isn't very nice at the moment but
> > I thought I'd try and get some feed back on it from a user point of
> > view and also to see if the WireIt community liked the idea and if it
> > was worth pursuing.
>
> > I have put a copy of it up athttp://dev.lshift.net/james/wireit/
>
> --
> Eric Abouaf
> eric.abo...@gmail.com

James K

unread,
Sep 9, 2009, 12:48:26 PM9/9/09
to WireIt
I have now forked the wireit git hub repository
http://github.com/jamesk/wireit/

I think I did this the right way but if not please tell me (preferably
with instructions how to fix)

Eric Abouaf

unread,
Sep 14, 2009, 6:31:53 AM9/14/09
to wir...@googlegroups.com
It looks good, I see all the commits in the fork queue.

I will need some time to check everything since this is the biggest contribution so far, but please continue to push WireIt forward :)

Thanks
--
Eric Abouaf
eric....@gmail.com
Reply all
Reply to author
Forward
0 new messages