Selector Ingestion Design Document
Introduction
We are close to ingesting the MCCC, SCCC, and eventually WCCC. In order to do this we will need to update the front end to be more dynamic
Big Picture Changes
The user will need to choose state (will infer council → region) → zone on application start up. Example: MCCC → Iowa → Adams
Modal? Landing page?
Ideally use IP address to guess zone and have an option to switch councils
Info sheet will need to be generated dynamically
Some features will need to be shown/hidden based on the council
Will need to update about, help for each council
Questions for Brian / Sarah / Steven / Chris
Can we make calendar view the default instead of list view for all regions? This would make the default flow more similar to the MCCC
Yes
Can we make the selector the default tab instead of the explorer? This will also make the default flow more similar to the MCCC
Yes
If yes to the above two, is it enough to have the default flow build the output the MCCC would expect but also add on some of the other features of the NECCC
Map seems like they said was a deal breaker
Explorer
List view for selector
My cover crop list
Do we need to change the color theme and show the logo for each council or can we have one homogenous front end and not show logos?
Yes we need to have colors match the council eventually
v1 logo switch colors stay the same
How much do we need to engage with all the councils as we’re making these changes?
Big Unresolved Questions
Are we responsible for hosting MCCC site
Do we need a national front end that has no logo or branding
Does each council need it’s own unique tool hosted by us
Restructure How Data Dictionary is Used
Currently the data dictionary is used in
TooltipMaker.js → only uses the goal descriptions, should be passed down as a prop or live in global state
CropSidebar.js → uses the data dictionary to generate the sidebar object, should be done on the backend
Header.js → filters to only return goals
d.Category === 'Goals' && d.Variable !== 'Notes: Goals'
from the data dictionary and then sets it in redux. generation should happen on the back endInformationSheetDictionary.js → uses all info sheet values where
dict['Information Sheet'] === true || dict['Infromation Sheet'] === true
should be filtered on the back endMyCoverCropComparison.js → only uses the goal descriptions, should be passed down as a prop or live in global state
We will probably want to make routes that return the subsets necessary for the above components or fetch the data dictionary once on zone change and store it in the global state
API Call Restructure Flow
We’ll need to get rid of the legacy object API calls and replace them with a sequence of smaller API calls
Select state → (infer council, region)
Get zones → select zone
Get possible new route saying what features to show/hide
Example MCCC has no map but NECCC has map
Get goals (new route gets goals for council, region, zone combo) → select goal(s)
Get filters (new route, returns list of filter and their descriptions. eliminates the need for TooltipMaker.js, Header.js, MyCoverCropComparison.js data-dictionary calls, handles
generateSidebarObject
logic on the back end) → generate sidebarGet crops → show list of crops, object contains all filters
Get information sheet (new route, no longer legacy data dictionary, only returns values needed to build info sheet, excluding filters, description, sources, comments, etc) → on click of crop
Get data dictionary (new route? generates object used to explain groupings of attributes) → on click of data dictionary