Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete migration to platform-client for API calls #56

Merged
merged 8 commits into from
Apr 18, 2014

Conversation

nicolashery
Copy link
Contributor

NOTE: this is dependent on tidepool-org/platform-client#9

See platform-client PR linked above for more details on migration.

This PR also completes data model change where messages where tied to a teamId but are now tied to a userId.

I've tested this locally (creating accounts, profiles, uploading data, visualizing data, etc.) and things seem to work fine.

jh-bate and others added 5 commits April 18, 2014 10:27
Use `tidepool.getUserId()` when needed to construct api calls.
- Migrate all device data calls and processing out of this codebase, and
  use platform-client
- Complete change from `teamId` to get notes to `userId`
@nicolashery
Copy link
Contributor Author

Closes #31

@nicolashery
Copy link
Contributor Author

Had to add a few changes to take into account the new message data model coming from message-api, so this also fixes the message thread rendering.

All good to go now.

BEFORE:
screen shot 2014-04-18 at 3 29 15 pm

AFTER:
screen shot 2014-04-18 at 4 58 50 pm

@cheddar
Copy link
Contributor

cheddar commented Apr 18, 2014

Is it just me, or do all of the replies seem to come together into just a blob of text for other people too?

@nicolashery
Copy link
Contributor Author

Are you talking about the styling you see in the screenshot?

If you are, I have a task which is "tweak message thread styling", so I'll get to it and make it better. Just focusing on functionality here...

@cheddar
Copy link
Contributor

cheddar commented Apr 18, 2014

Ah, yes, I was. Sounds good if it's a todo item.

@cheddar
Copy link
Contributor

cheddar commented Apr 18, 2014

(With pretty design stuff, I always assume it is just me, but I also vocalize my thoughts just in case.)

if (user && user.firstName && user.lastName) {
result = user.firstName + ' ' + user.lastName;
}
return result;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nit, but why not just return the value inside the if as well as here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum yeah I guess I could've done that and do without the result var altogether...

@kentquirk
Copy link
Contributor

And also...forgive me if this has been discussed, but months ago we spec'd that we'd be storing fullname and shortname specifically to avoid the problem of firstname and lastname. Why did we decide not to do that, again?
http://tidepool-org.github.io/ServerDataOrganization.html

@nicolashery
Copy link
Contributor Author

No @kentquirk this is a good point and it hasn't been really discussed. I think this dates back from the very beginning where I started working on the Blip UI but the backend wasn't ready yet, so I just went with this user data model, and I guess it just stuck.

I do have a note somewhere "align better with backend user data model", and that could become part of it. I'd rather leave it out of the PR if that's all right? For instance, I would state that most apps I've used ask for first name/last name and do just fine? But it'd be best not to have that discussion here :)

@cheddar Does everything else seem good?

@nicolashery
Copy link
Contributor Author

Hum, I take that back, a lot of apps do ask for a "Full Name" it seems.

Let's revisit outside of this PR then? Thanks

@kentquirk
Copy link
Contributor

Ok, I've created a card for it in trello. In western cultures it mostly works to do first/last, but even there you run into issues. I've seen people get upset when their first name is used without permission.

The fullname / shortname model allows people to control how others address them.

@kentquirk
Copy link
Contributor

Also, can you figure out what's up with Travis before merging, please?

@nicolashery
Copy link
Contributor Author

Yes I understand, the more I think about it the more it makes sense. Thanks for creating the Trello card.

I just checked the build locally, its fine, this is another case of Travis bugging. I could restart it but I'm a little lazy to wait for it to finish :) Merging to master will run it again.

Is this good to go then?

@cheddar
Copy link
Contributor

cheddar commented Apr 18, 2014

No @kentquirk this is a good point and it hasn't been really discussed.

Fwiw, I have memories of discussing this months ago as well and agreeing to storing full name... Don't really know if it got documented or where the spec changed though, so probably just got lost in the ether.

nicolashery added a commit that referenced this pull request Apr 18, 2014
Complete migration to platform-client for API calls
@nicolashery nicolashery merged commit 0967218 into master Apr 18, 2014
@nicolashery nicolashery deleted the jhbate/no-group-id branch April 18, 2014 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants