grote / Transportr

Free Public Transport Assistant without Ads or Tracking
https://transportr.app
GNU General Public License v3.0
1.04k stars 188 forks source link

Display ticket price #231

Open sedrubal opened 8 years ago

sedrubal commented 8 years ago

Öffi can show the price for single trip tickets for the trips. (At least for trips in VGN). This would be an useful information, I think.

grote commented 8 years ago

Price would be easy to add. The question is just where to show it. UI mockups are welcome.

sedrubal commented 8 years ago

That's great :tada: what do you think about adding it to the image at the top:

transportr-price

grote commented 8 years ago

That's a great start. I'd need to check what data is actually available in the API, but I think it has prices per leg (part of the trip). So it might also happen that you have a price for one leg, but not for another. How would this be handled in the above mockup?

Also, I'm concerned that adding one more line to the header causes problems with readability on the background graphics. We want to have specific background graphics at some point (in this example maybe actually showing a subway in Nurnberg) and then all graphics need to be very dark everywhere. This one has a shim added, but it doesn't go so high into the photo.

sedrubal commented 8 years ago

I see... So maybe this is better?

transportr-price2

But then there is very much information in this view...

grote commented 8 years ago

Could indeed be a bit much. Maybe there could just be an info icon somewhere that opens a dialog with additional information when clicked? This could include the red messages and if there is a red message, the icon could be red or do you think this would not be clear enough for people that there is important information for that trip?

sedrubal commented 8 years ago

I like this idea :smile:

airon90 commented 8 years ago

I just want to say that sometimes with just one ticket you can use more vehicles: in Milan with one ticket you can catch buses and trams if you travel within 90 minutes. So you don't have to pay another ticket for the other rides. When you play with APIs check this out in order to know if the information available is correct. It doesn't have sense to show wrong information.

full-duplex commented 7 years ago

It looks nice, but this only works for providers that return fares per leg, and not for providers that return the fares for the whole trip, per network, etc. (I think the current Fare implementation is a little lacking anyway, because it doesn't allow reduced prices other than child/adult or 1st/2nd class)

Why not add a card below the trip with all fare info?

grote commented 7 years ago

@full-duplex The idea changed half-way through this ticket. The latest one was to add an info icon that opens a DialogFragment that shows the message and fares (if any).

full-duplex commented 7 years ago

Sorry, skipped over that part of your message.

I agree that would be a better solution for the fares, but I would dedicate that button to fares only and keep the message where it is currently. It's already hidden in the Journey list and would now require another additional click to see.

Maybe keep the message one or two lines and expand it on press for longer messages? Although that might be a discussion for another ticket.

cxxuzbim commented 7 years ago

I think this information should also appear in the trip selection screen below the time estimate so you can easily compare any cost differences that may be.

ialokim commented 6 years ago

Almost one year later, I gave it a try with the following mockups based on the new design of Transportr 2.0:

fares-mockup or fares-mockup2

It addresses the case mentioned by @cxxuzbim by adding the price in the trip selection beyond the estimated duration. In the trip details, it could be added as a new row above the trip information that could contain the remaining time until the trip starts (as in the trip selection), the whole duration and the price for the whole trip.

To support prices per leg (part of the trip) and different ticket types, you could support a top on the prize in the upper right corner to open a DialogFragment with more detailed price information as suggested by @grote.

EDIT: added second mockup with different header row

What do you think?

ialokim commented 5 years ago

@grote any thoughts on this?

grote commented 5 years ago

@ialokim thanks for pinging me. I had missed your post. Also thanks for the mockup. This looks good. I prefer the top version, except the last screen on the right. Though, there you need to see how to get this blend over to the action bar (toolbar).

ialokim commented 5 years ago

Okay, so you like the first version in the first three places except when looking at the map where you would prefer the red background in the header? I will look into it when I find some time how we could implement the blend over. If it would result very difficult, would you also be okay with having the red background in the header row everywhere as in the second mockup?

grote commented 5 years ago

Okay, so you like the first version in the first three places except when looking at the map where you would prefer the red background in the header?

Yep, but it could be the white background as well if need be. A simple alpha animation should be possible, but let's see.

ialokim commented 4 years ago

The mockups from https://github.com/grote/Transportr/issues/231#issuecomment-355644068 are now incorporated by #627, but they just display the standard fare and just for the whole query.

We should think about how to display different fare types or fares per leg, e.g. inside a DialogFragment.

grote commented 4 years ago

Could you not show the price under the leg duration like you show it under the trip duration?

grote commented 4 years ago

Btw. how do you handle the total price display if the price for one or more legs are missing? Something like 10 + ? EUR?

ialokim commented 4 years ago

Could you not show the price under the leg duration like you show it under the trip duration?

I guess we could, but I kind of agree with your https://github.com/grote/Transportr/issues/231#issuecomment-244157003 some years ago about perhaps having too much information for one view. Also, there are cases where you would have prices per leg, but they don't properly sum up as e.g. a normal ticket is valid in some fare zone for e.g. 180 minutes no matter how often you switch means of transport. This may lead to additional confusion.

Also it seems that fares per leg are currently not supported by PTE.

ialokim commented 4 years ago

Btw. how do you handle the total price display if the price for one or more legs are missing? Something like 10 + ? EUR?

As I am using the fare for the whole Trip as defined in https://github.com/schildbach/public-transport-enabler/blob/master/src/de/schildbach/pte/dto/Trip.java#L51, it won't even display a price information if there is none available for the whole trip.

grote commented 4 years ago

We should think about how to display different fare types or fares per leg, e.g. inside a DialogFragment. [...] Also it seems that fares per leg are currently not supported by PTE.

Ok, so no fares per leg? Seems like you just get a list of fares, but don't even know what leg they are for.

What are different fare types (child vs. adult, etc.?) and is it worth showing those? Or can we close this ticket?

Xinayder commented 4 years ago

I've just tested this on the Brazil network provider and it doesn't work, there's no price info for the trips. EDIT: it's a problem with Navitia, as it doesn't include fares in their aggregated GTFS feeds.

ialokim commented 4 years ago

What are different fare types (child vs. adult, etc.?) and is it worth showing those? Or can we close this ticket?

Exactly. PTE however reports an hard-coded enum field that seems not very flexible for special tickets available in some regions. Nevertheless, I think it might make sense to show this information somewhere if it is available.