infinite-networks / InfiniteFormBundle

A collection of useful form types and extensions for Symfony.
169 stars 40 forks source link

Add post-add event to collection js #64

Open ste-wilkinson opened 7 years ago

ste-wilkinson commented 7 years ago

Hi Merk,

Sure, I'll add the tests later today :)

The reason we need the post-add event is for visual purposes really: items within the polycollection are styled in a way that allows them to act as a kind of editable preview, but we also allow the user to change the aspect ratio of the previews in a dropdown, so in the case that a user changes the resolution and then adds a new element, the prototype is unaware of the new resolution when it is created, so the event helps us hook into that and resize. If that makes sense?

ste-wilkinson commented 7 years ago

Hi Merk, looks like there's a failing php test on the 177.5 build only, even though this PR involves no php changes. Is this a known issue?

merk commented 7 years ago

The test failure is unrelated to your changes, I made some updates to fix our travis config and there is still a problem with PHP5.6 and our legacy symfony support for the Polycollection.