dougblack / nextbus

GT NextBus - An Android app
17 stars 6 forks source link

Not sure how to proceed with new changes. #1

Closed darkzeroman closed 11 years ago

darkzeroman commented 11 years ago

I've been working on changes here.

I've changed a good deal of the code and I'm not sure if a pull request is the way to proceed.

A quick summary of the changes:

http://desolate-escarpment-6039.herokuapp.com/bus/get?route=red&direction=clockwise&stop=fitten

There were a few reasons for this. Because we're screen scraping due to a lack of NextBus API for GT (and GT Mob's API does not include Emory route), it's easier to deal with changes if I can make my own API as a middle man. This is much easier than trying to debug the issue from the phone. The current calls made from the code would sometimes error out for edge cases, which are must easier to take care of using my own API.

I think this would be fine for production since the calls are not intensive and the free plan from Heroku should be fine.

I have not been able to test out the live map feature since I don't have an Android phone currently. Once I get my hands on one, I will try to make sure it's running properly.

dougblack commented 11 years ago

Not near a computer right now so I'm replying from my phone.

A pull request would probably be best. The app will still need to be updated through my own developer portal to maintain the current user base and allow us to notify them of new updates, so I can't just turn over control entirely to you.

I like the intermediate API idea. Does your heroku app make calls to nextbus only when you make a request or does it request every few seconds and just send the most recent results to any requests? Just curious.

I like what you've done so far! Good job.

darkzeroman commented 11 years ago

There isn't any caching since I figure the traffic is not heavy enough to justify that.

I've fixed the issue with selecting other arrivals on the same stop. I still have a problem I'm not sure how to deal with. The first is that some stops might be shared for a route in different directions. Like, the transit hub which is used by the night route for both the Clough and Fitten directions. Or like below: otherArrivals

I was thinking maybe there should be an expandable list for a route with two or more directions? The way it is shown currently is not clean but it works.

Also, what color do you think the Emory route should be? I'm bad at choosing colors. emory

dougblack commented 11 years ago

Personally I like the screenshot you posted above more than having an expandable list. Less taps is better.

To make the Other Routes screen look a little less busy, you could try making the direction text smaller, right aligned, and a light gray so it looks faded. I'm no UI expert but I bet that could look nice. Copying the gray colors used in the StopView would probably be best.

I would say that we should use the official Emory blue/purple color but that would probably clash with our Night and Blue routes. I think a whitish color would work best, even though it won't stand out very well.

darkzeroman commented 11 years ago

Hey,

I worked on this for a few more hours today and wanted to give you an update. I'm going to flesh out a few more features like:

I'm a terrible UI person and really have no skills in deciding what works and doesn't. I am getting a little frustrated because I suck at choosing colors and designs, maybe I can find some UI guy to help me make some design decisions because I am not making much progress on it.

I've completed the Favorites, which looks like the following:

favorites

If only active routes is set in the preferences, inactive routes are grayed out. Appearance isn't good, but it functions.

The following is what the activity looks like normally. Clicking on the star enters the favorites activity.

normalView

The following is what the app looks like when adding a stop/route/direction to a favorites:

notAddedToFav And now clicking on the star... Similar message when defavorite-ing something.

addedToFav

I've also changed the "Other Arrivals" page. Because of the current implementation, right aligned text is not possible. To do that, it's necessary to make a new layout file and not use a drawable resource.

Issues to work out:

If you see any possible issues, be sure to reply.

keveleigh commented 11 years ago

These are looking good! I was planning on working on this stuff as well, but it looks like you beat me to it. I have a few Android devices (running 4.2.1, 2.3.4, and 1.6) which I'd be willing to use to test this app on if neither of you are able to. I'd also be more than willing to work on a few things if you guys want to collaborate a bit! I was thinking a widget might be handy for some people, perhaps always displaying a certain route/stop's next arrival time or something.

darkzeroman commented 11 years ago

@keveleigh I'm working off my own repository at the moment. Available here.

If you wanted to work on it, I would recommend going through the source code to get a feel for it. So you can understand how the data is stored and how you could build on that. Feel free to make changes and submit a pull request. Also, look through my README for a quick summary.

If you are good at design, the favorite_row.xml would love your attention. The Data class is a work in progress that is messy and I know it.

dougblack commented 11 years ago

@darkzeroman Looks great! Sorry I haven't been responding lately, I'm currently out of town for job interviews.

When you want the changes to go live, just send a pull and let me know!

keveleigh commented 11 years ago

@darkzeroman I took a look at the favorite_row.xml file and experimented with a few layouts. I really like this one, personally. In my opinion, the first letter of the route and the color to the left should be enough to identify the route. I felt that it really cleaned up each cell and also compressed it a bit horizontally for smaller screens. Please let me know what you think! I'm absolutely open to being shot down.

2013-02-19 14 51 40

Also, when deploying to my phone, attempting to go to the map force closes the app just like it does in the emulator.

dougblack commented 11 years ago

@keveleigh I like the look! Three things:

Keep it up guys! The update already looks awesome.

keveleigh commented 11 years ago

@dougblack Thanks!

darkzeroman commented 11 years ago

I think the large letter isn't a bad idea.

Remember, there is an "Other Routes" page which must show which routes share the currently selected stop. That screen currently looks like: otherarrivals If we think removing the route name from the favorites page is a good idea, we should also remove it from this page. But I don't think the "Other Routes" would look good with the route name taken out. What would happen for Red/Blue which don't have multiple directions. That would mean in the proposed implementation only a bar would remain.

But having just a bar might be an issue for color blind users? I would personally would have liked to see the route/direction/stop information, but I realize it's way too much to fit in a small space. A good compromise would be to have the first letter show. They are unique. And I think @keveleigh's design is pretty slick.

@keveleigh Yeah, I'm pretty sure all the changes I made to the backend will mean the Maps feature won't even work anymore. The issue is that the map overlay doesn't work in the emulator and I don't have a device, but I should be getting my hands on one soon. Once I do, I can make sure the Maps feature works as expected.

One of my friends recommended that maybe we could move the color of the route to the background of the letter. That might be something you can play around with @keveleigh.

keveleigh commented 11 years ago

Here's the current state of the favorites screen based on the changes recommended by @dougblack. I still need to look at lining up the stop and direction text a little more consistently.

2013-02-19 18 29 39

@darkzeroman I'm open to either implementation (with or without a reference to the route name). I can certainly look more into moving the color of the route to the letter. That was one thing I began looking into just before we decided to try removing the letter altogether.

I changed the bar between the header and the list to the official Georgia Tech old gold hex value. It was just red before, so I'm open to suggestions for new colors or changing it back to the way it was. I also removed the bold font from the words in the list. I felt that it didn't match the way the stops are listed on the main page. Any thoughts?

darkzeroman commented 11 years ago

@keveleigh If you can, let's see what it looks like with the letter and color. All the other changes you made are fine with me.

keveleigh commented 11 years ago

I haven't found a decent way to change the color behind the letter yet, but I'm still looking. I decided to experiment a bit with the color of the letter, and I kind of like the way it looks.

2013-02-20 01 53 39

Here's where I currently am with changing the color of the background behind the letter. I think I have a way to make it look a little better, but these are two ways it looks now.

Untitled1 Untitled2

I've noticed a few things during my testing.

darkzeroman commented 11 years ago

@keveleigh

I wouldn't really recommend doing a merge right now, because I've been making lots of changes to the backend, mostly making sure everything follows a consistent naming pattern, and that could bring up lots of merging issues.

So instead, I would change the following line in the Data.java file.

    private static void loadFavoritesData() {
        try {
            FileInputStream fis = ctx.openFileInput("favorites.txt");
            Reader reader = new InputStreamReader(fis);
            Data.favorites = new Gson().fromJson(reader, Favorites.class);
        } catch (Exception e) {
            System.out.println(e);
            Data.favorites = new Favorites();
        }
                // Data.favorites = new Favorites(); was previously here
    }

I'll look into the faded stuff.

darkzeroman commented 11 years ago

@keveleigh Any updates on the UI? I think we should atleast put something together so the updated NextBus can be shipped.

keveleigh commented 11 years ago

@darkzeroman I will post an update tonight. Sorry I haven't posted one yet.

keveleigh commented 11 years ago

@darkzeroman The best update I can give at the moment is that I'm still working getting the letter to appear inside a square of the corresponding color. I can't seem to get the letter to center both horizontally and vertically. This is currently the best finished option, in my opinion, from my post above:

d2eea2f8-7b2a-11e2-9d77-ae43ab3fae72

I will continue working on the other layout and should have it finished tomorrow (2/26).

darkzeroman commented 11 years ago

@keveleigh I like it.

darkzeroman commented 11 years ago

@keveleigh

Just upload what you have done to your repo. I'll take care of the rest.

I can easily change the one you've made for the others.

darkzeroman commented 11 years ago

Pinging @keveleigh , pinging @keveleigh !

keveleigh commented 11 years ago

@darkzeroman So sorry! I'll upload right now! How would you like me to go about doing that?

darkzeroman commented 11 years ago

Just make a branch in your repository and commit it there.

keveleigh commented 11 years ago

This is my first time working with git. I had my environment and files set up incorrectly and accidentally deleted a few of my files while trying to figure out how to branch, push, and do other core git functions. I'm working on getting it set back up correctly. My bad guys.

keveleigh commented 11 years ago

Hopefully I did this correctly. I have a "favoriteslayout" branch which has all my latest code, though I believe I accidentally updated my master to the same thing. The only files I changed are favorite_row.xml, favoritesAdapter.java, favoritesActivity.java, and colors.xml. The rest of the "changed files" are just from when I copied @darkzeroman's files from his fork into mine. I'm sure there was an easier way to do that, but yeah. Please let me know if you have any questions. Also, I was working with older versions of your files darkzeroman, so hopefully nothing I did messed any of your latest changes up.

darkzeroman commented 11 years ago

Thanks, @keveleigh

keveleigh commented 11 years ago

Glad I was able to help! Hopefully I'll be able to contribute a few larger things soon.

keveleigh commented 11 years ago

Also, just a heads up about stuff I've noticed while using the version of GT Nextbus I had.