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

fix: OperatorSelector inconsistencies, operator filter bugs #522

Merged
merged 4 commits into from
Mar 9, 2024

Conversation

Haswell-s
Copy link
Collaborator

@Haswell-s Haswell-s commented Feb 24, 2024

#401

Description

Consistency delivered, some old code was adjusted and logic simplified.
@NoamGaash Please have a look if things look fine, ready to merge!

Result

Screen.Recording.2024-02-24.at.13.19.13.mov

- remove redundant type explicitness
- replace `operator_whitelist` with `MAJOR_OPERATORS` (single source of truth)
- if an operator is selected, filter for it instead
- move responsibility of filtering `MAJOR_OPERATORS` from `LineHbarChart` to `WorstLinesChart` (since it already filters for operatorId)
- unify filtering (filter everywhere by id)
- add `operator_whitelist` value as a comment to `MAJOR_OPERATORS`
@NoamGaash
Copy link
Member

NoamGaash commented Feb 25, 2024

Thanks! I'll dive into it tomorrow 🙏

Copy link
Member

@NoamGaash NoamGaash left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks

const response = await fetch(`${BASE_PATH}/gtfs_agencies/list`)
json = await response.json()
const data = (await response.json()) as Awaited<Agency[]>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const data = (await response.json()) as Awaited<Agency[]>
const data = (await response.json()) as Agency[]

@NoamGaash NoamGaash merged commit 024a34b into hasadna:main Mar 9, 2024
18 checks passed
@Haswell-s Haswell-s deleted the operator-selector-filter branch March 13, 2024 15:15
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