GithubHelp home page GithubHelp logo

lrem / ladders Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 171 KB

Track games in custom ranked ladders

License: MIT License

Python 34.91% HTML 19.49% TypeScript 38.67% CSS 4.16% JavaScript 1.77% Shell 1.00%

ladders's People

Contributors

lrem avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ladders's Issues

Privacy policy

Sign in with Google requires one. The idea is: we store no PII, so there's not much to care about.

Frontend branding

It would be nice to have something more creative than angular logo as fav, with a glorious title saying just "Web"...

Clear history on deletion.

Deleting a match makes the next recalculate raise:

sqlite3.IntegrityError: UNIQUE constraint failed: history.player, history.ladder, history.timestamp

Analytics

It would be nice to have analytics about how people use the thing.

Display player details

The list view displays only skill rating. A detailed view for a player could give more insight:

  • number of games on record
  • number of wins and losses
  • recent matches filtered for the player
  • historical ranking plot (depends on #23)

Make favicon pixel-perfect

Make each line align perfectly with the 32-pixel grid. This will make the icons used by browsers sharper.

Way to set game size in the UI

The backend already supports arbitrary team shapes and many interesting games are not duels. We need to have the UI allow games with more players. Some ideas:

  • The dialog can always display a NxM grid, if the teams are uneven it can accept a blank space.
  • Game shapes probably won't differ much within a league, so keeping at least the defaults in the database sounds like a good idea.
  • For extra flexibility, we can have a way to extend the grid from within the dialog.

A way to express draw

Currently we ask for draw probability at ladder setup, but then offer no way to express the draw when reporting a game. We do need a way to express draws. But before we get that implemented, it would be nice to not show that table row and just assume zero.

URL scheme is not semantically clear.

Current URL scheme is unclear, inconsistent and will, especially when both front- and back-end are served from same domain, require quite some special casing.

Deployment configuration

Currently, everything is in a hard-coded debug mode. We need to turn that off for production and prepare tooling to make deployment a no-brainer.

Keep rating history

It won't hurt to store players' skill ratings over the history. As a bonus, it will allow faster recalculation after removing a past match.

Finder should not navigate to bogus ladders.

Currently the finder component on the landing page simply navigates to given name, even if such a ladder does not exist. We should instead only show a warning that the name is wrong.

More comprehensive ACL support

Currently we only have one owner per ladder, who can change settings and delete bogus matches, and everyone can view and add matches. It might be beneficial to have tiers of owners, deleters, adders and viewers, with an ability to specify which tier everyone gets.

Add deletion to e2e.

Match deletion, while not part of the regular happy flow, is still a critical functionality. It definitely should be tested.

Add support for *flawless victory*.

The most popular ladder so far has instituted a rule that a flawless victory (10:0 score) counts double. So, they enter such a match twice. It would be way more elegant if that was explicitly supported instead.

Show older matches.

The matches view started getting laggy for the big ladder, so I limited it to 20 most recent matches. Now, there is value in seeing old history. To that end, The UI should allow:

  • Extending the set of matches shown to a large but still responsive number (100?).
  • Cycling to older matches.

Tell user to sign on before ladder setup

Currently the call to action from landing page takes the user directly to ladder setup form. After filling the form and clocking create, a terse error message suggests the name may be already in use. For any name attempted. The actual cause: the user is not signed in. Which will always be the case, as the only mention of signing on is hidden in the hamburger menu.

Reduce javascript size.

The app itself is tens of kilobytes, while vendor.js sits at 1.3M. It might be possible to shave some of that, especially around rxjs,

More friendly headers in game reporting dialog

Right now the game dialog asks for zero-indexed teams. It would be much nicer to ask for "Winner(s), 2nd place, 3rd place, ...". Even better, add special cases (relevant after fixing #4):

  • only pluralize "Winners" if game allows multiple people per team,
  • if there are only 2 teams, name the second one "Loser(s)".

A way to add users to ACLs

We need a way to add users to owners of a ladder and to the additional tiers requested in #2. Ideas how this might work:

  1. Add a dialog displaying the user id (number from Google sign in) and a for allowing the owner to add the user. This would require separate messaging to pass the number.
  2. Also display a qr code and allow scanning it, using e.g. html5-qrcode. This allows in-person transfer with mobile.
  3. Change the user id to be based on email (obtainable with the Google sign in). Humans can deal with email, but then we're storing otherwise unwanted personal information.
  4. Add a user-selected username. This is easy to transfer and might be a good idea if we want a reasonable way to remove someone from ACL.

Landing page, user facing documentation

There should be a landing page at / that describes what the whole thing is about and how to get started. There might be need for little extra pieces of explanation around the place.

Player-ladder should not be 1:1

The current database schema wrongly assumes that a player of a given name (primary key) will only ever belong to a single ladder. This should be fixed either by introducing an integer primary or by making the primary key use both player and ladder name.

Unify fonts

The fonts, thus far, are only specified for the footer. For some reason this means that every other element ends up with a different font face, style, size and whatnot. The whole thing definitely would look way better if there was a single font used throughout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.