jwir3 / arbitrator Goto Github PK
View Code? Open in Web Editor NEWA synchronization engine for ArbiterSports to Google Calendar
License: GNU General Public License v3.0
A synchronization engine for ArbiterSports to Google Calendar
License: GNU General Public License v3.0
Group aliases should be able to be removed by the user, especially once #25 lands. We should have a separate button for each preference UI component that allows this.
It would be really nice if a user didn't have to constantly log in and out. We might be able to save our auth token from Google into the preference store, in which case we could simply make the system login automatically with this for future calls.
We'll have to find some way of clearing it, though.
The last calendar used should be saved and restored via the preference storage mechanism (localStorage).
After #28 lands, we need to add some logic to the update mechanism that allows us to find games that are "linked" together. For example, if a two-game set is entered into Arbitrator, the second game will not have a start time with 30+ minutes ahead of it (for prep time). This is fine, but if the first game is subsequently edited to no longer be before the second game (i.e. on a different day or something), then we need to make sure that the second game has its start time adjusted.
Arbitrator right now only allows for 1 hour games. Additionally, it would be nice if arbitrator "baked in" a bit of time before the game which was configurable by the user.
We can use the QUnit.module() function to set up and tear down our necessary data structures:
We can get the locations with one of the following methods:
After removing a small bit of code that attempted to add a game twice in 8ff819b, multiple games are no longer being added to arbitrator correctly.
Right now, we have two different methods of UI design for the preference screen. One uses floats, the other does not. We should make them consistent, along with the messaging UI, to both have floats (since the time preferences need it).
Arbitrator now gives times in the description field like the following:
Game starts at 7:0pm
(i.e. truncating the last digit of the time).
Some games are described with the keyword "Tournament" in the Sport/Level notes. We should indicate this in the description, so that it's clear there aren't going to be home/away teams.
ArbiterSports allows the user to export sites as a CSV file. We could take advantage of this and allow users to upload this CSV so that all sites have location entries.
Steps to Reproduce:
Shakopee Ice Arena
.Expected Results:
Shakopee Ice Arena
, at 1255 Fuller Street S. We should have the same autocomplete entries as Google Maps.Actual Results:
Note also that the places autocomplete address form example, given here: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform (which is where this code was originally taken from) also doesn't show this as an autocomplete entry.
The snackbar message doesn't auto-dismiss itself, which is kind of annoying. It should go away after X ms.
The level parsing in arbitrator isn't really great at determining what level a particular game is scheduled at. What we should do is make it so that any level that comes up as "UNKNOWN" is sent to a database, which can then be queried by another javascript tool and we can add additional detection of levels.
For example, the following cut and paste (prior to the hack introduced in issue #3) causes issues when pasted into the UI:
1121 Showcase Referee 2 5/17/2014 Sat
1:15 PM Hockey, 2002 AAA Eden Prairie, Olympic TBA TBA $36.00
Accepted on 5/7/2014
This could be related to there being a newline between 'Sat' and '1:15 PM'.
Sometimes, organizations aren't correct (e.g. 106016 for D6). We should be able to store an alias for individual organizations, so the user doesn't have to recreate them on the fly. This should be done in cookies, though, so that it's only local to a given machine.
It would be much easier for users if they didn't have to cut and paste in order to get their schedule entered into Arbitrator. One method of accomplishing this is to make arbitrator a firefox plugin that will enable itself if on the arbitersports website.
For the most part, this works just fine. The only downside is that it's difficult to get it to authenticate with google from within the application directly. One method of making this easier would be to host an arbitrator remote API (rest endpoint) and have the plugin simply retrieve data from the website to be sent to the endpoint.
Right now, Arbitrator will add the start time (extra "getting ready" time) on to the beginning of ALL games. Games that are at the same location, separated only by a set number of minutes (another time preference), should actually have their events start at the actual game time. That is, the PRIOR_TO_START preference should only apply to the first game in a set.
We'll first need to track some locations for this to work properly, otherwise we can't be sure the games are at the same location.
Consider the following:
1121 Showcase Referee 2 5/24/2014 Sat 1:15 PM Hockey, 2002 AAA Eden Prairie, Olympic TBA TBA $36.00
For some reason, arbitrator dies on this input. This is a crash that probably needs to be looked into once we have more data about it.
There are times when a location will be given as: Vadnais Heights, 2
, or Braemar, East
. We should filter this so that we can place which Rink at a given location we're on into the comments.
The preference store UI is kind of ugly. We should make it hidden by default and brought up only when a user requests it.
We should have a list in the UI that authenticates with Google calendar, grabs the list of potential calendars, and adds the names (and possibly other data) to the list for the user to select from.
Currently, arbitrator only parses a given level block as 'Squirt' or 'Mite'. It would be nice if it parsed the level block appropriately, as in 'Squirt B' or 'Squirt A'.
There is a file, secret.json, that is used to keep things like keys and other items. From this file, we should be populating config.js, so that we can control which API key is used for which deployment (release vs. alpha).
When a game is added to the calendar, no notification is given to the user. We should change this so notifications are given.
Steps to Reproduce:
Expected Results:
Actual Results:
It would be nice if one could add group aliases BEFORE they are first encountered. Ideally, this would be some type of 'add' button under group aliases in the preferences dialog that added an empty box which could then be added to the localStorage for that group alias set.
When #40 is triggered, it's not possible to scroll down the list of preferences, because the preference box is not scrollable. When the list of preferences gets too big, it makes it impossible for the user to adjust location preferences at the bottom.
I accidentally pushed the google API key to the source tree. We should change the key so that others can't utilize it, and remove it from the code again.
Modified games in arbitrator do not update, even if the ArbitratorHash is the same for the two games. For some reason, arbitrator adds a new game.
Since the landing on #38, we don't have anything that tells us when a game is successfully added to the calendar. We need to add back this functionality.
Travis CI should be used for unit testing and continuous integration.
We have the beginnings of a module separation in arbitrator, but it's not robust enough yet. We really need to be able to implement something like requirejs in our code to encapsulate as much as possible.
Our tests currently aren't working. We should reinstate them with some type of real node-style tests, rather than the qunit tests we had before.
It would be nice if arbitrator added some type of hash to the calendar element's notes section. This way, if arbiter notices another event at the same time, it can determine if it actually put it there or not. Also, this should be a unique hash dependent on game number, organization, level, and teams (if available).
This ticket also includes the work necessary to actually update existing calendar events.
The snackbar should "minimize" itself as it's going away, using a css transition for width/height (probably cubic bezier). So, instead of making it just disappear, it should transition to a small width (say 5pxX5px or something) and THEN disappear.
Right now, we only add locations as the exact strings that are in AS. We should modify this to do the following:
The location address associated with the given name, once resolved, should be what is entered into google calendar (unless one can't be resolved for some reason, then the name should be used).
Steps to Reproduce:
Expected Results:
Actual Results:
The UIManager and PreferenceStore javascript objects can be singletons. We should be using prototype-level methods, and not instance methods on these.
We need arbitrator to be able to give us a unique hash, so that we can embed this into the final calendar events that we publish. This will enable us to determine if two events are unique in the calendar.
For starters, we can probably simply use the game number.
Something seems to have been broken in the google calendar submission process. The client submits to gcal, but it always says 'Error: End time not specified'. Also, shift-reloading doesn't initially auth to google. There might be something going on here with the document.ready() stuff.
There is no user documentation for arbitrator. We should add some to a README file. At the very least, we should have:
We should inject our version numbers, for clarity, in a grunt script. So, the build process will actually be more than just pulling code from github to a server directory. This will also set us up to use less or sass for style information.
Right now, arbitrator relies on an exact hash map of sport levels in order to parse them and place them in the Game data structure. It would be nice if an heuristic was used instead, so that for example, whether it is a Boys' or Girls' game, level of the sport (e.g. "Squirt", "Mite", etc...), and the sub-level of the sport (e.g. "Varsity", "A", "AA", etc...) were all determined independently.
Stack trace:
_.$a() js:33
_.Ab() js:38
Zy() js:124
[49]</LocationService.prototype.enableAutoCompleteForElement/<() index.js:17455
[38]</</GoogleMapsLoader.load() index.js:6867
[49]</LocationService.prototype.enableAutoCompleteForElement() index.js:17454
[53]</UIManager.prototype.addLocationPreference/<() index.js:18007
[39]</</jQuery.Callbacks/fire() index.js:10116
[39]</</jQuery.Callbacks/self.fireWith() index.js:10228
done() index.js:15281
[39]</</</<.send/callback/<() index.js:15622
When a set of games is submitted in arbitrator, it moves the back stack. Instead of this, the text field should be cleared, a message displayed to the user, and perhaps an 'undo' option should be available.
We need a method on Arbitrator's prototype that has the following signature:
function addToGoogleCalendar(aCalendar);
This method should be able to:
Our user interface is kind of clunky right now (maybe really clunky). If possible, it would be nice if we could make it into a more smooth experience for the user, possibly with some type of Material-esque design, like Google's pages have.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.