Git Product home page Git Product logo

web's Introduction

opendota-web

Help Contribute to Open Source

OpenDota Web UI: A web interface for viewing Dota 2 data. This utilizes the OpenDota API, which is also an open source project.

Quickstart

With Docker

$ docker-compose up
  • Visit port 3000 on your development machine.

Without Docker

Contributing

  • Make some changes.
  • npm run lint to check your code for linting errors.
  • npm test to check all app routes for uncaught JavaScript errors.
  • Submit a pull request. Wait for review and merge.
  • Congratulations! You're a contributor.

Configuration

  • You can set the following environment variables:
    • PORT: Changes the port that the development server runs on
    • VITE_API_HOST: Changes the API that the UI requests data from (default https://api.opendota.com)

Tech Stack

  • View: React
  • State Management: Redux
  • CSS: styled-components

Workflow

  • If you're interested in contributing regularly, let us know and we'll add you to the organization.
  • The master branch is automatically deployed to the stage environment.
  • We'll periodically ship releases to production: https://www.opendota.com

Notes

  • You don't have to set up the entire stack (databases, etc.), or worry about getting starter data, since the UI points to the production API.
  • Use the configuration to point to your own API (if you are working on a new feature and want to start building the UI before it's deployed to production).
  • Discord: https://discord.gg/opendota
    • Strongly recommended for active developers! We move fast and it's helpful to be up to speed with everything that's happening.

Resources

Testing

BrowserStack have been kind enough to provide us with a free account for Live and Automate. We will be using Automate in the future to run automatic end-to-end testing.

BrowserStack is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices or emulators.

web's People

Contributors

akronb avatar albertcui avatar argn0 avatar bdbch avatar bguzryanto avatar blukai avatar builder-247 avatar covertpz avatar dartharaknus avatar dependabot-preview[bot] avatar dependabot-support avatar farmasek avatar glowcone avatar gravitymsc avatar greenkeeper[bot] avatar greenkeeperio-bot avatar gu3st avatar howardchung avatar litch avatar luchanso avatar masad-frost avatar mdiller avatar michael-robertson-kr avatar mike-robertson avatar moondef avatar njgingrich avatar phrynobatrachus avatar sepehr500 avatar spudde123 avatar talal-najam 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  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

web's Issues

refactor to use bundled material icons

Currently the index.html references an external dependency:

    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

This should be bundled in with webpack so that the site functions if Google changes the route or stops hosting the icons.

swapping tabs back and forth removes filtering from table

example: put 10k matches limit filter on overview. Then swap to heroes tab. then go back to overview. Your filter will be gone because the page makes a request for the regular data amount which overrides the data. This causes a bug with pagination where you are stuck on a page which no longer exists, but the pagination controls don't render since that page is empty.

port updated footer

Footer has changed since we originally ported it.

Should API be a footer item or a main nav item?

mobile issues

  • navbar runs off the screen instead of stacking
  • home opening text runs offscreen
  • player header elements overflow vertically
  • TabBar navigation squishes together horizontally instead of wrapping
  • overview match/hero tables are squished together (they should stack if the viewport is too narrow? bootstrap handles this automatically)
  • home three features section should stack instead of compressing into 1/3 width
  • Tables are way too wide in mobile scroll view.

search page should update url

@bguzryanto

I think the search page should update the URL in the address bar when a search is performed. Any query string produced by the user should be reflected in the address bar to allow URL sharing.

Create global text styles

Bootstrap allows:
text-muted
text-danger
text-warning
text-success
text-primary

We should add similar global text color classes.

corner profile picture doesn't load initially

The picture doesn't load initially (I'm guessing this is because the image path isn't in the store yet).

I think it's simplest just to have it say "profile" all the time (current behavior)

React SPA

Continuation of odota/core#889

MVP:

Telemetry/Sponsorship:

Validation:

Bonus:

  • mmstats @albertcui
  • status page
  • banner (dismissable)
  • page titles

People:
@howardchung
@albertcui
@mike-robertson
@gu3st
@stevenla
@Iparke
@bguzryanto
@Shenlok
@kkotwal94
@masad-frost
@bmulcahy
@Marvizm

Please indicate what you'd like to work on and coordinate with others working on the same area to avoid too many merge conflicts :)

skill build layout

The skill build layout currently looks terrible in my opinion.

When none of the heroes reach higher levels, the numbers are all clumped out without any spacing. Example

Secondly, the scroll bar is annoying. The user should be able to see all the levels at a glance. The issue is that the buildings minimap is taking quite a lot of space. It should be moved either above or below this data, like on dotabuff

"showBar" column property for tables

currently implemented for percent columns. Allow setting a property on any column to display bars relative to the maximum value of that column in the given table.

Package.json needs to have dependencies properly sorted

dependencies and devDependencies are 2 different things and they need to be separated. devDependencies are things that are required for dev/build process (webpack, webpack loaders etc.). dependencies are things which the application requires to run (react, react-dom, etc.).

filter bugfixes

  • also is it possible to make the dropdowns appear without having to type anything
  • also URL state needs to be updated when a filter is applied
  • also text field should clear after a chip is selected
  • constrain selections to max 1 element (on most fields)
  • update w/l when a filter is applied
  • also appears to be a bug where the ? doesn't show up in the URL sometimes

Dismissable banner message

  • We should be able to write "patch notes" in markdown or similar, and check them in as files.
  • The UI should show these notes in a modal or similar
  • The user should be able to dismiss the modal and it should not show up again (store in localStorage?)
  • The message should not show up if it's too old (TTL)

enable new UI in production

  • set ROOT_URL=api.opendota.com on backend (return point for steam openid)
  • set UI_HOST=www.opendota.com on backend (redirect users to UI after login)
  • set COOKIE_DOMAIN=.opendota.com on backend (cross-subdomain cookie)
  • set API_HOST https://api.opendota.com on UI
  • set CNAME www.opendota.com on UI
  • set DNS to point opendota.com to odota.github.io
  • enable redirect of beta to www

Users will need to login again since the domain has changed.

Option to permanently enable ads

Another person popped in last night and suggested the ability for an option to permanently enable ads.

I think it'd be a good thing.

localization/translation

  • go through the SPA and move any strings into language files
  • figure out routing/persistence of language settings
  • figure out how to load/update valve data in multiple languages
  • have volunteer translators translate strings

lag when swapping tabs

Noticeable when swapping tabs (e.g. heroes to peers). Perhaps there's something we can do to remedy this?

use hashed file name in index.html

We should put the hash in the generated bundle name and inject the name to prevent GitHub pages from caching the bundle when we update.

var Path = require("path");
var FileSystem = require("fs");

var webpackConfig = {
    ...
    plugins: [
        ...
        function() {
            this.plugin("done", function(statsData) {
                var stats = statsData.toJson();

                if (!stats.errors.length) {
                    var htmlFileName = "index.html";
                    var html = FileSystem.readFileSync(Path.join(__dirname, htmlFileName), "utf8");

                    var htmlOutput = html.replace(
                        /<script\s+src=(["'])(.+?)bundle\.js\1/i,
                        "<script src=$1$2" + stats.assetsByChunkName.main[0] + "$1");

                    FileSystem.writeFileSync(
                        Path.join(__dirname, "%your build path%", htmlFileName),
                        htmlOutput);
                }
            });
        }
    ]
};

item/ability tooltips

Apparently material-ui has them implemented, but not documented:
mui/material-ui#2230 (comment)

I don't know if they support direct HTML content, which we need since the data we have has raw HTML in it.

  • items
  • abilities
  • table headers

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.