CustomField - New web-component for creating field options - #34606
CustomField - New web-component for creating field options#34606colemanw wants to merge 2 commits into
Conversation
|
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
c57a464 to
997c50e
Compare
|
Looks cool @colemanw - definitely a good use case :) Easy thoughts:
Hard thought:
but it's a bit of a faff. I've got two ideas for translation currently: [moving this bit to https://github.com//pull/34348 as its a better place to discuss ] |
997c50e to
fe3c9f3
Compare
|
@ufundo good feedback. I agree with your easy thoughts & will fix that when #34348 stabilizes. We should probably hold off on merging this until that one is finalized so this can use the autoloader. I actually don't agree about the template. Not including the template as part of the element has 4 advantages:
In short, hard-coding the template kills reusability of the widget. To keep reusability, you'd have to abstract the template into all the above-mentioned config options (a couple dozen of them if you count everything I just mentioned above!). So then to use this element you'd have to pass those dozens of config options in... but by the time you get done writing out all those config options... why not just write markup? It's so much more readable to designers, themers, etc. |
Overview
New widget for adding options while creating a custom field.
Before
Old quickform-based widget was limited to adding 10 options.
After
Technical Details