This PR turned out to be more worthwhile than anticipated. The move to configuration by file tightened up the code enormously. This is now a professional grade app suitable for management and deployment by people other than its developer.
TODO:
[x] Title
[x] Colour scale definitions in src/components/DataMap/stationColor.js
[x] Appearance of station markers: src/components/DataMap/DataMap.js - locationMarkerOptions, dataMarkerOptions
[x] Contents of src/utils/variables.js
[x] Datasets and labels thereof
[x] Layer group names and order
[x] Backend URL(s)
[x] Style for controls
[x] Date selector config
This PR touches a lot of files, but the touches consist almost entirely of:
Move config to the config file; get it via the config context (const config = useConfig())
Code cleanup:
Remove all smoke tests. They deliver little to no value, and impose a maintenance overhead.
Remove other unnecessary files (CSS, unused components, etc.)
Split up files defining multiple components.
Add a few new utility components (e.g., VariableUnits).
@jameshiebert , I'd appreciate your feedback on the UI. There are a few minor changes to behaviour and appearance:
Variable, dataset, and date controls are fully configurable. (Minor changes to their appearance in the present config.)
Colour scale is fully configurable. (Minor changes to their appearance in the present config.)
Station location marker appearance is fully configurable. (No change.)
Station data markers always show the station location with a location marker in at the centre of the coloured marker. (This was not true before.)
Using the layer control, you can optionally turn on markers (small dots again) for baseline and/or monthly data as a comparison. (Layer names configurable, because why not.)
Location markers are always overlaid on coloured data markers. (Configurable.)
Many other items, e.g., labels for variables and datasets, are configurable.
Resolves #86 Resolves #89 Resolves #92 Resolves #85
This PR turned out to be more worthwhile than anticipated. The move to configuration by file tightened up the code enormously. This is now a professional grade app suitable for management and deployment by people other than its developer.
TODO:
src/components/DataMap/stationColor.js
src/components/DataMap/DataMap.js
-locationMarkerOptions
,dataMarkerOptions
src/utils/variables.js
This PR touches a lot of files, but the touches consist almost entirely of:
const config = useConfig()
)