-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding map #15
Adding map #15
Conversation
… indicators and data panel)
… removing images references)
… work from .nycrc - like include/exclude ones)
…merging them with SmogMap component
Generallly , have You seen my markup here: #3 (comment)? Have a look at whole discussion there. Reviewed 17 of 21 files at r1, 4 of 4 files at r2. webpack.config.js, line 9 at r2 (raw file):
This is correct way of doing it? I'm using import './node_modules/whatever/file.css' and it is magicaly added by css-loader. The same with images only by file loader?
Should I read something? :) app/helpers/mapMarkers.js, line 41 at r2 (raw file):
new line + just thinking - shouldn't all files be either Comments from Reviewable |
@lechup yeah! There's a webpack tutorial regarding this: http://survivejs.com/webpack/introduction/ I totally recommend that (thought author updated it recently to using beta version of webpack and some libraries error-out :D). The idea which this guy has, is to make sure that we are not loading some junk automatically, and so that at a first glance we know what is the structure of project which we load. This also agrees with Zen of Python rule, where 'explicit is better then implicit'. I know we're dealing with js here, but it's a decent rule to follow :). btw. I did browsed the mockup you refered to, I didn't add any buttons or space for charts, as we're not serving that yet :). Because of that I didn't add any routing library (thought that it might be out-of-scope for that PR). |
…s checking if wrapper with TileLayer has been generated properly
…operly some async operations (though I do have them covered)
@lechup - I think you can take a look now, and if it's looking OK, we can finally merge with master. So basically, as of now, if you update the station API to handle get filtering via NE, SW points, then we can have the stations on the map with pollution levels. This last metering value per station should be serialized as After the merge, I'll take a look at |
Oh, actually - that's not 100% right, as I input some dummy-data after fetch is done, no matter the response :). |
Generally ok, we need some base to work on ;) Reviewed 3 of 8 files at r5, 1 of 2 files at r6, 3 of 4 files at r7, 2 of 2 files at r8. package.json, line 36 at r8 (raw file):
JS does not have generic mock library like python? Shouldn't all mocks be grouped in packages.json with all test related libraries? Just asking I do not have the foggies idea ;) app/request.js, line 4 at r8 (raw file):
FAKE_DOMAIN is used in tests? Do we have API_URL somewhere? Hm... Maybe it should have deault of '' but we should be able to override it while setting environment variable? app/actions/index.js, line 29 at r8 (raw file):
I'm not sure how it will be parsed but it should be something like here: https://github.com/djangonauts/django-rest-framework-gis#inbboxfilter app/actions/index.js, line 40 at r8 (raw file):
I plan to provide all data from Metering model in 'last_metering' key, app/components/PollutionMap.jsx, line 17 at r8 (raw file):
From my experience it is better to keep bouding box instead of map center in state. But if we do not plan to provide urls that should show same results on different resolutions for now it's ok. Comments from Reviewable |
Review status: all files reviewed at latest revision, 7 unresolved discussions. package.json, line 36 at r8 (raw file): Previously, lechup (Leszek Piątek) wrote…
Nope, it doesn't :). Hence the Actually - I've updated packages.json via webpack.config.js, line 9 at r2 (raw file): Previously, lechup (Leszek Piątek) wrote…
Haven't responded here - I was basing the configuration on this tutorial: http://survivejs.com/webpack/introduction/ app/request.js, line 4 at r8 (raw file): Previously, lechup (Leszek Piątek) wrote…
Yep, its only for tests. I plan to list all API urls in urls.js. The way I do it know - is that when I'm trying to determine the domain for tests, I add the FAKE_DOMAIN thing to url resolve ( Sure - I like your idea, we can just pre-fill some variable here which we use all the time. app/actions/index.js, line 29 at r8 (raw file): Previously, lechup (Leszek Piątek) wrote…
Example url in this configuration: /station/northEast=LatLng%2852.24378%2C%2020.98251%29&southWest=LatLng%2852.16456%2C%2020.86338%29 app/actions/index.js, line 40 at r8 (raw file): Previously, lechup (Leszek Piątek) wrote…
good to know :). I'll swap the name then. app/components/PollutionMap.jsx, line 17 at r8 (raw file): Previously, lechup (Leszek Piątek) wrote…
I need to have a map center here, as it's an argument I'm passing during render. And re-render :). I was thinking of adding a bounding box here, but came to a conclusion that I need it only when I fetch for station data, so - why bother saving it anywhere? app/helpers/mapMarkers.js, line 41 at r2 (raw file): Previously, lechup (Leszek Piątek) wrote…
nope. *.jsx are the components which are using html tags inside. No need to name everything either js or jsx. New lines are my nemesis :3. I should really enable eslint support at some time in the future. Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. package.json, line 36 at r8 (raw file): Previously, ajakubo1 (Adam Jakubowski) wrote…
app/request.js, line 4 at r8 (raw file): Previously, ajakubo1 (Adam Jakubowski) wrote…
Of course I mean app/actions/index.js, line 37 at r8 (raw file):
Hm.. what is type for? We have such field in API, but it's HW version of station not app/actions/index.js, line 40 at r8 (raw file): Previously, ajakubo1 (Adam Jakubowski) wrote…
It will be rather Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. package.json, line 36 at r8 (raw file): Previously, lechup (Leszek Piątek) wrote…
Done. app/actions/index.js, line 37 at r8 (raw file): Previously, lechup (Leszek Piątek) wrote…
My workaround on... well... Type of metric sent :). I'll have to change it somehow based on your comment Comments from Reviewable |
Reviewed 9 of 9 files at r9. Comments from Reviewable |
This is the pull request which adds a possibility of showing map and additional elements (I've prepared and used as an example 4 markers).
I'm missing here:
fetch
polyfill)This change is