Giter VIP home page Giter VIP logo

morning-cd's People

Contributors

zhammer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

morning-cd's Issues

Darken stars

It’d be cool if the stars could dim only when there’s text in front of them,

If that’s not possible, dim the center ones

Link directly to today's playlist

It's a little difficult to link directly to today's playlist due to timezone offsets but I think just linking to the latest playlist is good. Dad hammer pointed out that on small phones when taken to all the morningcd playlists, the actual date number (i.e. 2019-09-06) will cut off the last few characters, so it's not clear which playlist is today's.

Clarify HelpModal

Right now HelpModal contains the help button, and state for activating and deactivating it.

If anything, the helpmodal should just be the modal, and maybe there could be a HelpMenu scene? not sure but don't love it as it stands now.

About page button is initially unclickable

I think this has to do with being blocked by the fading-out windloading animation. Moving up the z-index of the button (and also making sure the actual modal z-index is higher) should fix.

GraphQl playground on EC2

Here's the graphql playground server running on an ec2 instance: http://174.129.83.12/graphql.

Note: at the moment, the only iana timezones that morning cd recognizes are

  • America/New_York
  • Asia/Tokyo
  • Europe/Moscow

Example setup

queries

mutation submit($listenInput: GraphQlListenInput!) {
  submitListen(input: $listenInput) {
    ...listenFields
  }
}

query listens {
  allListens(last: 10) {
    edges {
      cursor
      listen: node {
        ...listenFields
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
  }
}


fragment listenFields on GraphQlListen {
  id
  listenerName
  note
  listenTimeUtc
  ianaTimezone
  
  song {
    id
    name
    artistName
    albumName
  }
  
}

Query variables

{
  "listenInput": {
    "listenerName": "Zach",
    "note": "First song on the ec2 instance! (asia/tokyo because it's night here.)",
    "ianaTimezone": "Asia/Tokyo",
    "songId": "enter a spotify song id"
  }
}

Move to typescript

Would be nice to have a fully statically typed project. Plus typescript is about to have native create-react-app support. Would be a fun project + would be nice to improve the frontend code.

Improve serverless.yml / cloudformation stacks across services

Ideally the entire morning cd collection of services could be totally redeployed directly from their serverless.yml files. A few current issues / opportunities for improvement

  • Some services had manual actions performed from console that could be included in their cloudformation
  • Some services have messy, hard-coded values where cloudformation intrinsic functions could be used
    • referring to references within their stack, or
    • referring to values that could be imported from other stacks (like sns topics)
  • Some services have big chunks of serverless.yml config that could be extracted into sub files for clarity
  • Some services had manual actions performed that couldnt easily (or at all) be included in their cloudformation these can be ignored at first

It'd be nice to do some cleanup on this overtime. Learning better cloudformation setup (via serverless) would be nice overall too

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html

Exception policy

Use built in exceptions for system errors (all should produce a 500 error and log the stacktrace / exception) and MorningCdException-base exceptions for exceptions that 'correspond' to status codes.

Beta environment

Successful CI tests on master should automatically deploy morning_cd to a password protected beta environment ... before the deploy hold for prod deploy

Playlists (morning cd 2.0)

Playlists

  • [Listen to today's spotify playlist] link under header
  • Add listen to playlist consumer

CDs

  • /cds page to see each past cd w/ its date & album artwork artist + spotify playlist links
  • view the “cd” on morning cd

Mailing list

Could be cool. Weekly set of cds from the week, each one with top artists, etc.

Setup validators

As per discussion with evan, invalidator can look something like:

def submit_listen(listen_input: ListenInput):
    invalid_reason = listen_entity.check_invalid
    if invalid_reason:
        # handle invalid
    ...

(I guess this is where https://www.python.org/dev/peps/pep-0572/ would be nice)

Last steps for initial release

  • reverse order of note and location on listen
  • add pagination
  • add separator under header text on listens page
  • listens page text always defaults to 'no listens' text when transitioning from day
    • this is a pretty minor issue caused by delay of setState({ loading: true }) after sundial turns to night. occurs for less than a second and can be resolved later.
  • margin under last listen
  • fix date issues
    • manually parse dates from graphql responses, instead of useing new Date()
    • fix logic for getting local date
  • remember user’s last submit in local storage
  • add complete list of iana timezone coordinates to GeoTimezoneGateway
  • text for listens page
    • if there are songs: Here are the first pieces of music people listened to today, all over the world.
    • Nobody posted a listen to morning.cd today. Check back here later tonight. Morning.cd works all around the world, and it’s daytime somewhere...
  • get social media handles

modal passing through isDay prop to dom element

index.js:1446 Warning: React does not recognize the isDay prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase isday instead. If you accidentally passed it from a parent component, remove it from the DOM element.
in div (created by ModalBody)
in ModalBody (created by Context.Consumer)
in ModalBody (at HelpModal/index.tsx:31)
in div (created by Modal)
in div (created by Modal)
in div (created by Transition)
in Transition (created by Fade)
in Fade (created by Modal)
in div (created by Modal)
in Portal (created by Modal)
in Modal (at HelpModal/index.tsx:30)
in HelpModal (at App.tsx:193)
in div (at DayNightFrame/index.tsx:16)
in DayFrame (at App.tsx:192)
in div (at App.tsx:189)
in App (at src/index.tsx:11)

Back button on song submit page

Users can't go back to question page if they selected the wrong song or want to change selection

Suggestion from poppa hammer

Don't delay animation to white text on listens page if starting at night

Right now there's a 5 second delay in starting the glowing text animation for listens text at night. This is because we're waiting for the full page to transition to night, and once that transition is done we start glowing to white.

If the page loads directly to night, however, the text just stays gray for a while. It should start glowing immediately.

This will probably just involve checking if it's night && if it's the first render? not 100% sure best way to do this

animation: ${isDay ? '' : glowing} 5s linear 5s infinite;

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.