cozy / cozy-emails

Email Client for Cozy
GNU Affero General Public License v3.0
66 stars 41 forks source link

Migrate Contact Store to Contact Reducer using Redux #906

Closed gregorylegarec closed 7 years ago

gregorylegarec commented 7 years ago

Please @aenario have a review, I d'like to have your opinion about differents points:

Aslo, I spent some time refactoring the part of the code in charge of mapping raw contacts to immutable contacts and raw contacts list onto an immubtable map. I choose to create a dedicated library in libs/mappers, tell me if it is ok for you.

Also, I choose to change a little bit the logic to have :

In my unit tests, I use to repeat code sometimes, because I find it clearer and easier to maintain, tell me if you prefer me to factorize and mutualize some parts in functinos.

aenario commented 7 years ago

To ease up review, it would be nice to keep files name (contact_store.spec.js -> contact_reducer.spec.js) so we can see the diff on github. We can make all the renamings in a separate step at end of sprint.

gregorylegarec commented 7 years ago

Ok for keeping files names. Thing is I almost rewrote the whole test file from scratch.

But I see your point and I will let the same name in the next PR. :)