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

DT-6175 part 4 #4937

Merged
merged 44 commits into from
Feb 1, 2024
Merged

DT-6175 part 4 #4937

merged 44 commits into from
Feb 1, 2024

Conversation

vesameskanen
Copy link
Member

@vesameskanen vesameskanen commented Jan 26, 2024

  • Refactor Itinerary page jsx rendering by using shared code blocks, don't repeat same code again and again
  • Remove duplicate query
  • Shared wrapper for detail view
  • Correct spinners while loading
  • Correct notifiers and error messages
  • Refactor planParamUtil and settings management
  • Simplify
  • Remove annoying ticket name comments from code

@vesameskanen vesameskanen marked this pull request as draft January 26, 2024 16:32
- add basic loading state because root props.loading sets lazily in refetch
- define driving and biking props correctly for notifiers
@vesameskanen vesameskanen marked this pull request as ready for review January 29, 2024 13:56
Comment on lines 262 to 263
// show 6 bike + transit itineraries, preferably 3 of both kind.
// If there is not enough of a kind, take more from the other kind
Copy link
Member

Choose a reason for hiding this comment

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

Why is this removed now?

Copy link
Member Author

Choose a reason for hiding this comment

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

Strange. Must be some git merge thing. Restored now.

Comment on lines 475 to 468
this.setState({
loadingMore: reversed ? spinnerPosition.bottom : spinnerPosition.top,
});
this.showScreenreaderLoadingAlert();
this.setState({ loadingMore: reversed ? 'bottom' : 'top' });
Copy link
Member

Choose a reason for hiding this comment

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

Why do we go back to hardcoding strings here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as above. A bit worrying. Restored.

app/component/ItineraryPage.js Show resolved Hide resolved
app/component/ItineraryPage.js Show resolved Hide resolved
@@ -358,6 +360,8 @@ export function checkDayNight(iconId, timem, lat, lon) {
return iconId;
}

const streetLegModes = ['WALK', 'BICYCLE', 'CAR', 'SCOOTER'];
Copy link
Member

Choose a reason for hiding this comment

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

Spelling of these static helper variables could be STREET_LEG_MODES but not that important.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@optionsome optionsome merged commit 1d9febc into v3 Feb 1, 2024
6 checks passed
@optionsome optionsome deleted the DT-6175-4 branch February 1, 2024 13:02
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