Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

[terra-date-picker] Remove placeholder #1239

Merged
merged 10 commits into from
Sep 14, 2020

Conversation

pranav300
Copy link
Contributor

@pranav300 pranav300 commented Sep 11, 2020

Summary

This PR

  • Removes placeholder.
  • Added format to be displayed for both DatePicker and DatePickerField.

Link: jira for translations.

A part of #1193

Deployment Link

https://terra-framework-deployed-pr-#.herokuapp.com/

Testing

Date Picker:
Screenshot 2020-09-11 at 6 36 25 PM

Date Picker Field:
Screenshot 2020-09-11 at 6 36 43 PM

Additional Details

Thank you for contributing to Terra.
@cerner/terra

@@ -222,13 +229,25 @@ const DatePickerField = (props) => {
mergedInputAttrs = { 'aria-describedby': ariaDescriptionIds, ...inputAttributes };
}

const helpLabel = help ? (
<div id="format" aria-label={`Date Format: ${intl.formatMessage({ id: 'Terra.datePicker.dateFormat' })}, ${help}`}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this id also be randomized like the other places?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field component doesn't require a description id as they internally provide helpDescriptionIds. I had format just to give that div an id.

@@ -20,6 +21,11 @@ const propTypes = {
* Callback ref to pass into the calendar button dom element.
*/
buttonRefCallback: PropTypes.func,
/**
* @private
* To check if help element is provided by the field or not.
Copy link
Member

@neilpfeiffer neilpfeiffer Sep 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* To check if help element is provided by the field or not.
* NOTICE: Internal prop to be used only by Terra framework. This component provides a built-in format mask that is required to be displayed to users for proper accessibility and must not be removed. 'DatePickerField' is permitted to set this prop because it provides the same format mask in its 'help' prop.

Suggestion to switch propType to a boolean, default to false, and update prop name (e.g. useExternalFormatMask)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated here 80414a5. And added translations

@mjhenkes mjhenkes temporarily deployed to terra-framew-date-picke-vmnaoa September 11, 2020 17:20 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-framew-date-picke-vmnaoa September 11, 2020 20:11 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-framew-date-picke-vmnaoa September 11, 2020 20:26 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-framew-date-picke-vmnaoa September 14, 2020 03:10 Inactive
@mjhenkes mjhenkes temporarily deployed to terra-framew-date-picke-vmnaoa September 14, 2020 06:10 Inactive
@neilpfeiffer
Copy link
Member

neilpfeiffer commented Sep 14, 2020

Tested: PR #1239
Part 3 of 3 for issue #1193

Reviewed:

  • Removes placeholders for format mask

  • Add Date Format Mask as description text below Date-Picker

  • Add Date Format Mask in with Help text in DatePickerField



Fix with Followup Issues:

  • Enhancement: [add issue #] Enhance keyboard navigation, today shortcut, focus styling
  • Enhancement: [add issue #] Remove ErrorIcon from Terra-Field





Verified by @neilpfeiffer, Ready to Merge

Pass
UX Review

@neilpfeiffer neilpfeiffer added ⭐ UX Reviewed UX Reviewed and approved. and removed UX Review Required labels Sep 14, 2020
@ryanthemanuel ryanthemanuel merged commit 6472407 into main Sep 14, 2020
@ryanthemanuel ryanthemanuel deleted the date-picker-remove-placeholder branch September 14, 2020 11:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants