Open cooperzoe opened 8 months ago
The convention that I'm used to is square brackets for [optional elements]. What would you suggest as a notation to help the user understand that they can enter YYYY, YYYY-MM, or YYYY-MM-DD?
@tfmorris I didn't realize any part of the date was optional!
I think square brackets are one option, so it would look like this: YYYY[MM[DD]]
To me it was the dashes that were a bit confusing.
@cooperzoe do you mean by this that the formats allowed by this input field would then become YYYY
, YYYYMM
and YYYYMMDD
instead of YYYY
, YYYY-MM
and YYYY-MM-DD
?
Or would you only change the placeholder while keeping the supported formats identical?
I think the YYYY-MM-DD
format is more standard (ISO?) than YYYYMMDD
and is a prefix of how OpenRefine currently represents dates, so I would be inclined to keep support for it.
I would only change the placeholder (as written), and keep the supported formats identical.
Alright, then let's mark it as a good first issue, since it would only require changing the placeholder from YYYY(-MM(-DD))
to YYYY[MM[DD]]
.
I don't mind particularly, but I'm surprised that the hyphens would be omitted from the placeholder if they are required in the data. Why not YYYY[-MM[-DD]]
?
I like @ostephens's idea, but I'm not sure it's clear to new users that they can input date info if they don't have all a full date on hand.
One idea: the placeholder could read: "YYYY or YYYY-MM or YYYY-MM-DD" - though it's a bit long, if enough of the text appears I think users know to scroll sideways a bit to read it.
Or make the input box slightly longer to have the explanation text.
But I think the best alternative would be that these types of fields are also great for the idea of the help (?) info icon in their top right corner with hover text that appears upon hover or maybe click of the (?) info icon.
Quick example illustration:
I'd love our new design system to adopt some help icon like this and begin to use it in places.
I am wondering if making the box longer is possible - @wetneb, are there any constraints on that from the Wikidata POV?
I like @thadguidry's suggestion to add clickable info icon - we do have one in the design system currently. (Going forward, I'd like to make the image a bit more contemporary, but am also wary of keeping design changes consistent across OpenRefine.)
When I created a statement in my schema for uploading into wikidata, I found the placeholder text in the date input field to be counterintuitive; I expected to be able to fill in the date as indicated in the field but wasn't able to.
It tells me YYYY(-MM(-DD), so I thought I'd input 2024(-01(-04)) and didn't understand why I was getting an error!
Could this field be amended to the actual desired date format?