Skip to content

Comments

refactor: Simplify transportMode#696

Open
strandlie wants to merge 5 commits intomainfrom
strandlie/fix-transport-mode
Open

refactor: Simplify transportMode#696
strandlie wants to merge 5 commits intomainfrom
strandlie/fix-transport-mode

Conversation

@strandlie
Copy link
Contributor

@strandlie strandlie commented Feb 11, 2026

So... Planner web has had the issue that transportMode types are confusing, and there also has been a lot of gymnastics like leg.transportSubmode ? [transportSubmode] : undefined.

The problem:

Every single one of the differently coloured shapes in this image represents a distinct implementation of TransportMode in planner-web from before, and how they did (or did not) overlap

The fix:

This is the new simplified model that this PR introduces

We don't get away from having more than one type, since what is used in the query (graphql) and filters (config-specs) are different, but I think this is a lot better.

Also, we (with one tiny exception, that I found another solution for) never used more than one transportSubMode at a time, so always having that as an array made no sense.

@vercel
Copy link

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
planner-web Ready Ready Preview, Comment Feb 11, 2026 2:53pm

Request Review

@strandlie strandlie force-pushed the strandlie/fix-transport-mode branch from 4e2420b to 927a2df Compare February 11, 2026 13:50
Copy link
Member

@reidzeibel reidzeibel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty!

serviceKey: string,
required: boolean = false,
): string => {
console.log('Getting service URL for env', getEnv());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray console log hahaha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants