Git Product home page Git Product logo

percify-dashboard's People

Contributors

ionwyn avatar snyk-bot avatar

Stargazers

 avatar

Watchers

 avatar  avatar

percify-dashboard's Issues

No test cases

While the development branch is already set-up for testing in interactive environment with yarn test, we still don't have any test cases.

Test Driven Development is not really my thing, anyway.

Redux state management

  • At the moment, Redux states are a mess. We need to have consistency in our redux states.

Update User to use sessionStorage

At the moment, Actions return the userdata, which is then given to a component as props so components can do stuff with it.

This method is unreliable and therefore we need to use sessionStorage ? sessionStorage : localStorage to make user information accessible across components.

Avatarless user crashes app

If a Spotify user account has no avatar, logging in will cause the site to crash.

This is because the site tries to take a profile picture from the returned JSON that the API calls. The API returns JSON without the key for user's image. Component tries to render the image, bug the image is undefined

Hard coded UserLayoutDefaultSettings

At the moment, once a user signs in, a layout for that user is hardcoded in the user actions. We need to add a method to get the layout via dispatching an action.

Unauthenticated user crashes the site

When an unauthenticated user tries to access a URL endpoint, the site will crash. This is because the endpoint tries to get information about the user from the session or local storage, giving undefined when components try to access them.

User access_token expiration is not handled

At the moment, (mostly because I'm lazy), user access token expiry is not handled. This causes the site to loses user's data.

This is easily handled since, during login, our authentication method gives us initial access token and a refresh token. Refresh tokens can be used to generate a new access token. We can either

  • Update the access token when accessing data returns fail
  • Keep track of access token expiration, updating when the timer expires.

The homepage needs grooming

The current 'homepage' which displays a user's top tracks, artists, genres, and vibes don't look so good for User Experience.

Needs polishing

file associated: Home.js

Display name null because user has no name

When the user logs in, Toolbar takes a user's name for display. The API returns null for the user name's key. This can happen because:

  • Upon signing up with Spotify, the user did not specify a name.
  • The user did not sign up using Spotify.

I'm not sure which one it is, there may be other ways that the API returns null for a user's name.'

An idea is, when user's name is null, we simply display userID

Multiple Playback

If you visit the playback multiple times, the same song will play again, therefore doubling the playback.

To consider:
When components render, they may fire actions that trigger the playback. We need to know then there's a playback and prevent the player component from firing the actions that triggers playback

Questionable global variable for persistent login

At the moment, for persistent login, I've implemented a global variable in commit 5919f4b on index.js for persistent login (meaning all components are aware of the existence or absence of a logged in user).

I wonder if this is a good practice. It seems suspicious. Is this an anti-pattern to Redux?

While this was an easy implementation, I suspect that it'd be better to use Intersect/FuseAuthorization or pass it through Provider.

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.