-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: extend line filtering to support nfk #261
Conversation
…en needed. Also updated endpoint to map correctly between public code and number of lines.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/page-modules/assistant/server/journey-planner/validators.ts
Outdated
Show resolved
Hide resolved
Let's have a huddle about this tomorrow, easier to point and explain various ideas instead of having several comments trying to convey the same information but resulting in potential misunderstandings. I put together some of the thoughts in this commit, so we can have a look at that together: c24f555 |
I think a very quick win would be to use https://www.downshift-js.com/use-multiple-selection here. |
Expanding line filtering to use useMultipleSelection can perhaps be a separate task? This PR is getting pretty big already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Tested and works as expected, adding lines when they are entered and removing them when removed, after the debounce set to 750ms passes.
I reckon that this feature will be worked on to possibly implement the multiple selection that we talked about. Would be nice to have some tests for this then.
Closes https://github.com/AtB-AS/kundevendt/issues/17072
Background
Hanne found an issue with the line filter for NFK: https://github.com/AtB-AS/kundevendt/issues/17037#issuecomment-1963487733
The planner web filters lines by ID. For FRAM and AtB this works as line ID = line number (aka publicCode in Journey Planner API). Customers can therefore search by line number.
This is not the case for NFK. For example do line 1, 2 and 200 in Bodø have line ID 8001, 8002 and 8200. Also, some lines have the same line number, but different line IDs. For example:
Illustrations
screenshots/video/figma
Proposed solution
In the proposed solution, all lines are fetched at the initial render of the line-filter component. Then, when a valid line number is written in the line filter component, any corresponding line id is included to the line whitelist of the trip search.
Acceptance Criteria
Test input
Trip suggestions for testing.