These are chat archives for symfony2admingenerator/GeneratorBundle

19th
Nov 2014
ioleo
@ioleo
Nov 19 2014 13:47
@sescandell I'm merging feat-excel branch. It's just a few CS fixes and format method for each column (no BC breaks), so I decided not to wait for a review..
Cayetano Soriano
@neoshadybeat
Nov 19 2014 14:13
Where is that pull-request?
ioleo
@ioleo
Nov 19 2014 14:15
in the new-unstable repository symfony2admingenerator/GeneratorBundle#39
to renamed the packagist project, we had to create new repositories
becouse packagist does not allow 2 project names pointing to the same github repo
so, we have "cedriclombardot/admingenerator-generator-bundle" for legacy users, pointing to AdmingeneratorGeneratorBundle (old, stable repo)
and "symfony2admingenerator/generator-bundle" poiniting to GeneratorBundle (new, unstable repo)
the new unstable repo is based on the TwitterBootstrap3 branch of old repo
Serg N. Kalachev
@ksn135
Nov 19 2014 15:18
@loostro Can I use GeneratorBundle (new, unstable repo) for production ? Is some stable tag, branch or something else ? Or better I should wait for release ?
ioleo
@ioleo
Nov 19 2014 15:19
It has v2.0-beta.22 pre-release tag. It's quite stable, at least for DoctrineORM. I use it myself in production.
However, I do not use / don't know if they also work / the DoctrineODM and Propel
Also, i don't use NestedList (which is, incomplete or bugged - for example, the filters and scopes were never implemented there).
But the same goes for NestedList in old-legacy repo...
Also note, that the "new unstable" is there for a reason. We might introduce some BC breaks (eg. maybe we remove nested list or completely re-write it).
On the other side - some "fixes" are not pushed to old-legacy repo. So it soon will be much behind the new-unstable repo.
ioleo
@ioleo
Nov 19 2014 15:24
If you're starting a new project, you may consider new-unstable. But if you have a project on old-legacy - the "upgrade" may cause some errors.. especially if you have many "customizations" that rely on codebase --> if the codebase changed you may need to update your customizations too.
In such case, it may be safer/easier to stay with the old repo.
Serg N. Kalachev
@ksn135
Nov 19 2014 15:26
No, it's fresh, completely new project. I plan to implement exactly NestedList, so, if I could fix smth I'll send PR.
what's valid version number to specify in composer.json related to v2.0-beta.22 pre-release ?
ioleo
@ioleo
Nov 19 2014 15:32
The nested list has a few problems:
1) the javascript library used for display -- I found it 2 years ago and "customized" a little.. but it's far from being easy to use (i would probably have problems right now editing that old code)
probably there is a better Tree display plugin right now
2) it relies on Gedmo\NestedTree for DoctrineORM to get the behaviour
its never been tested on Propel/DoctrineODM at least not by me
3) since you cannot "move" one "tree root" node into another tree - there was a hack introduced --> there was one "hidden" root, which contained all other nodes
this hack should be removed instead, the JS widget should display "cannot move node between diffrent trees" when such action is attempted
4) how to handle Sorting/ Scopes/ Filters? currenlty they don't work.. if they should be fixed... then how? do we "filter/look for" only leaf nodes?
you can composer require symfony2admingenerator/generator-bundle v2.0-beta.22
it's a valid tag, just like normal tags
note: new repo is under symfony2admingenerator/generator-bundle, while the old was cedriclombardot/admingenerator-generator-bundle
@ksn135 PR's are always very welcome :) if you plan to work on this please note, that this feature probably requires complete re-write, if you have any questions I am avaliable here on chat/in github issues
Serg N. Kalachev
@ksn135
Nov 19 2014 15:47
Ok, I'll try. Let me take a look around an we'll discuss it later. For my purpose I really need a very basic support for hierarchy (parent – children) via materialised path. It's not a highest priority for my clients to move tree nodes between branches interactively throw ajax requests. It's just simple list for now, but who knows... :smile:
ioleo
@ioleo
Nov 19 2014 15:48
Well.. maybe moveing nodes should not be handled by Admingenerator?
Maybe the "default" (out-of-the-box) behaviour should be just a nested-table with expand/collapse children?
Serg N. Kalachev
@ksn135
Nov 19 2014 15:50
Some person click on edit link, open form, change parent node via select tag and save it
:+1:
ioleo
@ioleo
Nov 19 2014 15:51
This is open for discussion. You are the first person that I know of useing the nested list (nobody created issues or questions about it in last 2 years).
Serg N. Kalachev
@ksn135
Nov 19 2014 15:51
Filters – yes! Scopes – I don't know.
ioleo
@ioleo
Nov 19 2014 15:52
How do you imagine filters?
Serg N. Kalachev
@ksn135
Nov 19 2014 15:52
hmmm... by parent, no?
or by substring in title ?
ioleo
@ioleo
Nov 19 2014 15:53

say, we have a tree of categories/subcategories

each category has name, parent, children, (.. other fields)

if we filter by name "Abc"
Serg N. Kalachev
@ksn135
Nov 19 2014 15:54
found one item on level 3, and show all his parents (fray, maybe)
*gray color
ioleo
@ioleo
Nov 19 2014 15:54
and we have this data:
- xyz (root)
   - abc (level 1)
      - zzz (level 2)
   - def (level 1)
what do we show?
xyz + abc ?
xyz + abc + def ?
Serg N. Kalachev
@ksn135
Nov 19 2014 15:55
search query 'zz' -- (xyz), (abc), zzz
xyz and abc may be grayed out
ioleo
@ioleo
Nov 19 2014 15:56
OK, thats some idea. So we show all items matching the query.. and their parents greyed out.
About scopes -> scopes are just predefined sets of filters. So if we can do filters -> we can also do scopes.
Serg N. Kalachev
@ksn135
Nov 19 2014 15:57
same work for OneToMany relations. We have goods and categories. search by name for goods, and display it category and all parents with plus sign to open/close row with all children
well
may be you right
ioleo
@ioleo
Nov 19 2014 15:58
Now.. what about sorting?
if we sort ASC by name
Serg N. Kalachev
@ksn135
Nov 19 2014 15:59
but from our example i can't imagine predefined scopes for goods with categories
price, may be...
ioleo
@ioleo
Nov 19 2014 15:59
what would we display for our example?
Serg N. Kalachev
@ksn135
Nov 19 2014 15:59
multi sort inside each parent
ioleo
@ioleo
Nov 19 2014 15:59
I can imagine a custom scope "hasChildren / doesNotHaveChildren"
or "is Member of "animals" tree" / "is member of any other tree (but not animals) "
Serg N. Kalachev
@ksn135
Nov 19 2014 16:00
it could be simple, like visual effect (margin, icon)
may be
well, I gotta go
cu around
ioleo
@ioleo
Nov 19 2014 16:01
see ya
there are some good ideas
Serg N. Kalachev
@ksn135
Nov 19 2014 16:02
yep
ioleo
@ioleo
Nov 19 2014 16:02
:)
Serg N. Kalachev
@ksn135
Nov 19 2014 16:02
and nice gitter.im ))
Serg N. Kalachev
@ksn135
Nov 19 2014 16:13
@loostro btw, in composer.json what is "most stable" versions for symfony2admingenerator/form-extensions-bundle and symfony2admingenerator/user-bundle ?
These are stable. I've not published a stable release, becouse I plan to include some minor fixes, but you can consider them stable.
Serg N. Kalachev
@ksn135
Nov 19 2014 16:17
I see, sorry, should take a look first
ioleo
@ioleo
Nov 19 2014 16:17
no problem
ioleo
@ioleo
Nov 19 2014 16:37
just released v2.0-beta.23 with a minor fix
ioleo
@ioleo
Nov 19 2014 16:45
@ksn135 is that also your github name?
ioleo
@ioleo
Nov 19 2014 17:01
I've created an issue for NestedList symfony2admingenerator/GeneratorBundle#42
Serg N. Kalachev
@ksn135
Nov 19 2014 18:01
@loostro yep, it's my github name too. I've leave a comment there.