GithubHelp home page GithubHelp logo

deglassified's People

Contributors

andrelevi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

deglassified's Issues

Open pop-ups will trigger 'popupclose' event when changing locations

This is problematic, because the 'popupclose' event will call a state change, resulting in two back-to-back state changes. Furthermore, the state change from 'popupclose' uses an out of date $rootScope.currentLocation, because the controller from the freshly loaded state has not had a chance to set the new $rootScope.currentLocation.

To prevent this, we have to do two unideal things:

  1. Use $rootScope instead of $scope.currentLocation, as we need to allow the Mapbox service access to the property.

  2. AND, in loadLocation() in app.js, we have to set the $rootScope.currentLocation to the location we are about to change to, before making the new state change.

Fix mini-map container hard coding

  • Dynamically size mini-map container height.
  • Figure out how users will confirm correct business location.
    • Put confirmation button inside marker popup?
    • Put confirmation button below map?
    • Fix location button that will focus cursor back to address input?
  • Decide what behavior for user upon successful business addition.
    • Alert box pop-up confirming addition?

Add stateful routing

Add stateful routing so that:

  • Changing the city should update the URL (/seattle)
  • Clicking a popup should update the URL (/seattle/5-point-cafe)
  • The API will generate slugs, store them in db, and return them through API (in /api/locations and /api/locations/1/businesses)

Make Geocoder class more robust

Don't make assumptions about the order of address_components. Look at the types (city = "locality" and state = "administrative_area_level_1") and determine type of address_components from those.

Front-end todo list

  • Update minimap popup if user accepts formatted address
  • Prevent users from advancing to page 2 of add business wizard, if page 1's form is invalid
  • Replace select2 ajax with $http call and initialize select2 in the callback
  • Change select2 no matches text to mention ability to add new location
  • Do a geocoding check for legit location after being created in select2

Inconsistent API error code responses?

When POSTing to '/api/users/sign_in', if a login fails due to bad email/password, a 401 error code is returned, along with the typical response.auth object.

When POSTing to '/api/users/' for a user registration, if it fails due to mismatched passwords, too short password, etc., no error code is returned, so the post is seen as 'successful'.

This issue causes inconsistency and not easily understood code when handling the request errors.

Would be nice if failed POSTs to '/api/users/' also returned an error code, so that $http's .error() would trigger instead of .success().

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.