iceportal-api
iceportal-api copied to clipboard
Color progress bar based on delay
I found it hard to understand whether the train was on time or not, just by taking a quick glance at the program output. The red color would make me feel uneasy, as I generally associate it with warning signals; I constantly thought we're late, heh.
To mitigate that, I thought about making the progress bar green when the train is on time and red when it is not. What do you think about that change?
P.S. testing this live from a train. 😆 There are no tests for the view right now, but I could try to add one if needed.
Hi! Thanks for creating this PR - I'm suprised somebody is actually using this :^)
I chose the red color mostly because I wanted to match the official UI of the iceportal.
But I get that it can be confusing, so maybe it makes sense to add come kind of config option to this? maybe something like a color scheme option in a config file. What do you think of this? If you like it, we can either create a new issue for it or discuss on how it's best implemented.
Makes total sense!
I'm not sure if a single config option is enough to warrant an entire config file. If more settings will be added in the future, it might be reasonable, though.
Alternatively, it could just be a CLI option for now, e.g. --theme portal
and --theme delay
. It's easy to support config files in the future. Just an idea. 😉
That sounds reasonable to me - do you want to update the PR with this? I guess https://github.com/spf13/pflag would be a good choice :)
Sure, I've updated this PR. Let me know if I should make any adjustments.