Code Monkey home page Code Monkey logo

mbta-checkin's People

Contributors

thepletch avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mbta-checkin's Issues

Add Status Display

Useful as an error display, esp. for mobile - implement a small, icon-based status indicator to be displayed in one corner of the screen (bottom left on desktop, top right on mobile) that shows the following details for any API requests made:

  • When loading, displays a gray spinner.
  • When complete, displays a green check.
  • When error, displays a red X. User should be able to click on this X to display further error information in the modal window.

Rewrite CSS as SASS

CSS contains several duplicated pieces of information that could be better expressed with SASS (also allowing it to be minified on upload). Rewrite the current CSS into SASS and write corresponding gulp tasks to compile the SASS for development and deployment.

Add Settings/About panes to site

Settings pane should offer toggles for:

  • Automatic route updates
  • Subway line overlays
  • Subway names (TBA)
  • Train destinations (TBA)

About pane should display:

  • Author(s)
  • Current version
  • Donation link

Track Buses

The MBTA publishes live location data for all their bus routes, provided by the NextBus API. When a user clicks a stop and receives at least one bus prediction, a button should display next to the 'Buses' heading labeled 'Live'. When this button is pressed, the modal window will close and live locations of all bus routes associated with the stop will be displayed. Any other live location request will clear these.

Buses are not trains

The 'time between trains' analytics for a given route calls everything a train. A helper method should be built that determines the appropriate vehicle name (bus, train, etc) for a given route.

Aesthetic improvements

Research 'fading in' new objects over time to make appearing vehicles/routes more obvious

Add loading spinner while data files are being loaded

Style prediction pane

Prediction pane is currently an unstyled set of nested lists - that can be improved. Add some flair to it, esp. to differentiate the different segments.

Predictions modal redesign

Center the header for the stop name
Mode of transportation header is redundant - nix it
Reference the following format, fitting two across, though each route should have its own row:

Downtown Crossing

Orange Line

Forest Hills 10:31 4m
Oak Grove 10:34 7m

Red Line

Alewife 10:36 9m
Ashmont 10:27 Arr

39

Inbound 10:44 17m

Swipe gesture improvements

Swipe gestures currently feel unresponsive due to slow animation speed- double the animation speed.

Additionally, allow a right swipe to dismiss the modal.

Build away from jQuery

JQuery is a big library, and it's currently only being used for fetching elements by ID and class manipulation. It should be replaced with a more lightweight alternative or factored out altogether (prefer not to do this, since class manipulation is super unwieldy).

async.js refactor

At the moment we're using nasty homespun code to query multiple routes for live train locations at once. We should be using a simpler/more standardized library (async) to do this and clean up code for readability.

Thanks to @ustasb for turning me onto this.

Make stop selectable

Add a visual indicator to a stop showing that it has been selected and store it in the code as the selected stop.

Coffeescript rewrite

Refactor system into Coffeescript (including Coffeescript classes for modules) for concision and modifiability.

Decouple modules in map.js

The four modules in map.js have an issue right now with being interdependent. That is, two modules are aware of another's existence. All relationships should be evaluated and, if at all possible, rewritten using an events system to be made one-way or fully decoupled.

Amalgamate images into a spritesheet

Images should be compiled into a spritesheet to avoid things loading one line at a time or the unattractive blinking of the reticle between loading and completion. Note Google Maps' 'origin' parameter for Icons.

Quick Trains Improvement

Clicking a button to refresh the live train locations view for a line should collapse the trains menu. Currently the menu blocks a lot of the screen unnecessarily on mobile.

Quick Lookup

Quick Lookup should appear as a button in the new UI that, when pressed:

  • Moves the camera to the user's current location
  • Fetches the 5 stops nearest to the user
  • Shows all five stop names in the same modal, collapsed to only show the stop names
  • When any stop name is clicked, all other open stops are collapsed and a prediction is fetched for the stop before the prediction modal render slides down beneath it

Dedupe alerts

Currently alert deduping is broken (attempts to compare alert string to alert objects to find duplicates). It should be fixed to avoid cluttering the alerts panel.

Silver Line support

Currently we only track the main lines - add silver line stops, live train locations, and route shapes.

Location search

Feature spec:

  • When a blank part of the map is clicked, place a marker and show stops around that point
  • Provide an address-based search that provides the same 'nearby stops' functionality with a pop-up form when a button is pressed
  • Provide a 'my location' button that, again, shows nearby stops

Research making live trains click-through-able

Currently if a live train is placed over a stop (common when trains 'stand by' on the green line) the stop becomes extremely difficult to click - research a way to allow clicks to pass through train icons or ignore the clicks altogether

Add subway lines overlay

Google Maps apparently has an overlay showing the MBTA lines. Find and add this overlay for aesthetic/clarity purposes.

New mobile UI to support new features

Basic UI swag:

  • Single large visible button (full width on mobile, about 300px on desktop) at bottom of screen
  • Swipe left/right to switch between feature buttons
  • Button can either slide up to reveal menu on press or simply perform an action
  • Menu-slider buttons should be gray with an arrow pointing down
  • Menu-slider buttons should also slide up when a user swipes up on them
  • Arrows should point left/right when there are further options available in that direction
  • When a new alert is registered, right arrow/alerts button turns red (unless Warn on Alerts is disabled)
    Current UI can be rewritten as:
    About/Settings | Update Trains | Quick Lookup | My Location | Alerts
    Default to Quick Lookup

About/Settings drops down to:

  • Created by @ThePletch (links to Github repo)
  • Toggle for 'Warn on Alerts'
  • PayPal link

Update Trains drops down to:

  • Green
  • Red
  • Orange
  • Blue
  • Silver

Alerts pops up a modal window with the ten most recent alerts in a scrollable view

  • Opening Alerts dismisses red alerts arrow/button

If a user swipes left/right while a dropdown is open, quickly slide down the dropdown before swiping to the next menu option. Dropdowns should not have unpersisted states for this reason (i.e. there should never be a 'save' button in a dropdown).

Refactor live train feed to GTFS

The MBTA has an option to fetch live train GPS info from GTFS all at once, reducing query load from 19 per full update to 1. This should be used instead of the current updates by route system.

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.