Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Conversation

@deadmann
Copy link

@deadmann deadmann commented Apr 6, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature, As i'm not native english talker, someone should take responsibility to add docs

What is the current behavior? (You can also link to an open issue here)
Caused me lot of trubles.

What is the new behavior (if this is a feature change)?
Fine. (first i though about give item one by one, but i though user may want also grouping and etc, so i give him whole data, and let him transform it wholy)

Does this PR introduce a breaking change?
No.

Please check if the PR fulfills these requirements

Other information:

i use TS files to write my model, it was several days already, that i wanted to append an interface to my model, but it always failed and i was wonder why... asking around, searching a lot... but nothing...

Yesterday, i wrote a new module that need to check for input parameter type. i saw what it fails... and again searching through code and topics... so at some point i found angular change my model again... seeing what... i told 'transformResponse' to return an object of type AcDocRow, but after steping through i saw, hey waits, it's again an stringified json :| ...
Searching searching searching...
-lot of people have same issue, it's not only me...
-Angular Resource Pass Object to Http.. and it return the value to angular, angular again modify the object....
-lot of conversion from string to object and vice versa.
-no solution...

what should i do?
well let see through the code...
and i add ability to add a new action which modify the actual result. and you can bypass transformResponse too. which seem more complicated.

it's all seem to be clean... so i hope it be acceptable by the jury.
I also it get updated in new version of angular too...

I'm capable of filling the doc, but i'm not a native english talker. so i leave it to your hand.

i also create pull request in
https://github.com/deadmann/code.angularjs.org

deadmann added 3 commits July 28, 2015 07:21
i use TS files to write my model, it was several days already, that i wanted to append an interface to my model, but it always failed and i was wonder why... asking around, searching a lot... but nothing...

Yesterday, i wrote a new module that need to check for input parameter type. i saw what it fails... and again searching through code and topics... so at some point i found angular change my model again... seeing what... i told 'transformResponse' to return an object of type AcDocRow, but after steping through i saw, hey waits, it's again an stringified json :| ...
Searching searching searching...
-lot of people have same issue, it's not only me...
-Angular Resource Pass Object to Http.. and it return the value to angular, angular again modify the object....
-lot of conversion from string to object and vice versa.
-no solution...

what should i do?
well let see through the code...
and i add ability to add a new action which modify the actual result. and you can bypass transformResponse too. which seem more complicated.

it's all seem to be clean... so i hope it be acceptable by the jury.
I also it get updated in new version of angular too...

I'm capable of filling the doc, but i'm not a native english talker. so i leave it to your hand.



i also create pull request in 
https://github.com/deadmann/code.angularjs.org
@deadmann
Copy link
Author

deadmann commented Apr 6, 2016

i don't want to update:

@deadmann Add new type of switch item, that accept Variables 8f5d9b6
@deadmann Update AngularPublic.js 8e9ba49

don't know how to exclude them :|

@deadmann deadmann changed the title Provide 'transformResult' action in ngResource Modify Service Results: Provide 'transformResult' action in ngResource Apr 7, 2016
@gkalpak gkalpak added this to the Backlog milestone Apr 8, 2016
@Narretz
Copy link
Contributor

Narretz commented Apr 13, 2016

This PR has two feature changes mixed into one. (ngSwitchBind and something in resource).
@deadmann You should create a new branch for each feature request you want to make. You also need to add tests for each change.

@Narretz Narretz modified the milestones: Purgatory, Backlog Apr 13, 2016
@deadmann
Copy link
Author

well i wanted to keep that ngSwitch for my own self, while i wished to update the transformResult. i'm not much familiar with Git, or TDD(both just a little, and for test even less) as most of small or mid-size compny don't use them. i wished i could do that. i just know some simple TDD in C#, and nothing more. BTW, The bot says all your test are passed. just you return a 'Resource' object, but once user used my Feature, i return his object let say '' instead.
You should perform merge i think, and ignore changes from those 2 file (AngularPublic.js, ngSwitch.js) as there are nothing for you in there.

BTW if you guide me through the test that should be wroten and it's way for js, and the way of branching. i'll do them all.

BTW i use it in production code already with too many data and of many kind.

@Narretz
Copy link
Contributor

Narretz commented Apr 13, 2016

@deadmann Here's described how you should create feature branches: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#submitting-a-pull-request

Since you already mixed stuff on master, you should create two new branches and then remove commits so that each branch only has commits for one feature:
How to move commits to new branch: http://stackoverflow.com/questions/1628563/move-the-most-recent-commits-to-a-new-branch-with-git
How to remove commits from history: http://stackoverflow.com/a/1338758/787333

We don't do TDD in angular - we don't write tests before we change code, but we always have a test for each new feature. You can take a look at the resourceSpec.js file to see how tests for resource.js are written.

Both git and unit tests are super useful.

Btw, can't you use transformResponse for your use case? Why do you need another transformResult?

@deadmann
Copy link
Author

@deadmann Here's described how you should create feature branches: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#submitting-a-pull-request

i'm using web interface, and i don't know how to log in and also how to move to my repository using batch commands.
Second, Should i then make new pull request?
i tried once (to perform change in my repository) but it gave me errors, so i gave it up.
the test you are talking is the one inside doc?

Run the full Angular test suite, as described in the developer documentation, and ensure that all tests pass.

tell me the basic, before document, and i'll follow the doc my self

@Narretz
Copy link
Contributor

Narretz commented Apr 26, 2016

@deadmann I think you should create a new PR once you have sorted out your git situation. Running git on the command line isn't really that hard. Here's one guide for example: http://rogerdudler.github.io/git-guide/

I'm gonna close this PR, since in it's current state, it's not reviewable. You can reopen it once you have sorted out the commits, or simply open a new one. Thanks for your understanding.

@Narretz Narretz closed this Apr 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants