fix(examples): updating example microcopy#6196
Conversation
| return dasherizedDate; | ||
| }; | ||
| const dateParse = date => { | ||
| const split = date.split('/'); |
There was a problem hiding this comment.
If you modify dateFormat you'll also have to modify dateParse.
BTW, why is our microcopy suggesting the American date format use - instead of / as the delimiter?
There was a problem hiding this comment.
@abigaeljamie @afialkoff can we confirm that the changes we're making to this microcopy (MM-DD-YYYY) align with the example title AmericanFormat? The way a date is formatted by Javascript when indicating en-US (USA locale) is MM/DD/YYYY (slashes rather than dashes), so we may need to revert this update or change the title of the example per @redallen's comment
There was a problem hiding this comment.
Great catch! We recommended MM-DD-YYYY based on the existing microcopy guidelines provided for date and time formats on our PatternFly numerics page (https://www.patternfly.org/v4/ux-writing/numerics#date-and-time-formats).
What do you think is the best solution? We could change the - to / format here and update the Numerics page to match, but we'd need to make sure we carry that through to Red Hat products that have existing date formats written as MM-DD-YYYY.
Curious to hear your thoughts on this too, @abigaeljamie!
There was a problem hiding this comment.
Hm, I think the PatternFly numerics page should reflect the international choice of YYYY-MM-DD that was signed off by design for the default DatePicker implementation. That's what ISO8601 and the ECMA standard use.
There was a problem hiding this comment.
If Design already signed off on the international formatting (YYY-MM-DD) for the DatePicker implementation, I'm fine with changing the Numerics page to reflect that guidance. Would it be possible to change the component to reflect that, @evwilkin ?
There was a problem hiding this comment.
@abigaeljamie @afialkoff @redallen I'm going to pull these date formatting changes out of this PR for now, it sounds like a bigger discussion on not just how to proceed with this microcopy but with the guidelines for users and how changing this guidance will affect our users. Created #6199 as a follow-up.
|
PF4 preview: https://patternfly-react-pr-6196.surge.sh |
redallen
left a comment
There was a problem hiding this comment.
Sometimes no change is a good change :)
tlabaj
left a comment
There was a problem hiding this comment.
LGTM. We can merge once it get Abi's approval
What: Closes #5714
This PR updates microcopy across examples & demos as laid out in issue #5714