Closed lwrubel closed 3 years ago
This looks good, though when creating an extract, I get the Ooops! Something went wrong: The client noticed that the server is not a supported distribution of Elasticsearch
error on the #datasetExports
page, which I'm hoping PR 142 will also fix. But the validation works as expected, and I like the new flow through Preview before creating the dataset.
I've rebased and I'm not seeing that error--although I'm not sure I saw it before, either. Would you be able to take a look and see if it's resolved?
Looks good to me!
In addition to fixing the logic for determining if any criteria has been entered by the user, improves date field validation (via pattern regex) and HTML5 error message.
Changes included: 1) Keeps form validation client-side. 2) Removes the Create Dataset button from the Dataset Parameters tab. User must go to the Preview (or Sample Tweets) tabs. 3) Keeps modal for dataset name as is.
I overrode the message for an invalid date to say, "Use date format YYYY-MM-DD". The updated pattern is from https://www.html5pattern.com/Dates. Note that if the user enters a date before 2000 (e.g. 1999-01-01), the HTML5 error is still "Use date format YYYY-MM-DD" which is technically what they did. Twitter didn't exist in the 20th century so it would be an unusual situation to enter a date from the 1900s but open to other non-wordy error message text if deemed needed.