Skip to content

Whats New 2

Liam Fruzyna edited this page Jan 27, 2024 · 1 revision

What's New in WildRank 2

I know I've said this time and time again, but the 2023 FRC season was a huge success for WildRank. While it certainly had its flaws this incarnation of WildRank significantly improved the WildStang Robotics Program's scouting efforts. Speaking of those flaws... we also learned a lot about what a scouting app should and needs to be. I had an ambitious to do list for WildRank 2, but we actually managed to achieve almost everything. So let's get into what's new:

If it ain't broke, but kinda jank, fix it

The demands of in-person scouting and live alliance selection quickly taught us that WildRank had a lot of ground to make up in the performance and stability categories. These lessons resulted in the single biggest change, the Data Abstraction Layer (DAL). The DAL is a single object that handles all data that goes through the app. On page load it reads in all available results -both pit and match-, pick lists, and stored data from TBA. Then it computes summary stats and smart stats for each team. Doing this on page load does slightly slow down page load times, but pre-loading and calculating all this entirely removes the need for many redundant calculations during interaction with complex pages like the Pivot Table and Result Viewer. Plus, pulling in all this data into the same place allows brand new kinds of data to be compared like number of wheels, driver rating, and ranking score all in the same page or even smart stat. On top of that the DAL provides convenience functions for all kinds of regular data access that significantly reduced the amount of redundant code around the app.

This rewrite inspired a few others. The next biggest was the Config layer. Instead of reading from localStorage to check simple configuration options, settings and game configurations are also loaded in on page load. This allows quick access to these options without long complex calls. Finally, the Input generators were also rewritten to be classes instead of functions to help clean up function calls and allow more complex configurations. The most notable being that column based input (multicounters, selects, etc.) now dynamically decide how many columns will be used.

Offline and PWA Support

The biggest time sink at events last season was solving issues relating to the app failing while offline. Unfortunately, Apple has very poor (but improving) support of PWAs and web standards in general, especially on iPads. There was still room to improve on our end though.

First, a new Cache Manager page was created. I love this page but it's meant for experts. The Cache Manager lists in detail, which caches are created for the app, what files they contain, how big those files are, and even provides a hash of each file, as well as, the combined cache. This is extremely useful for debugging why a page is failing or out of date. A reset cache button was added to the admin role in this update which is nice if you want to completely purge the app without affecting data, but the Cache Manager provides buttons to purge each cache individually. Finally, and likely most critical for in-person scouting is the "Update App from Zip" button. Using this button the app's cache can be manually populated using a zip archive of the application entirely offline. This does of course require at minimum the cache manager page to be available, but it could be a life-saver when an iPad randomly decides to drop some files from the cache.

I mentioned that there was still room to improve and that is on the PWA front. I dove deep into the PWA documentation on the wonderful MDN this offseason and learned about the many interesting features WildRank did not support. First, our icons were not great, so I generated a whole new set so hopefully it looks at least ok on every device. Second, I added support for rich install screens. These screens feature screenshots and descriptions about the app, just like in an app store. New app shortcuts were also added to get to WildRank from the operating system. PWA shortcuts allow the OS the provide additional icons to -in our case- Pit, Match, and Note scouting screens. Finally, a new share target allows users to use the OS level share menu to share zip files to WildRank. After doing so they can find a new import from cache option to pull this zip file into the app.

Online Features

The original goal of WildRank was to build a completely offline scouting app, and I think we've done a pretty good job. But, sometimes you are online and want to take advantage of that. Server transfers have been significantly improved and now also feature passwords to prevent random users from uploading to your server. These passwords are also used for the new inter-server export feature which allows one server to send its uploaded files to another.

Each server will now send some very basic information about itself to the demo instance for metric collection, if you aren't comfortable with this it can be turned off with the REPORT global in the new server. Speaking of which, there is a brand new server! Using FastAPI the Python server is not much easier to read, run, and configure. Plus using a real web server like Uvicorn means it can handle a way more clients than before. This new server can still be run on the command line or deployed via a provided docker image which also has some updates of it's own.

Docker Updates

The image build process has been improved both internally and externally. Most notably, using the build-arg "GIT_TAG" the docker image can be built using any tag in Git. Also, when run an environment variable "WR_WORKERS" can control the number of workers deployed by the server.

Pictures

One primary feature of WildRank Android that the new WildRank did not provide was image support. During development I had decided that images were just too hard while maintaining an offline app, but using the knowledge gained from developing the Cache Manager, pictures were added to WildRank 2. In fact, two kinds of pictures were added. First, the DAL will catalog any compatible images posted to TBA. Second, a pit scouter is now greeted with a camera preview while selecting teams which can be used to add their own close up pictures. These pictures are appropriately named and uploaded to the server if available. If not available, the images will be cached until they can be uploaded later. These pictures are used in many places, but most importantly by carousels in scouting match/pit selection screens. Our goal is to reduce time the scouter spends looking for their robot. These images are not cached by default, because not everyone will need them while offline, but the cache manager page provides a button to store them all to the cache and they can be exported like any other data.

Scouting

For the most part we were very happy with the scouter experience but a few minor improvements were made. The biggest being that scouting pages are now actually pages. A simple scroll-able carousel allows a scouter to either swipe between pages or use arrow keys to navigate. We also used this functionality to help improve our data quality. The "Submit" button is not provided until the scouter reaches the last page, to help prevent early submissions. Plus, if that scouter got distracted during the match or has a hunch their data may contain an error an "Unsure of Results" check box allows them to flag that result as needing a second look. This highlights the result in the result viewer so a strategy team member can review the match later.

A few new options were created for strategy teams designing interfaces. The multiselect box is select boxes meets check boxes. Functionally it is several check boxes, but it takes up half as much space and helps show scouters that the data points are related. These multiselects and normal selects can have custom colors applied to their options. Cycles also have had a few small updates including a new custom cycler input which makes going back and forth through cycles much more clear than the previous counter that was used.

New templating options in scouting inputs allow scouting pages to be dynamically populated with team numbers. In most input names and options opponentX or partnerX (replacing X with a number 1-3) can be used to automatically fill in an opponent or partner team number while scouting. (This stores in results using the template text not the filled in team number.)

When using the updated config builder a new "Disallow Default" option can be used to prevent a scouter from submitting the default value. We use this to help improve our data quality for post match data like driver skill. Last year we collected driver skill ratings from 1 to 5 with a default of 3. But when we came across 3s we were unsure if the scouter actually rated them a 3 or if they forgot to change the value. Now using disallow default and a default value of 0, the app will display a warning if the user tries to submit a 0, cancels the submission, and highlights the input in question.

Event Prep

In our preparation for last seasons offseason events and this year's regionals several new pages were created. The Event Planner extras page uses user entered criteria to list available competitions for the next season. The event generator now intelligently spreads out teams to generate realistic schedules. A new Scouter Scheduler page is a basic page for designing scouting shifts based on the number of scouters available and per shift, and the length of the shifts. The Schedule Importer allows the match table from an official schedule PDF to be copy-pasted into the interface to extract both attending teams and the match schedule, before TBA has the data. Lastly, if you have trouble with scouters selecting the wrong team to be scouted the scouting position can be hard-set per user in the new user configuration which also allows scouters to have names and admin access configured.

New Smart Stats

The sum stat has been replaced with the math stat which allows any JavaScript math operations be applied to any combination of stats -result, pit, and TBA. New min and max stats are the first to return a string of the stat that is the lowest for each team. The new filter stat allows one result to be filtered by that of another result.

New Analysis Pages

Several new analysis pages were created. A cycle viewer was created to cleanly view every cycle in each result. A scatter plot page helps a user plot two stats against each other. And the coach viewer can now have its values edited from a new page. The picklists page has been revamped to show all the pick lists at once.

Other Features

  • 2023 configuration and assets
  • The homepage has been updated to be more approachable
  • Mini-picklists hide when there aren't any pick lists
  • Link handling has been rewritten to be more reliable
  • The number of columns in selects are now configurable and automatically scale
  • Page load is faster and more stable
  • Pick lists can now be renamed
  • Improve configuration validation
  • Colors can be extracted from each teams' avatars
  • A number element can be used to display a number
  • Various keyboard shortcuts
  • Automatic -operating system based- dark mode
  • External link buttons open links in a new tab
  • Team names have been added alongside numbers in many places
  • The Settings Editor provides a link to get TBA API keys
  • Metadata can be shown/hidden in results

Afterthoughts

We decided in literally the last week before publishing the first 2.0 release candidate that notes would be re-implemented into the app. But instead of a text only format, notes would be a alliance-wide scouting interface. Functionally, notes works the same as any other scouting page. An interface can be designed in the configuration builder and users in the note taker role can select a match to begin note scouting. An alliance is assigned based off the scouting position. When scouting alliances it is expected that there is only 1 page with 2 columns. The first column will be duplicated for every team in the alliance and the second column will be displayed once. Each column can have the keywords "TEAM" and "ALLIANCE" which while scouting are replaced with the appropriate team number or alliance color. Once submitted, the results are stored separately in localStorage, but on load the DAL stores the notes alongside the match results so all existing pages will be able to handle that data just as it does match results.

What's Next

Compared to last year WildRank feels almost complete, next years improvements will likely be quality of life tweaks. First, while the input subsystem came a long way this year, there is still a lot of room to improve. I plan to remove as much hard coded HTML from the JavaScript as possible. Second, there is still some redundant code that could be consolidated into the DAL or Config systems. Third, ease of use. The app is large enough that it needs some real hand holding to get started. I would like to both significantly improve the documentation on how to operate the app and smooth out the many rough edges withing the app.

But, that's all for the offseason and our focus is on the Charged Up competition season. This year both WildStang Robotics Program Teams, WildStang and Plus One, will be represented at the Midwest and Seven Rivers Regionals and you can count on us using WildRank there to try to get both teams to Houston in April! Like last year, we will be posting our data to 2023_scouting_data. If all goes according to plan data will be uploaded regularly throughout the events; if not we'll upload by the end of the weekend.