Skip to content

Adding a speed segment map to speed page#1045

Draft
devinmatte wants to merge 3 commits into
mainfrom
speed-segment-map
Draft

Adding a speed segment map to speed page#1045
devinmatte wants to merge 3 commits into
mainfrom
speed-segment-map

Conversation

@devinmatte

@devinmatte devinmatte commented Feb 27, 2025

Copy link
Copy Markdown
Member

Motivation

Changes

Screenshot 2025-02-26 at 9 28 02 PM

Screenshot 2025-02-26 at 10 11 23 PM

Testing Instructions

@github-actions github-actions Bot added backend Change to backend code frontend Change to frontend code labels Feb 27, 2025
Comment on lines +33 to +39
export const filterActiveElements = <T extends Record<string, unknown>>(
records: T[],
targetLine: LineShort,
targetDate: Date,
getRecordDateRange: (t: T) => [Date, Date],
getRecordLine: (t: T) => LineShort
) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Too many parameters (5). Maximum allowed is 4. (...read more)

Having too many parameters can make your code hard to read. The parameters must be used in appropriate order. Forgetting the order of parameters can cause mistakes.

Too many parameters is a code smell. You should refactor your code in smaller reusable bits. While it may be valid to require more than four parameters, you should use object destructuring.

View in Datadog  Leave us feedback  Documentation

Comment thread modules/speed/map/SegmentSpeedLabel.tsx
Comment thread modules/speed/map/SegmentSpeedLabel.tsx
Comment thread modules/speed/map/SegmentSpeedMap.tsx Outdated
Comment on lines +52 to +60
// TODO: Pull from dynamo calculated hourly in data-ingestion
const speedData = TEST_DATA.map((data) => {
const intervalDistance = getStationDistance(data.from_id, data.to_id);

return {
...data,
speed: convertSecondsToMph(data.travel_time, intervalDistance),
};
});

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do not merge until this is pulling from real data

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Real data relies on https://github.com/transitmatters/slow-zones/pull/65 first getting merged

@devinmatte devinmatte self-assigned this Feb 27, 2025
@rudiejd rudiejd marked this pull request as ready for review June 3, 2025 23:16
@rudiejd rudiejd marked this pull request as draft June 3, 2025 23:16
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity within 180 days.

@github-actions github-actions Bot added the stale label Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Change to backend code frontend Change to frontend code stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant