Closed jadudm closed 1 year ago
For now, the frontend team should develop against the sketches provided. We'll revise the look-and-feel of the page later; the elements will not change. So, please use best judgement for your initial implementation. You won't have a "Figma source of truth" at the moment.
This is where we landed 2023-06-13:
Django will do minimal validation, but may throw out some invalid fields.
The minimal search has several parameters that want to be minimally validated on the frontend before being passed to the backend as a JSON object.
The interface will have a left-hand set of search terms, with a Federal warning modal occupying the body to start.
Interface elements
We will not report errors to the user. If they throw garbage in here, we will filter it out and pass good data to the backend as best we can. We can ticket coming around to error reporting later, but for MVP, if they put garbage in, they will get no search results.
eg. in some language-ish
Per above, no error reporting. Just filter and send.
This list is in our validation code and other places. Do not pass "ANY" to the backend; in other words, the default value should not ship; if they select a value, pass that in the object. It should be an ignored search term if untouched. It may be better practice to leave it blank as a default than to have the word "ANY"; that decision is in design/FE's hands.
Pass, as an array, the years selected.
The theory here is the backend should be able to trust that if the user sets any date, that both fields will always be populated. We will come back to this if the backend/DB team later say that this causes problems for optimization.
We will not attempt to disable the button based on search term contents. Instead, we will check (in JS) that the query object, when gathered up, is empty. If it is empty, then we display a warning. This saves sending an empty search query.
See the backend breakout for sync with backend.