Closed mcbouslog closed 1 week ago
I think we should have a wide-use notification that overlays on the chart. 'No valid projects found(?)' 'No data found for selected date range', etc etc.
But for now, ok to leave current functionality of: Chart shows as empty when incorrect project or date range is selected.
Agreed with Sean the barchart area can utilize a "no data for this project and/or date range" state. For the url itself, if someone manually enters an invalid project id or date range, I don't think we should modify the url, and instead we'll just handle the messaging in the presentational components. There should be no data fetching with an invalid project id or date range though. @mcbouslog thoughts on that?
To answer your question
How much validation should we do?
project_id
dates
For instance, data fetching should only occur when the above validations are true, and then if the data fetching functions don't return any stats, utilize a "no data for this project and/or date range" state in the barchart ( which can be the same barchart state if any validation fails, too ).
Need to ensure that you can't have dates earlier than March 17, 2015 in the URL (since can't pull data prior to this date)
There should be some validation/sanitation on the url search params for stats state -
project_id
,start_date
, andend_date
.When a user enters a url for their user stats page or a group stats page with an invalid stats state search param, what should we do?
project_id
included in the url has been removed"How much validation should we do?
cc: @seanmiller26