Closed juek closed 7 years ago
@a2exfr , this refactoring will cause some changes to existing section types (mainly control_type naming from dashes to underscores, as you already did in wise foresight ;-) Should I open a new branch? I'm not yet experienced with merging branches.
I'm not yet experienced with merging branches.
me too ) I even do not know how to made my fork identical without removing it and forked again) so it's up to you. But this a big cnange may be new branch is logical decision. I'm will try to help with code if I be able too)
About Modularity: Interesting, have you many more controls type in mind? Currently my needs in control types is mostly satisfied. Actually even link field is a combination of existing controls - input. ck-finder and checkbox :)
Interesting, have you many more controls type in mind?
No, actually not. But they will certainly come with special situations. And I want an easy way to integrate them into universal editor without changing it's code.
E.g. Multi-Date - this is merely a test case for more complex controls (with multi-dimensional arrays and dynamic element count). It is quite code-bloating. I will build this one as an extension (or module). It's mostly done but I'm currently still thinking about a useful module definition, where we can define all component dependencies, possible thirdparty libs and css.
I want to have editor modules/extensions in separate folders (like types) for easy exchange and maintenability. Universal editor files and CustomSections.php should remain completely untouched. Not exactly trivial...
I just look at multi-date and now understand for what this modularity for. multi-date is very specific control type it is not be used so offen as input or chekbox
parallel thinking/writing LOL
Time to start some cleanup and refactoring. editor.js is close to 1000 lines. This is what I'm planning:
1st: Modularity in editor.js --> gp_editor.controls will become an object (of methods) like
This way we start modularization by using...
... loaded from a separate script