Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Default Sorting of Homepage #33

Open
bmorrissirromb opened this issue Nov 28, 2023 · 1 comment
Open

Improve Default Sorting of Homepage #33

bmorrissirromb opened this issue Nov 28, 2023 · 1 comment

Comments

@bmorrissirromb
Copy link

The Tabroom homepage is the most-visited page of the whole website, but it's surprisingly challenging to find the tournament you're looking for quickly. Tournament names and cities are not useful references for sorting (eg. "is a tournament listed as New York...or Queens?"). However, State is a pretty reliable way of sorting data (even with the "time zone" states use for virtual). But sorting by state causes lots of future tournaments to be sorted next to your state, making navigation difficult still! There has to be a better way!

Previously...

Tabroom's homepage displayed a single, large table with all tournaments, loosely sorted by Tournament Date. Sorting buttons exist at the top, but will sort hundreds of tournaments including tournaments several weeks in the future.

image

Now...

Tabroom splits the homepage's tournament list into Tournaments This Week and More Future Tournaments. Tournaments This Week is sorted by State as a default. More Future Tournaments is still sorted by Tournament Date.

image

image

Custom filter views, such as state/circuit, will be left unchanged (these are useful for looking up past tournaments and already contain filtered data)

Design Details

In order to achieve this, we need some mechanism for determining what is "this week" vs what is a future (or past) week.

I propose using Start Date as the primary field that is checked for this purpose, and a start date of Sunday as the cutoff for what tournaments live in each week. This is primarily to ensure that the NSDA National Tournament (which has a Sunday start date) is included as 'This Week' during the NSDA National Tournament's duration.

However, some tournaments will finish on the Monday of a week (eg. Glenbrooks, Stanford). If a user visits Tabroom on a Monday and wants to see their pairings for Glenbrooks, that should show as current week as well. Behind the scenes, we can think of these as 'Currently Active' tournaments, and always include them in the 'This Week' table.

In pseudocode:

# assume today/start_date/end_date/anchor_sunday are integers representing days -- eg. epoch days (it is currently epoch day 19689 since Jan 1, 1970).
today = today()
anchor_sunday = get_most_recent_sunday_on_or_before_today(today)
# Case for active tournaments
if start_date <= today and end_date >= today:
    return "current"
# Case for past tournaments
if start_date <= anchor_sunday:
    return "past"
# Case for future tournaments
if start_date > anchor_sunday.add_days(6):
    return "future"
return "current"

Here's a small table that illustrates how this filter will classify tournaments as past, current, or future. For reference, we'll use dates surrounding Sunday, December 10th, 2023.

Today's (Access) Date Tournament Start Date Tournament End Date Classification
Saturday December 9th Saturday December 2nd Saturday December 2nd Past
Saturday December 9th Friday December 8th Saturday December 9th Current
Saturday December 9th Sunday December 10th Friday December 15th Future
Saturday December 9th Monday December 11th Friday December 15th Future
Sunday December 10th Saturday December 9th Saturday December 9th Past
Sunday December 10th Saturday December 9th Sunday December 10th Current
Sunday December 10th Sunday December 10th Sunday December 10th Current
Sunday December 10th Monday December 11th Sunday December 17th Current
Sunday December 10th Saturday December 16th Sunday December 17th Current
Sunday December 10th Sunday December 17th Sunday December 17th Future
Sunday December 10th Saturday December 23rd Sunday December 24th Future

References

This design sort of mirrors what Speechwire does, but without the clunky state sillhouettes:

image

@bmorrissirromb
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant