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

Add full ISO times and colours to debug UI #6077

Merged

Conversation

leonardehrenfried
Copy link
Member

Summary

This is a quality of life improvement for the debug UI:

  • adds the full ISO date time to the title property, so it shows up on hover
  • uses the line's colours when visualising legs and their geometries

Screenshot from 2024-09-19 09-50-53

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.78%. Comparing base (b108104) to head (1ad8d95).
Report is 7 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6077      +/-   ##
=============================================
- Coverage      69.78%   69.78%   -0.01%     
+ Complexity     17357    17355       -2     
=============================================
  Files           1962     1962              
  Lines          74357    74357              
  Branches        7623     7623              
=============================================
- Hits           51893    51892       -1     
  Misses         19820    19820              
- Partials        2644     2645       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonardehrenfried leonardehrenfried added this to the 2.7 (next release) milestone Sep 19, 2024
@t2gran
Copy link
Member

t2gran commented Sep 19, 2024

I noticed that the colors in the new Debug UI is in the same color palate as the OSM map - this is hard to "read" since it is little contrast. Should we do something about that? I think I can get a designer/UI person to look at this if intresting.

@leonardehrenfried
Copy link
Member Author

leonardehrenfried commented Sep 19, 2024

Those colours are easy to change:

image

export const getColorForMode = function (mode: Mode) {
if (mode === Mode.Foot) return '#191616';
if (mode === Mode.Bicycle) return '#5076D9';
if (mode === Mode.Scooter) return '#253664';
if (mode === Mode.Car) return '#7e7e7e';
if (mode === Mode.Rail) return '#86BF8B';
if (mode === Mode.Coach) return '#25642A';
if (mode === Mode.Metro) return '#D9B250';
if (mode === Mode.Bus) return '#25642A';
if (mode === Mode.Tram) return '#D9B250';
if (mode === Mode.Trolleybus) return '#25642A';
if (mode === Mode.Water) return '#81304C';
if (mode === Mode.Air) return '#81304C';
if (mode === Mode.Cableway) return '#81304C';
if (mode === Mode.Funicular) return '#81304C';
if (mode === Mode.Monorail) return '#81304C';
if (mode === Mode.Taxi) return '#81304C';
return '#aaa';
};

@t2gran
Copy link
Member

t2gran commented Sep 19, 2024

Her are a few examples:

Skjermbilde 2024-09-19 kl  17 04 08

Skjermbilde 2024-09-19 kl  17 02 15

I will see if I can find a person to look into doing this with some UI design skills.

@leonardehrenfried
Copy link
Member Author

One solution could also be to use a low-contrast background map.

@testower
Copy link
Contributor

Do you want to explore the color palette further before merging this PR? I think you'll have a hard time finding a color palette that works well on top of this background map as @leonardehrenfried pointed out.

@leonardehrenfried leonardehrenfried merged commit 83849e8 into opentripplanner:dev-2.x Sep 20, 2024
6 checks passed
@leonardehrenfried
Copy link
Member Author

I don't want to work on the colour palette and will do it in the next PR. We are now back to reading the colours from the transit data and will have to evaluate if that is better or worse.

Another option would be to give the lines an outline.

@leonardehrenfried leonardehrenfried deleted the debug-times-colors branch September 20, 2024 07:45
@leonardehrenfried
Copy link
Member Author

leonardehrenfried commented Sep 20, 2024

On the other hand it explains why the fallback colours in the old debug UI were so garish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OTP Debug UI The OTP bundled client Skip Changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants