-
Notifications
You must be signed in to change notification settings - Fork 11
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
Start 'Street Explorer' test browser for viewing tests #23
Conversation
Heads-up, you'll need to rebase against 3fac825, which simplified build deps a bit. It should be straightforward. It's awesome to see this come along! I'm curious how you find yew; does it work well as a way of writing web apps? If you were using pure JS or TypeScript, what would your typical tech stack of choice be? |
Come hang out at https://github.com/a-b-street/osm2streets to ask questions and improve these docs. | ||
|
||
## Pre-requisites | ||
- rust beta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rust nightly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest just encoding this using https://github.com/a-b-street/osm2lanes/blob/main/rust-toolchain.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rust beta seems to be working for me, if I understand my setup right, so I'd like to stay there if possible. I'll add the rust-toolchain.toml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay, I missed your ping for my attention :)
I suggest already preparing the continuous deployment to github.io, even if still unfinished.
Come hang out at https://github.com/a-b-street/osm2streets to ask questions and improve these docs. | ||
|
||
## Pre-requisites | ||
- rust beta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest just encoding this using https://github.com/a-b-street/osm2lanes/blob/main/rust-toolchain.toml
gloo-utils = "0.1" | ||
leaflet = { git = "https://github.com/droogmic/leaflet-rs", branch = "polyline_get_bounds" } | ||
log = "0.4" | ||
#osm2lanes = { path = "../osm2lanes", features = ["overpass"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll start working at dropping the dependencies you need out of the bottom of osm2lanes :)
+1 on this, as I am not a web / full stack dev. I approached yew as a systems software engineer. |
Through circumstance more than anything, I have worked a lot with React in Meteor projects. I like the declarative style of React, and being consistent with the flow of data. Looking at the osm2lanes source, yew looks pretty neat. The "event -> message -> state transition -> view calls" workflow seems sensible to me, and being in rust land will bring advantages, right? Like being able to call the impl directly. The first hurdle will be for me to learn how to interface with existing JS. It looks like I could write the bindgen translation thingo to call into |
Calling the impl directly isn't one, IMO. We need to make sure the APIs are easy to call in a variety of languages, so more people will actually use them. Calling directly from JS isn't that bad -- see https://github.com/a-b-street/osm2lanes/blob/main/osm2lanes-npm/src/lib.rs and https://github.com/a-b-street/osm2lanes/blob/main/osm2lanes-npm/web/index.html for an example of that. It just uses serde to turn the Rust result into JSON. If we want the resulting object in JS to have methods that call back to Rust, there's probably a way of doing that too, but I haven't got that far in the docs.
Unless you specifically like yew or another Rust web framework, I wouldn't advocate for its use, especially if it's going to be hard to interface with things that're easier to do in JS anyway. Also a bit selfishly, I wouldn't mind watching along as you build a React/Meteor app to learn the "normal / modern" JS way of doing things. |
Using osm2streets via its npm package would be ideal. Its a good demo of the package, which can trivially be added onto the existing client-side Test Explorer whatever the stack. I will build the Explorer out as a vanilla JS "app", using Maybe serving up test results becomes an API that the test explorer can fetch from. That way, diffs could be served, hot off the build server as the result of a PR check or something. So far, a directory of files is the whole API, so I'll let Lots of the state is already managed by the |
:)
Yes, great idea! #26 |
I will leave these for the next PR:
|
Works towards #22, closes #13 by introducing a
trunk serve
slippy map with controls, that (will hopefully soon) shows the test data fromtests/
.TODO
Generate the test list at build time, link to the.json
filesCC @droogmic @dabreegster