Code Monkey home page Code Monkey logo

frontend's Introduction

README

What is this repository for?

Repository for the garbagepla.net frontend.

How to get started?

Run npm i to install gulp and dependencies in the root directory and type gulp to compile templates and build the app. Note that if you do not have your own token for Mapbox and other external APIs you won't be able to build properly. Tokens are set in an .env file as follows:

IMGUR_TOKEN=<imgur api token>
MAPBOX_TOKEN=<Mapbox.com map tiles api token>
WINDOW_TOKEN=<laravel backend app token>
OC_TOKEN=<Opencage geocoder api token>
OG_TOKEN=<Opengraph scraper api token>
SERVER=<the url to the app backend, see the garbageplanet/api repo>
ROOT=<the root url of your app>
PRODUCTION=<boolean>
GA=<google analytics token (optional)>

Contributing

If you want to contribute to a specific todo/fixme below, the first thing you should do is open an issue. If you have another contribution PRs are also welcome.

Improvements

Also look at TODO.md

  • make shareable link router mechanism
  • fix tagsinput
  • do not load templates when using back button in navigation else templates throw error
  • L.hash navigo integration
  • store unsaved markers in app state for offline use and implement PWA / wweborker
  • use fetch api instead of ajax and image uploader so we can move to jquery slim
  • use fetch in auth.js
  • ajax calls stack up really fast when map is moved. Change mechanism for loading up map features, fix tools.checkIfInsideRoundedBounds().
  • rewrite features creation methods with factories / function composition so we can add new methods easily (see src/factories.js)
  • Remove redundancy in form and data templates using include(), make form widget (note, etc) with include()
  • Remove redundancy in _saveFeature()
  • Remove redundancy in session()
  • Remove redundancy in _loadFeature()
  • build a minimal entry point for loading the content via cdn
  • navigate visible markers in the bottom panel view with https://github.com/stefanocudini/leaflet-list-markers
  • rebuild with sveltejs

Licence

This code is available under the ISC licence but some parts have a different license information, see this file.

frontend's People

Contributors

adriennn avatar feri avatar villeglad avatar xr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

feri villeglad

frontend's Issues

iOS

anything on iOS, don't work.

Current FIXME, Nov. 2016

  • fix search bar collapse on submit (map catches a click form the enter/submit event and collapses the control)
  • fix L.Control.Layers collapse on map click (map still catches clicks when control is expanded)
  • remove unsaved marker icons once maker is saved
  • fix marker creation when multiple unsaved marker are present on map
  • bootstrap form validation - disallow submit button until ok (currently only add class disabled to submit button)

img-responsive in #bottombar

Image size doesn't respect the size of the parent div (col-lg-3etc) in the bottom panel. Adding the bootstrap3 class img-responsive to the <img> tag in the bottom panel doesn't help either.

Change the behavior of .on('click') when panels are open

It's currently possible to create a new marker by clicking on the map when either of side or bottom panels are open. The default behavior should catch the clicks going to the map when a panel is open and do something smarter than creating another marker, like closing the panel.

panTo(marker) when side or bottom panels are open

Currently, the map pans correctly to the clicked latlng or to the clicked marker. However, if either of the panels are already open, the map will pan to the center of the viewport. It should pan to the center of the remaining space. The behavior needs to be corrected either in L.Control.Sidebar.js and L.control.bar.js or by using invalidateSize() when a click occurs and a panel is open.

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.