baoagency / polaris_view_components

ViewComponents for Polaris Design System
https://polarisviewcomponents.org
MIT License
380 stars 53 forks source link

Fix FormBuilder to correctly forward block to TextField #447

Closed mborromeo closed 4 days ago

mborromeo commented 1 month ago

I noticed that when using a block on the FormBuilder#polaris_text_field (eg: to add connected fields), the block wasn't correctly passed to Polaris::TextFieldComponent.new and the final render wasn't complete.

I added tests to cover the issue, but i'm not 100% confident on the change and i wish i could get a code review. Also, i'm unsure if other methods sharing the same pattern are actually suffering the same issue. If yes i can fix all of them and add tests.

Thanks for your help!