Giter Club home page Giter Club logo

rugby-ranker's Introduction

Rugby Ranker ๐Ÿ‰

GitHub Actions ktlint

Rugby Ranker is a work-in-progress Android app for viewing and predicting the latest World Rugby rankings.

It displays the latest international rankings, live scores, fixtures, results and news/videos. It makes use of the World Rugby 'Points Exchange' system in order to predict changes in team positions and points.


Rankings Drawer Predict Predictions
Rankings Predict Predictions Live
Matches Live News Info
Fixtures Results News Info

Get it on Google Play

Android development

Rugby Ranker attempts to make use of the latest Android libraries and best practices:

Inspiration

Rugby Ranker was inspired by @rawling's wr-calc web app, aiming to be a native Android version with a focus on delightful UX/UI design.

Contributions

Please feel free to file an issue for errors, suggestions or feature requests. Pull requests are also encouraged.

License

Copyright 2023 Nick Rout

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

rugby-ranker's People

Contributors

jacquessmuts avatar mayokunadeniyi avatar myricsept avatar ricknout 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

rugby-ranker's Issues

Show match detail screen

This would be shown by tapping on a match in the list of fixtures / results (and perhaps from elsewhere). The relevant API endpoint and design are still TBD.

Add support for more sport types

Other sport types include:

  • Men's 7s (mrs)
  • Women's 7s (mrs)
  • Junior Men's 15s (jmu)
  • Junior Women's 15s (jwu)

This may or may not require a navigation update, depending on the amount of new sports added.

Note: only the current sports (Men's 15s and Women's 15s) support rankings and this will need to be handled appropriately in the UI (no rankings tab or prediction input).

Show team detail screen

This would be shown by tapping on a team in the list of rankings (and perhaps from elsewhere). The relevant API endpoint and design are still TBD.

Show live scores

This will be another tab on the main screen - "Live". This will still use the /match API but will need to include different states parameters:

  • L1: Live (first half)
  • LHT: Live (half time)
  • L2: Live (second half)

These results should not be cached, so slightly better network error handling and empty state support will need to be added.

While the fetching of live matches/scores should be tied to the relevant Android lifecycle, updates should be periodically fetched to give the "live" effect. Consider using Coroutines (https://stackoverflow.com/a/46890009/9283528) / RxJava (http://reactivex.io/documentation/operators/interval.html) / Handler for this.

Support dark theme

  • Switch to a MDC DayNight theme
  • Choose an adjusted dark color palette and add to -night resources
  • Adjust any remaining styles/layouts to use color references where possible
  • Maybe target Android Q?
  • Add a theme chooser to the Info screen

Add swipe to refresh to rankings

At the moment, rankings are refreshed every 24hrs by WorkManager. However, it would still be useful to be able to refresh to get the latest rankings. This would be particularly useful when a lot of matches are being played (eg. November Internationals, Rugby World Cup, etc.)

onInterceptTouchEvent always returns false

Hello Nick I found an issue in the onInterceptTouchEvent function of OnBackgroundClickItemTouchListener.kt, it always returns false and doesn't return the value of gestureDetector.onTouchEvent(e)

Add video feed

The base URL to fetch World Rugby videos is:
https://cmsapi.pulselive.com/content/worldrugby/video/{lang}/ where lang is an ISO 2 letter language code (eg. en).

This is similar to that of the news feed and the same query params apply.

Reuse most of the UI from the news feed and make videos another tab under the news nav destination.

Display World Rugby fixtures and results

Fetch/cache matches from the World Rugby API. These would consist of fixtures (upcoming) and results (past) [there's also live matches, but that's outside the scope of this task].

Main screens for each sport (i.e. Men's, Women's, etc.) would need to now include tabs for rankings, fixtures and results, for example:

ui

For upcoming fixtures, a user should be able to tap the 'predict' button to pre-fill the rankings prediction input with the relevant teams and NHA/RWC flags.

As the amount of matches could be quite high, this presents an opportunity to use the Paging architecture component:
https://developer.android.com/topic/libraries/architecture/paging/

This would warrant at least a minor version bump (maybe even a major version).

Migrate to latest AndroidX updates

See: https://developer.android.com/jetpack/androidx/androidx-rn#2018-nov-core

Notably:

  • Separate libraries for activity, fragment, etc. Version shuffling will be required.
  • Minor core KTX update
  • "Added Kotlin extension functions for TextView TextWatcher actions." Can maybe remove SimpleTextWatcher?
  • "You can now register an OnBackPressedCallback via addOnBackPressedCallback to receive onBackPressed() callbacks without needing to override the method in your activity." Can remove OnBackPressedProvider/OnBackPressedListener.
  • Quite a few bug fixes and other minor improvements

Also migrate to latest Material Components for Android:
https://github.com/material-components/material-components-android/releases/tag/1.1.0-alpha01

Migrate IO tasks to use Coroutines

With the introduction of Coroutines in b49e037, it would be great to migrate some existing code to use them.

This would include:

Show last updated time for latest World Rugby rankings

It would be useful to know when the latest World Rugby rankings were last updated.
Ideas:

  • Text: "Last updated DD-MM-YYYY" (maybe localise date format?)
  • Only show when not predicting rankings
  • Show as a subtitle underneath the "Latest Men's/Women's Rugby Rankings" title

F-Droid inclusion

Hi,

Since this app is Apache V2 licensed, are you considering the fact to add it to F-Droid? There is a strong community behind.

You can find some documentation here.

Otherwise, if you don't want to work on the inclusion of this app in F-Droid by yourself, would you still agree with the inclusion of your app in F-Droid by the maintainer team?

Add news feed

The base URL to fetch World Rugby news is:
https://cmsapi.pulselive.com/content/worldrugby/text/{lang}/ where lang is an ISO 2 letter language code (eg. en).

Other query params include:

  • tagNames (for the purpose of this feature, should be set to News)
  • pageSize (defaults to 10, does not seem to have the max 100 imposed by other endpoints)
  • page

Not sure if these should be periodically fetched/cached or just loaded on demand, given the large amount of data, paging, language (localization), etc.

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.