FIRSTTeam102 / scoutradioz

Scoutradioz, a multi-team FRC scouting app developed by The Gearheads. Designed for and running on Amazon Web Services.
https://scoutradioz.com
Other
25 stars 8 forks source link

Remove order From JSON Schema #123

Closed AlexKempen closed 1 year ago

AlexKempen commented 1 year ago

Resolves #122 by removing the need for users to define the "order" key value pair in their JSON. Instead, the order is automatically injecting into the JSON data received from the website before the post request to the database is generated. Front end validation code is also updated to no longer check for this property.

I don't have everything building on my local machine yet, so I wasn't able to actually run this code, so please actually test before pushing to live.

AlexKempen commented 1 year ago

I built the code on my local machine and fixed the issue with the injected order keys being displayed back to the user.

Note this change replaces all keys with the order specified by the user via the array, so any existing schemas which use the order keys to specify an order different from the array order will be broken by this update. We could look at adding code to detect this case and resolve it if desired.

JL102 commented 1 year ago

Nice work. As the layout is already sorted by order before it's sent to the client, we don't need to worry about the order being overwritten.