natcap / urban-online-workflow

This repository hosts the beta implementation of the Urban Online ES Workflow. The project is intended to give urban planners the ability to create and assess scenarios using InVEST Urban models.
1 stars 5 forks source link

Feature/3 scenario setup #14

Closed davemfish closed 2 years ago

davemfish commented 2 years ago

This PR builds the scenario-creation form around the API designed in #2 . There's a fake backend here now in scenario.js, which uses the browser for storage. But that will be completely replaced, and then the calls in requests.js can be updated. I think the set of functions in requests.js will stay, but the body of each one will be rewritten against the real backend.

The functionality includes:

I tried out Blueprint for basic react components. No complaints so far, but I also don't think we're locked in to that if we want to continue trying other libraries. I briefly considered Carbon but shied away from it when I saw it requires configuring a SASS build. That's probably not a big deal, it's just one more new thing I didn't want to get stuck on right now.

I also added a basic eslintrc.js which we can continue to modify with our preferences.

emlys commented 2 years ago

I'm getting a warning in the console when I first load the page:


Warning: Each child in a list should have a unique "key" prop.

Check the render method of `ScenarioTable`. See https://reactjs.org/link/warning-keys for more information.
td
ScenarioTable@http://localhost:3000/src/scenarioTable.jsx:24:7
div
div
Tabs2@http://localhost:3000/node_modules/.vite/deps/@blueprintjs_core.js?v=7f24dc36:17831:24
div
EditMenu@http://localhost:3000/src/edit.jsx:31:7
div
div
App@http://localhost:3000/src/App.jsx:23:55
davemfish commented 2 years ago

Okay I removed the popup code. And I addressed the warning about missing keys. Thanks!