Closed frontendtony closed 5 years ago
I assume you're using a native datepicker. Let's not do that. Even though we're actually using Twitter's search, I don't want this to be presented as that. We need a simple way to let them pick a day ("January 2") without a year. At a bare minimum, this would be two dropdowns (month and day).
I also want the presentation to be more subtle propose, since the original intention was to show tweets on this day. For instance, we could instead have a message below that says "We'll find all tweets you've made on February 12." with the last part hyperlinked to a date selector.
Well done with this anyway. Could you please open a separate PR for backend and frontend parts? We could get the backend merged in faster while we review the presentation.
Also, we're not going to stick with this design, but "02/06/2018" is a NO-NO for me when it comes to datepickers. In a certain country which shall not be named, the month comes before the day, leading to confusion (June 2 or February 6). "June 2" is also more user-friendly.
I assume you're using a native datepicker. Let's not do that. Even though we're actually using Twitter's search, I don't want this to be presented as that. We need a simple way to let them pick a day ("January 2") without a year. At a bare minimum, this would be two dropdowns (month and day).
I also want the presentation to be more subtle propose, since the original intention was to show tweets on this day. For instance, we could instead have a message below that says "We'll find all tweets you've made on February 12." with the last part hyperlinked to a date selector.
Ok. Same thing I had in mind (separate dropdowns).
Well done with this anyway. Could you please open a separate PR for backend and frontend parts? We could get the backend merged in faster while we review the presentation.
PR opened here
The requested changes have been made as listed below
Nice work. 👍
I still wish there was a way to de-emphasize the day picker. Anyway, holding off on this till #22 is in.
Could you also add a screenshot of what the open dropdowns look like?
I just modified the client function to send day and month parameters in the query, instead of date
Could you also add a screenshot of what the open dropdowns look like?
I didn't add any custom styles to the dropdowns
All requested changes and corrections have been made
@shalvah Awaiting your feedback
This PR adds an option to query for a specific date in the serverless function and adds a date parameter to the URL query params on the client
Why this PR
Several users who have tested this tool (some of them I have spoken to directly) had mostly one complaint, the ability to specify the date they want to review past tweets for. It makes sense to add this as an option for those who need it
Implementation logic
API
I set the serverless function to use the URL date query parameter where available and to default to the current date where unavailable.
UI
The UI now includes a date input that defaults to the current date. This means that a date query parameter is always sent in the request when the user submits the request. The "fetch" request now include the current year for when the user selects a date between January 1 of the current year and the present date
Screenshots
Web
Mobile
A little compromise
Even though the "date" input includes a year value, it is not used in the search as the query only needs the day and month part. I used the default "date" input because there is no simple way to show a month and day input without resorting to using a "select" dropdown and a lot of JavaScript