User History Introduction - Nitrogen Calculator
The user history feature enables users to save their calculation process, so they don’t have to reselect options each time they log in. When users log in again, the application retrieves this data from the backend, allowing them to resume their previous selections without reconfiguring their choices. This enhances user experience by providing a personalized interaction with the app.
Schema definition:
The history data saved in the backend is defined by schema
, and will update constantly.
You can find the documentation about setting up schema
here.
The schema
number currently used is specified in .env
file. Currently the schema
only contains the structure of the history object:
Note: Some of the large models will not be saved in the history, like the biomass map and soil models, and the calculation model on the output page. On each page the data will be loaded from api calls.
User experience:
Unlike the species selector and seeding rate calculator, there are two user history systems existed for logged user and unlogged users, the user history are based on user history api and browser storage. Both the user history will save same records. To utilize the user history feature, on the location page, the user could give the field a name to save the calculation to the history. After all the selection are done, the history will be saved to the backend.
To load the history, use the dropdown on the top right corner to select one record and load the history. This allows the user view the previous selections or make any changes. Each time when user need to update any selections, they will have to finish all selections and the history will be updated on the Output page.