HSLdevcom / digitransit-ui

Digitransit UI ("Reittiopas.fi")
https://www.reittiopas.fi/
Other
237 stars 130 forks source link

DT-6297 use latest graphql queries everywhere #4993

Closed vesameskanen closed 2 months ago

vesameskanen commented 2 months ago

This PR removes all references to deprecated graphQL fields. Especially:

Changes also include component refactoring and misc bug fixes. Lots of repeating code removed.

Itinerary page related components no longer use moment library and the component tree is now collected into a single 'itinerary' folder.

After this PR, linter gives one warning : UI is already using the new PlanConnection.

vesameskanen commented 2 months ago

Listed bugs and some more fixed.

vesameskanen commented 2 months ago

Added also logic for stopping slow searches.

There is still a question if search iteration should be stopped if response contains an error message. For example, short walk search takes a long time because walking filters away all transit itineraries. Query is repeated 4 times, every time with poor results. Error code is WALKING_BETTER_THAN_TRANSIT.

optionsome commented 2 months ago

We still need to do something about the backwards compatibility of parking pages and the issue with alert not showing on stops near you buttons seems to persists (can be tested with matka config, although might also be that somehow I'm using wrong package version). Otherwise looks like the issues were fixed and found no new issues.

vesameskanen commented 2 months ago

I seem to get same alert triangles in stopsnearyou buttons in opas.matka.fi and this branch. Backward compatibility of park links: it is not difficult but requires a bit ugly hsl specific configuration. I wonder if such links exist in reality, and we should take the effort.