symfony-cmf / sonata-phpcr-admin-integration-bundle

Symfony CMF sonata PHPCR admin implementations
https://cmf.symfony.com
5 stars 20 forks source link

FormTypes extraction #53

Closed fbourigault closed 7 years ago

fbourigault commented 7 years ago

Before admin classes were moved into this bundle, the idea was to extract reusable FormTypes from every admin class. Once those FormTypes are extracted, sonata admin classes may use it. This later step probably require https://github.com/sonata-project/SonataAdminBundle/issues/4243 to be solved.

https://github.com/symfony-cmf/content-bundle/pull/150 may be a good starting point to anyone who want help on this topic.

fbourigault commented 7 years ago

On Symfony-devs slack, we talked about relevancy of extracting form types. We agreed that extracting FormTypes will not be as profitable as expected because:

As a conclusion, we thought our time will be more valuable if spent building FormTypeGuesser services.

dbu commented 7 years ago

agreed. we should remove the form type we already did from the ContentBundle and work on form type guessers in the bundles that provide something useful for forms. like the tree browser bundle. lets close this issue and create issues in the respective bundles - which ones could do that, anything else than the tree browser?

wouterj commented 7 years ago

CmfContentBundle may provide a type guesser for the ckeditor form type, or we contribute it to the ckeditor bundle directly.

dbu commented 7 years ago

https://github.com/symfony-cmf/content-bundle/issues/171

i think the ckeditor bundle does not really have enough information to know where to suggest ckeditor. in this bundle, we could use the property name to get an idea. its in general a tricky business however, to know whether wysiwyg is appropriate or not

wouterj commented 7 years ago

its in general a tricky business however, to know whether wysiwyg is appropriate or not

Yeah, I think it's should maybe be disabled by default. However, guessing always is tricky and if not correct, people just have to specify the form type name (it's not that hard).