-
Notifications
You must be signed in to change notification settings - Fork 40
Split station type and transfer auto-update into independent functions #1235
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: langonginc <[email protected]>
Co-authored-by: langonginc <[email protected]>
…rity Co-authored-by: langonginc <[email protected]>
langonginc
left a comment
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.
Also auto set transfer information when putting a new station on to the canvas
|
@copilot Also auto set transfer information when putting a new station on to the canvas |
…ction Co-authored-by: langonginc <[email protected]>
Done. Added call to |
|
@copilot Split checkAndChangeStationIntType into two independent parts, where one can automatically change station type depending on the line themes, and the other can fill the transfer information automatically based on the line themes. You must make the two function can be called independently, that is I may need to call one of them individually. |
- Added autoUpdateStationType: automatically updates station type based on line colors - Added autoPopulateTransfer: automatically populates transfer info based on line colors - Both functions can be called independently - checkAndChangeStationIntType now acts as a wrapper calling both functions - Replaced hardcoded station type list with dynamic checking via supportsTransferProperty - Added comprehensive documentation for InterchangeInfo structure - Extracted getStationLineColors helper to avoid code duplication Co-authored-by: langonginc <[email protected]>
Done. Split into two independent functions in commit c318b11:
Both can be called independently and return a boolean indicating success. The original Also addressed:
|
- Added tests demonstrating autoUpdateStationType can be called independently - Added tests demonstrating autoPopulateTransfer can be called independently - Verified that each function works correctly when called separately - All 6 tests pass Co-authored-by: langonginc <[email protected]>
thekingofcity
left a comment
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
Split
checkAndChangeStationIntTypeinto two independent functions that can be called separately or together, addressing feedback to separate type changes from transfer information updates.New Functions
autoUpdateStationType(graph, station)autoPopulateTransfer(graph, station)checkAndChangeStationIntType(graph, station)(wrapper)Changes
InterchangeInfostructure:getStationLineColorshelper to avoid duplicationExample
Tests
Added 6 test cases covering:
autoUpdateStationTypeautoPopulateTransferTechnical Details
supportsTransferPropertynow dynamically checks if station attributes have atransferpropertyScreenshot
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.