feat: Auto choose team from robot and match number#113
Open
ianonavy wants to merge 1 commit intoFRC2713:mainfrom
Open
feat: Auto choose team from robot and match number#113ianonavy wants to merge 1 commit intoFRC2713:mainfrom
ianonavy wants to merge 1 commit intoFRC2713:mainfrom
Conversation
See !108 for the original version of this feature. This PR adds a new field type TBA-assigned-station and updates the default config to include the new field. We update the schema for TBA-team-and-robot robotPosition to be constrained to the values generated by the current TBATeamAndRobotInput, which is descended from the "Robot" field from previous year's default config. These values are not end user configurable, so this should not break any preexisting configs. I also added a new pattern for defaulting choices for types that extend select, including the labels. The gen schema script was not working for me, so I switched it to npx tsx. If you'd prefer I keep that in a separate PR, happy to do that. There was some preexisting drift in the schema relating to "year" that I decided to leave in. I can also revert that if it's an issue. Testing methodology: 1. Reset to default config 2. Edit config to change to a team that attended a week 0 event (e.g. 3467) 3. Prefill match data from a past event 4. Select an assigned station; observe the Team and Robot is auto-selected 5. Update the match number; observe the same Robot and new Team is auto-selected
tytremblay
approved these changes
Mar 10, 2026
Collaborator
tytremblay
left a comment
There was a problem hiding this comment.
Nice PR! Code looks clean, description and video are very helpful. Thanks for contributing!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #108 for the original version of this feature. This PR adds a new field type TBA-assigned-station and updates the default config to include the new field.
We update the schema for TBA-team-and-robot robotPosition to be constrained to the values generated by the current TBATeamAndRobotInput, which is descended from the "Robot" field from previous year's default config. These values are not end user configurable, so this should not break any preexisting configs.
I also added a new pattern for defaulting choices for types that extend select, including the labels. The gen schema script was not working for me, so I switched it to npx tsx. If you'd prefer I keep that in a separate PR, happy to do that.
There was some preexisting drift in the schema relating to "year" that I decided to leave in. I can also revert that if it's an issue.
Testing methodology:
AssignedStationDemo.mp4