refactor docs - navigable and easy-to-add examples#41
refactor docs - navigable and easy-to-add examples#41vicapow merged 16 commits intovisgl:gh-pagesfrom wwwtyro:refactor-docs
Conversation
|
@vicapow Hope you like it! 🎉 |
index.js
Outdated
There was a problem hiding this comment.
I think we should use React to create the sidebar if only to be consistent with the the rest of the project.
|
Thanks for the review! I'll try to fix it up tomorrow evening. If you're at all dissatisfied with the direction I've taken here, I'm happy to refactor it so that it's more in line with what you envisioned - I realize it's a significant departure from the original. |
index.css
Outdated
There was a problem hiding this comment.
what do you think about Helvetica Neue, instead?
There was a problem hiding this comment.
Know where I can source a Helvetica Neue web font from? I've not found a free one.
|
It's looking good so far! I do have a some feedback. still going through. |
|
I've been trying to keep build commits of |
index.css
Outdated
|
Excellent, thanks for all the feedback. 👍 I'll try to get through these tomorrow. |
|
I addressed some issues and rebased to separate out the bundle rebuild into a new commit. I'm still working on upgrading react-map-gl to 0.6.1, but I've hit a snag rendering the overlays (they don't appear, no errors - see https://github.com/uber/react-map-gl/pull/41/files#diff-386b72445554b0b2557c2637ec3aea34R95 for my attempt). Unfortunately I've run out of time this evening, and am travelling this weekend, so won't be able to start again until Monday. Have a great weekend! |
|
@wwwtyro awesome progress. you just need to swap latitude and longitude. Sorry about that. We changed the API when Mapbox decided to swap them too so you can blame them, lol. diff --git a/content/scatterplot/scatterplot.js b/content/scatterplot/scatterplot.js
index 839fed4..5efdecb 100644
--- a/content/scatterplot/scatterplot.js
+++ b/content/scatterplot/scatterplot.js
@@ -33,7 +33,6 @@ var stamenMapStyle = require('../../common/stamen-map-style');
var CodeSnippet = require('../../common/code-snippet.react');
var Markdown = require('../../common/markdown');
-
module.exports = React.createClass({
getInitialState: function getInitialState() {
@@ -53,7 +52,7 @@ module.exports = React.createClass({
startDragLngLat: null
},
locations: Immutable.fromJS(d3.range(2000).map(function _map() {
- return [37.788 + wiggle(0.01), -122.408 + wiggle(0.01)];
+ return [-122.408 + wiggle(0.01), 37.788 + wiggle(0.01), ];
}))
};
},
diff --git a/package.json b/package.json
index beb745a..ab506a8 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,7 @@
"browserify": "^12.0.1",
"budo": "^6.1.0",
"d3": "^3.5.8",
+ "global": "^4.3.0",
"highlight.js": "^8.8.0",
"immutable": "^3.7.6",
"js-stylesheet": "0.0.1", |
|
Thanks! Yes, figured that out in https://github.com/wwwtyro/react-map-gl/commit/bd1e3a1465dc62f64d1968341c95a2ff9fbbdf47 -- should have left a comment saying so, my bad. Currently working on getting react-router working. :) |
|
oh, nice! both our bad's 😜 |
|
hahaha |
|
Alright, this one is ready for another review (no hurry though, enjoy your break!). The actual wording of the docs probably needs an expert eye to make sure I'm getting things right for the 0.6.x API. |
|
Thanks, @wwwtyro! This is all looking good so far. I forgot to mention earlier but can you make sure |
|
No problem - done! |
|
@wwwtyro still seeing a lot of output from react-map-gl ((c610a79...)) -> rm -rf node_modules && npm install && npm run lint
Error: Use Uber JavaScript Standard Style (https://github.com/uber/standard)
/Users/victorpowell/Documents/projects/react-map-gl/common/code-snippet.react.js:39:6: Expected indentation of 6 characters. (indent)
/Users/victorpowell/Documents/projects/react-map-gl/common/code-snippet.react.js:40:6: Expected indentation of 6 characters. (indent)
... |
|
Weird, maybe I'm running the linter wrong or something, I'm error-free right now. The file you're running against giving that error looks like this? |
|
@wwwtyro Yep. The file looks the same. uber-standard (and standard) both enforce 2 space indentation. Maybe you have a miscellaneous react-map-gl ((c610a79...)) -> uber-standard common/markdown.js
Error: Use Uber JavaScript Standard Style (https://github.com/uber/standard)
/Users/victorpowell/Documents/projects/react-map-gl/common/markdown.js:34:6: Expected indentation of 6 characters. (indent)
react-map-gl ((c610a79...)) -> uber-standard --format common/markdown.js
react-map-gl ((c610a79...)) -> uber-standard common/markdown.js |
|
I've tried a number of things, but it keeps insisting on 4-space indentation. Looking at this in uber-standard and this eslint doc, it seems like it really does want 4 spaces. I'm kicking off a VM right now to redo all the things and make sure I'm not mucking something up. |
|
@wwwtyro I don't think npm install uber-standard@latest --saveI get slightly different output when I do that: react-map-gl ((c610a79...)) -> npm run lint
> react-map-gl-docs@0.0.0 lint /Users/victorpowell/Documents/projects/react-map-gl
> uber-standard
Error: Use Uber JavaScript Standard Style (https://github.com/uber/standard)
/Users/victorpowell/Documents/projects/react-map-gl/common/code-snippet.react.js:30:5: Expected indentation of 2 space characters but found 4. (indent)
/Users/victorpowell/Documents/projects/react-map-gl/common/code-snippet.react.js:32:5: Expected indentation of 2 space characters but found 4. (indent)I also think |
|
The eslint docs say:
err... are those the right docs? I looked for an errant |
|
I also get different errors with 5.1.0, but it's still looking for 4 spaces (it looks like it's just more particular about what lines it wants indented properly). I tried it on a VM, and it still wants 4 spaces. Not sure what else to check. :\ Is it possible you have an errant Sorry, I'm sure this is the last thing you wanted to spend time on today! :O |
|
It looks like it's looking for an .editorconfig file to define the indentation: https://github.com/uber/standard/blob/master/index.js#L72 which is 2 in the .editorconfig file included in uber-standard. editorconfig-get-indent isn't hosted on github, but I printed out what it found when looking for .editorconfig, and it didn't find anything, in which case it defaults to 4. Is it possible you have an .editorconfig file lurking somewhere in your tree above react-map-gl? As the noob here, I'm loath to point the finger at your env, but I'm not sure I can otherwise interpret the fresh VM experiment I ran. Either way, it seems that the intent is probably to use 2 spaces for indentation, so I'll do that for now. |
|
@wwwtyro That's it! Nice thinking firing up a VM. Here's what my |
refactor docs - navigable and easy-to-add examples
|
Whew, I was worried I was starting to be more annoying than useful! :D Roger wilco re: .editorconfig. 👍 Thanks for your patience & the merge! |

No description provided.