Giter Site home page Giter Site logo

glacials / whatsinstandard Goto Github PK

View Code? Open in Web Editor NEW
129.0 12.0 34.0 155.56 MB

a Magic: The Gathering format reference

Home Page: https://whatsinstandard.com

License: MIT License

CSS 2.11% HTML 6.29% JavaScript 30.69% Ruby 2.19% Swift 1.04% Objective-C 0.03% Dart 19.13% CMake 6.71% C++ 16.69% C 0.60% Vue 14.52%
magic-the-gathering mtg

whatsinstandard's Introduction

What's in Standard?

What's in Standard? is a simple reference to help Magic: The Gathering players easily check which sets are currently in Standard, see when the next rotation is going to happen, and understand how rotations work.

Get it on Google Play   Get it
on the App Store

Contributing

See CONTRIBUTING.md.

API

See web/api/README.md.

Attributions

Thanks to:

  • For SVG images: Keyrune
  • For favicon: Nils Enevoldsen

whatsinstandard's People

Contributors

academician avatar aloisdg avatar antoinealb avatar bakert avatar connor-bracewell avatar dependabot[bot] avatar dev-id avatar felanor avatar fenhl avatar frankalbenesius avatar glacials avatar inuyasha82 avatar kerrick avatar lpghatguy avatar matt-forster avatar monkeywithacupcake avatar naknut avatar nguyenallen42 avatar nightfirecat avatar nilsenevoldsen avatar nodarsan avatar riqq avatar rrunnellssf avatar silasary avatar strattondev avatar tkrajcar avatar tooomm avatar troyfitzwater avatar valbaca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatsinstandard's Issues

Consider adding codenames for unnamed sets

The set after Ravnica Allegiance is codenamed “Milk”. This is not a great name, but it's arguably better than “…”. I suggest adding it to the website with quotation marks around it. I don't have an opinion on the API.

Related to #65.

New Block Structure

Though there's no immediate impact on standard, the explanation of what is standard could be amended to reflect the upcoming changes, or at least provide a link to those changes.

The link "show recently dropped sets" should change to "hide" after clicking

I noticed that clicking the "show recently dropped sets" link reveals the dropped sets, but the link text remains "show recently dropped sets" after clicking. This is non-intuitive, especially if clicking that link again hides those recently dropped sets.

I'd recommend changing the link text to "hide recently dropped sets" after revealing the dropped sets by clicking, and change it back to "show recently dropped sets" on toggling it again.

API v6 TODO

Definitely way too soon and very little reason to bump API versions, but when it does happen this is a living list of things to remember to change.

  • Change API from snake_case to camelCase per Google's JSON style guide

Most recent set icons are not shown (currently DOM)

The Dominaria Icon was revealed and added to Keyrune ~1 week ago but doesn't appear on the site. This occurs because the site provides its own copy of Keyrune from node_modules, which is not always up-to-date.

I think it would be reasonable to serve Keyrune from the provided CDN instead (see here) which would always provide the latest version to the reader. This would come at the cost of not being able to audit new versions of Keyrune, but changes are unlikely to be breaking, so I think the risk is minor.

API v4

Now that the 2-year transition between the old set release pattern and the new is over, we can remove the ability for the block field in the API to be null. There are a couple of other changes I'd like to make as well, like changing the rough_exit_date format to use quarters rather than "late" or "early/mid". I also might remove the symbol field, as this is not easy to maintain now that our in-page set icons use a font rather than images.

JS Tooltips

We previously had JS (I think tipsy) tooltips, but they broke around the time we moved to Vue (see #62 for discussion). Currently we're running on native tooltips which are less obvious and not as nice looking.

Question about exit_dates

Hi,
according to the documentation exit_date is the date the set exits standard format, and looking at battle for zendikar block:

`
{
"name": "Battle for Zendikar",
"block": "Battle for Zendikar",
"code": "BFZ",
"enter_date": "2015-10-02T00:00:00.000Z",
"exit_date": "2017-04-28T00:00:00.000Z",
"rough_exit_date": "Q4 2017"
},

{
"name": "Oath of the Gatewatch",
"block": "Battle for Zendikar",
"code": "OGW",
"enter_date": "2016-01-22T00:00:00.000Z",
"exit_date": "2017-04-28T00:00:00.000Z",
"rough_exit_date": "Q4 2017"
},
`
Both blocks should be out of standard now. But this is not true, and it will happen this fall. (i think that the exit date will be 2017-09-29. That anyway is correct in the rough exit date.

I think that the dates refer to the old rotation format (twice per year), that has recently changed.

Use the API to populate the lists on the page.

Everything (just about) that is on the page is presented by the API.
It would be a lot easier to maintain the lists if they were described in a single location, like the API
that is already available.

With either;

It seems as though Vue might be a good candidate as, from the examples, seems like it would be the least intrusive. I'd be willing to do a POC to see it would work without a ton of change.

Thoughts?

Needs Update due to Standard Rotation (MtG)

The current frontpage still shows BFZ and SOI blocks as being in standard. These should be moved to the recently dropped sets list, along with Reflector Mage and Emrakul being removed from the banlist. DTK/Origins should likely be removed as they are no longer the most recently dropped sets.

Add Kaladesh and Aether Revolt?

We know their names, and there's already a recently-dropped sets block; including the next sets to be rotated in might help people get a handle on what's going on when (for instance) Reddit explodes with excitement about Eternal Masters.

API v5

This is a working todo list for the next API version.

Allow sets that have rotated out to be returned

The API v4 spec allows not-yet-Standard sets to be included in the response, but not once-Standard sets. We should allow both (because we'll need both to power the site with the API) and have consumers filter them out based on enter_date and exit_date. Code snippets for filtering them out would be very helpful to include here.

Move from /\d+/ to /v\d+/ in the path

Just because it feels more common on the web.

Caching headers sent with sets.json require a client to re-request the page every ten minutes

[deepthought pd] curl -v http://whatsinstandard.com/api/v5/sets.json
*   Trying 192.30.252.154...
* TCP_NODELAY set
* Connected to whatsinstandard.com (192.30.252.154) port 80 (#0)
> GET /api/v5/sets.json HTTP/1.1
> Host: whatsinstandard.com
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: GitHub.com
< Date: Wed, 02 Aug 2017 13:50:09 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 2635
< Last-Modified: Fri, 14 Jul 2017 07:58:38 GMT
< Access-Control-Allow-Origin: *
< Expires: Wed, 02 Aug 2017 14:00:09 GMT
< Cache-Control: max-age=600
< Accept-Ranges: bytes
< X-GitHub-Request-Id: C691:4046:25CB4C:362069:5981D891

This seems very short for data that changes only every few months.

This might be a result of using github pages rather than anything intentional and might be wontfix because getting it to do anything else is too hard but I thought I'd bring it up.

I'll work around it at my end but it would be much the better if the endpoint itself was saying "cache for a day/week/even longer". mtgjson's api output has an 8 day cache time and that changes more often.

Character encoding of the HTML document is not declared as UTF-8

Right now dashes are rendering as —: Brawl is partially based on Standard—all rotations listed here apply to Brawl—but Brawl has a separate banlist. This is because the character encoding of the HTML document is not declared, and it is falling back to Windows-1252 (at least on Safari, Chrome, and Firefox on macOS).

Incorrect info

"The Khans of Tarkir block and Magic Origins, although released in the old pattern, are dropping in the new: Khans of Tarkir and Fate Reforged dropped together in April as if they were a two-set block; Dragons of Tarkir and Magic Origins will drop in the same fashion Q4 2017."

Should be Q4 2016

Pokémon version?

Since the app have versions for MTG and Hearthstone, how hard is to create a version for the Pokémon TCG?

README typo

"The array is guaranteed to contain to contain all sets currently in Standard, …"
repeat "to contain"

"The array is guaranteed to contain all sets currently in Standard, …"

API v3 status

Good morning!

I noticed today that the v3 API doesn't contain sets past Kaladesh.

If v3 is deprecated, that's totally fine. Moving to v4 is trivially easy (I'm doing it right now). But if v3 is deprecated, then it might be a better policy to have deprecated API calls return a 410 status. It's easier to implement fallback logic for the API being unavailable than to handle incorrect information.

Thank you again for providing this very helpful tool!

Have a backend

We're currently hosted on GitHub Pages, so there's no possibility for backend code. We'll probably eventually want to move, because the advantages are growing with time. This is a list of them.

  • We can supply API endpoints like "get current sets in Standard" rather than requiring clients to filter sets by enter/exit date
  • Having multiple endpoints that return the same type of data (e.g. get current sets and get all sets) would become easier if sets were actually backed by a database, not stored as raw JSON
  • We can more easily supply fields in the API response like set icons, which are strictly generated from other fields like set code, more easily (although this could also be accomplished with some local code to generate these parts of the JSON).

Release Dates for Next Set

The release dates for the next set (and their set names/symbols) have been released, so the rotation date of DTK/ORI can be added.

Kaladesh - September, 2016
Aether Revolt - January, 2017

reason why api holds old sets?

I'm wondering what the reasoning is behind the API containing dropped sets.
Currently many sets like BFZ are shown.

I realized when I wanted to use this dynamic badge which uses the api as data source:
badge

https://img.shields.io/badge/dynamic/json.svg?label=What%27s%20in%20Standard%3F&url=https%3A%2F%2Fwhatsinstandard.com%2Fapi%2Fv5%2Fsets.json&query=%24.sets..code&colorB=green

API endpoint used: https://whatsinstandard.com/api/v5/sets.json


When the page is updated to drop sets, why not update the api as well?

Clarify that nonstandard sets aren't Standard

...that sounds dumb now that I say it.

There's sometimes confusion about Duel Decks or Commander or whatever, where e.g. a new one just released and you don't see it on WIS so you might think that it's missing by accident, instead of just not Standard. We should remove all doubt and specifically say these types of sets never enter Standard.

Not working on mobile (iOS 11) / gh pages outdated

I only get a spinning circle and the list of sets is not loaded.

Basically only the right part of the desktop version is displayed.

I'm using iPhone 5s with iOS 11.4.1


Update: The problem was due to me having bookmarked the gh pages url, not the whatsinstandard.com url. My motivation was to always have the right, most up to date and correctly working link in case your domain expires at one point or there are any other problems for example.

But on my desktop it's not working and has the same problem:
https://glacials.github.io/whatsinstandard/

Why are there two versions of your site?! @glacials :)
Shouldn't https://whatsinstandard.com only redirect to gh pages? And shouldn't gh pages point to master?
I think you can also setup everything (with ssl) from the github settings nowerdays!

Volley Library fails to convert the response to JSON

I'm trying to programmatically get the api results programmatically.
But the library i'm using is failing to convert the output to json.
This is the error message:

org.json.JSONException: Value [{"name":"Battle for Zendikar", ... }] of type org.json.JSONArray cannot be converted to JSONObject

Not sure if it is whatsinstandard issue, but maybe it could be due to a malformed json?

Global Series: Jiang Yanggu & Mu Yanling will introduce a second standard environment

This isn't an issue yet, I'm just bringing this to your attention so you have time to think about it and people can offer comments if desired. The definition of Standard is going to become geographically heterogeneous.

As such, we're trying something a little different with this product. While the cards in it are not designed for serious tournament play, we wanted to make sure the fans it was created for—new, Chinese-speaking fans—could still play with the cards at an Friday Night Magic when they're starting out. So, with this in mind, Global Series: Jiang Yanggu & Mu Yanling will only be Standard legal in China. It will not be Standard legal anywhere else. Like every other product we release, the cards will be legal for Legacy and Vintage use. They will not be legal in Modern.

https://magic.wizards.com/en/articles/archive/news/global-series-meet-jiang-yanggu-and-mu-yanling-2018-05-18

The "(?)" tooltip thingies don't work on mobile

I expected these to work at least on Android, where you can typically tap an element to trigger the hover behavior. Not sure why that isn't the case here. Also not sure what iOS behavior is.

These are the thingies:

screenshot 2014-08-27 19 07 43

[Discussion] Bower Dependencies in github

Hi @glacials,

i noticed that the bower_components is in the git repository.

So, i was reading about it (since usually i never added dependencies into my project repos) if it is a good practice or not, and the answer basically is: it's up to you (i found this article https://addyosmani.com/blog/checking-in-front-end-dependencies/).

So my question is if for the dependencies it could be a good idea to remove them from git. For the dependencies in theory we only need bower.json file to be checked in.

Obviously there are pros and cons for both case:
The pros are:

  • Fewer files to mantain
  • Only relevant code in the repository
  • Repos are smaller
  • Running npm install/update you always ensure that all dependencies are installed, so the developer doesn't need to remember to add everytime the bower_components folder.

The cons are:

  • You need to run an extra step when you download (npm install/update)
  • If the server are down for some reason you can't run the project.
  • Same as if the developer decide to remove his/her package from bower! :) (it happened once)

Obviously the cons of the "keep dependencies out" approach are the pros of the "check them in" approach.
Same for the pros.

The project is not so big, so i think that going for no dependencies on the repo could be a good idea in my opinion.

What do you think?
Another question is: why only bower dependencies? And not node dependencies?

Bans in the API

Brought up in #66, it would be great to have bans in the API so that API consumers can use them and so that no action has to be performed by us on dates when bans come into / out of effect.

Brawl Information?

Seeing as the new Brawl format announced by Wizards is going to use the same rotation/ban list as Standard, I suspect What's in Standard will become a commonly-shared resource for that community as well.

Should the site include some brief information about Brawl, or should it remain 100% focused on Standard only? Thoughts?

Switch date format to clear longer "text" version

For foreigners it's sometimes tricky to quickly get the dates right, because there are different formats and non-english speaker might not know all rules exactly...
Natives might not even see the problem at all, but it can be confusing for other people.

Anyway, it should't hurt to label it 5th Oct 2018 instead 2018-10-05 at all.
That way it is really unmistakable, still short and easy to read.

Thoughts?

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.