Ecohackerfarm / powerplant

Optimize and assist planning your garden
Other
85 stars 21 forks source link

Remove Crop property matureMeasurementUnit #62

Open petteripitkanen opened 5 years ago

petteripitkanen commented 5 years ago

The Crop property matureMeasurementUnit is used for specifying the unit of the properties matureHeight and matureWidth. The unit can currently be either meters or feet. It looks preferable to remove the unit property and convert all values to meters in the preprocessing step in db/practicalplants.js.

gljivar commented 5 years ago

What would be in that case strategy for usage of the application by people in UK or US? I have checked and some sources say that in UK there are around 27 million people who partake in gardening which is a big potential user base for the application.

I agree that algorithm should use only one measure, and it should be meters. Maybe then there can be conversion in the UI from meters to feet for these users?

petteripitkanen commented 5 years ago

There could be a test for finding the crops that have values in feet, and for each of these crops the conversion to meters should be asserted. It is probably a good idea to create the conversion function from meters to feet at the same time, and then in this test to also assert the conversion back to feet.

UI could have a preference for displaying either meters or feet. Later there could be a Garden type that contains multiple Bed objects and a geographic location. Maybe the UI could use the geographic location of the Garden objects as a hint when presenting these options.