Code Monkey home page Code Monkey logo

Comments (6)

f03el avatar f03el commented on July 17, 2024

@mikwebdev Thank you for reporting this. I'll have a look at it ASAP.

from fahrplan.

mikwebdev avatar mikwebdev commented on July 17, 2024

@f03el Thank you. Much appreciated as I still use Fahrplan on my Nokia N9 regularly.

from fahrplan.

f03el avatar f03el commented on July 17, 2024

The reply from the server is just an empty JSON object (i.e. {}) when the direction station is not part of any route from the departure station. Would it make more sense to just show an empty result list instead of the error message?

from fahrplan.

mikwebdev avatar mikwebdev commented on July 17, 2024

Yes, an empty result list is much better than an loading squircle and error message.

With constant loading squircle and error message it gives the impression that something is technically wrong. Maybe change error message to something like "No departures found." or "No results found." and stop the loading squircle?

I have attached an error message from rejseplanen.dk. Maybe do something similar?

For example:
Sweden (resrobot.se) replied:
"No departures found to that direction."
or
Sweden (resrobot.se) replied:
"No results found."

2018-12-11_22-12-40

from fahrplan.

f03el avatar f03el commented on July 17, 2024

OK, I think an empty result list is the only possible solution in this case. There is no way we can know whether the reply is empty just because there simply are no departures from that station at the time, or because the user has selected a "bad" combination of station and direction. If you want to test a bus stop with no departures, try "Granträskvägen (Lycksele kn)" in the weekend. :)

The backend only has the options to either return a list of departures (special case: empty list), or throw an exception, which shows an error message (in the N9 case with a loading circle). The loading circle is nothing the backend controls. On Sailfish OS there is no indicator or similar in this case. It just shows the error message.

from fahrplan.

mikwebdev avatar mikwebdev commented on July 17, 2024

Ok, I understand. I'm fine with an empty list, as long as loading squircle and error message doesn't show.

from fahrplan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.