json-schema-form / angular-schema-form

Generate forms from a JSON schema, with AngularJS!
https://json-schema-form.github.io/angular-schema-form
MIT License
2.47k stars 653 forks source link

replace `angular.uppercase` with `String.prototype.toUpperCase()` (support/0.x) #978

Closed rthaut closed 6 years ago

rthaut commented 6 years ago

Description

Per @Anthropic's request in my PR for the master branch, this PR targets the support/0.x branch.

This PR replaces the use of angular.uppercase with String.prototype.toUpperCase(), as AngularJS has removed their helper functions.

Fixes Related issues

Checklist

@json-schema-form/angular-schema-form-lead

rthaut commented 6 years ago

@Anthropic I tested this on the support/0.x branch, BUT I had to make a few extra changes to get the tests to run on my end. I'm assuming you don't want those to be part of this PR (so they are not included here now), but you can see what I had to do here on my fork of the master branch.

Basically, many of the development dependencies are substantially out-dated, so I had to update them to get karma to actually run. Additionally, with Bootstrap 4 (compared to Bootstrap 3), the DOM structure for input elements is a little different, and the has-error and has-success classes are added to the input group, so the selector used in the test cases had to be adjusted. The alternative solution would be to lock Boostrap to v3.x in the bower.json file(s); I think that change would need to be made in json-schema-form/angular-schema-form-bootstrap, but I didn't actually track it down through the dependency tree.

Let me know if you want a PR that includes those fixes (or if you want them included on this PR), and, if so, which branch(es) you want me to target. Also, if there is a better way to discuss and/or handle this, I'm happy to oblige.

Anthropic commented 6 years ago

@rthaut champion, thank you very much, you can ping me via Gitter IM and I can give you my email or just communicate there. I really appreciate your efforts. I'm working in the swappable validators branch and I'm stuck on a few things that have kept me away from touching any other branches (that and two separate month long holidays this year). If you can put those changes in another PR I am more than willing to accept them (I always prefer separated PRs for clarity of purpose), not having the time to get the validation working on that branch has been such a pain stalling my ability to do quick fixes and they are building up for quite some time now. I have had users ask about bootstrap 4, I don't really use it so wasn't sure what was involved, would like to discuss that with you and see if we can update the bootstrap repo at some point too.