distributev / the-app

The App
MIT License
0 stars 2 forks source link

gui-email-and-document-templates-dont-interpolate-when-I-type-values-in-form #117

Open distributev opened 8 years ago

distributev commented 8 years ago

Please find attached the statements.zip template which I use for this test.

gui-email-and-document-templates-dont-interpolate-when-i-type-values-in-form

luismanuel001 commented 8 years ago

Here the thing is that this is the way it was implemented before. On the mail-merge.js code, the previous developer only compiles the previews on view load, and in some very specific instances where he manually called a refresh method that attempted to recompile the preview sections.

I haven't touched any of this because to be honest it is really bad coding on my opinion, and it uses a bunch of manual DOM manipulation through jQuery to achieve the current behavior. In my opinion all this is unnecessary and a better implementation could have being developed using more angular ways, using angular native bindings to update the previews as the model (form variables) changed, and without even using jQuery (which is a bad practice) at all.

Again all this was out of the scope of my project, and I could try to spend some time if needed on this, but I have already spent a week more than my estimates, and this will just add a lot more time just to pretty much rewrite the mail-merge component almost completely, and I was hoping to finish this up today since I need to move forward with other projects next week.

distributev commented 8 years ago

I don't understand. I tested this initially and it was interpolating while I type real time just fine (including onload first time).

Just took again the original old code now and I see that it is working fine all the above form fields get interpolated while I type real time just fine.

Feel free to git clone yourself the old repository and see it working fine.