Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`ModifyTextareaFieldPublishWidget` #2158

Closed
designermonkey opened this Issue Aug 11, 2014 · 10 comments

Comments

Projects
None yet
4 participants
@designermonkey
Copy link
Member

designermonkey commented Aug 11, 2014

I only just noticed we have this delegate. I get what it is for: Applying text formatters et al.

How come something as useful and powerful isn't available for all field types? Should we not have a delegate on the Field class ModifyFieldPublishWidget.

Just think how powerful that would be...

  • Modifying the markup of any Symphony Field to allow custom JS interaction by extensions.
  • Allow filtering of content in Select Boxes by an extension.
  • Many other awesomes.

I've been defining an extension that would have to do some pretty nasty DOM hacking in JS to achieve things, when if I had this delegate available to me, it would save so much time in outputting PHP preferences to JS, to be picked up and dealt with then. I could just do it all in PHP and save the middle layer of PHP -> JS.

@nilshoerrmann

This comment has been minimized.

Copy link
Member

nilshoerrmann commented Aug 11, 2014

Yes, please!

@nitriques

This comment has been minimized.

Copy link
Member

nitriques commented Aug 11, 2014

+1 indeed!

@designermonkey

This comment has been minimized.

Copy link
Member Author

designermonkey commented Aug 11, 2014

@nilshoerrmann I bet you wish it were there for the Associations FIeld?

@designermonkey designermonkey added this to the 2.5.0 milestone Aug 11, 2014

@designermonkey designermonkey self-assigned this Aug 11, 2014

@designermonkey

This comment has been minimized.

Copy link
Member Author

designermonkey commented Aug 11, 2014

As it's a very simple job to add the delegate and patch the old one to it, I will do this for 2.5.

@designermonkey

This comment has been minimized.

Copy link
Member Author

designermonkey commented Aug 11, 2014

Left the old delegate alone, as the footprint would be different. Maybe we should deprecate it's use in favour of the new one?

@nilshoerrmann

This comment has been minimized.

Copy link
Member

nilshoerrmann commented Aug 11, 2014

@nilshoerrmann I bet you wish it were there for the Associations FIeld?

Indeed :)

Left the old delegate alone, as the footprint would be different. Maybe we should deprecate it's use in favour of the new one?

Sounds like a good idea.
And thanks for the pull request!

@nitriques

This comment has been minimized.

Copy link
Member

nitriques commented Aug 11, 2014

And thanks for the pull request!

I second that!

@brendo

This comment has been minimized.

Copy link
Member

brendo commented Aug 11, 2014

I can't think of any reason why this wasn't included other than simply not thinking of it at the time. Nice pickup. Will merge ASAP.

@nilshoerrmann Would you refactor Associations field now with this delegate?

@nilshoerrmann

This comment has been minimized.

Copy link
Member

nilshoerrmann commented Aug 12, 2014

Would you refactor Associations field now with this delegate?

Only in the long run, nothing that needs to be done for the initial releases. But it opens up new possiblities as it will allow us to remove or simplify a few AJAX calls on page load.

@brendo

This comment has been minimized.

Copy link
Member

brendo commented Aug 13, 2014

Done, merged in.

@brendo brendo closed this Aug 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.