-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DatePicker: optional underlined prop, like for TextField #6144
DatePicker: optional underlined prop, like for TextField #6144
Conversation
@betrue-final-final let me know what you think |
value={date} | ||
/> | ||
)) | ||
.add('Underlined', () => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a few of the variants here? At least required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the design end this looks good. I ok'd the screener test. Just address Micah's feedback :)
* Whether or not the Textfield of the DatePicker is underlined. | ||
* @default false | ||
*/ | ||
underlined?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my only thought here is if there is value in simply exposing the Textfield props. It does hide this mode a little bit, but avoids us deprecating it in the future if we decide to expose all the Textfield props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm interesting thought. I'm not sure if we'd ever want to expose TextField props like mask, maskChar, prefix, suffix, errorMessage, etc., but maybe I'm just overlooking a use case for those. @betrue-final-final what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah, that's a good point. there are a TON of things in there that don't make sense to expose here. If anything, we'd want to share some lower level abstraction between datepicker and Textfield.
I'm good with this as is, and if we ever come to a situation where we need to change it, we'll do it then.
That's probably from the disabled DatePicker. I'll look into it |
well that's kinda annoying. The non underline versions are different. I agree that we should be consistent within component for now. Changing the datepicker to match Textfield is a bigger conversation. Happy to have the conversation, but don't want to hold up this PR to make that pretty significant change. |
@lorejoh12 just a heads up that we're adding this variant to the datepicker. We noticed that you have your own version already, hopefully this alleviates the need for as many overrides. As for discrepancy between outlook at SharePoint, is there design guidance there? Is moving towards black underline where your design is headed, and SharePoint should consider following? |
Pull request checklist
$ npm run change
Description of changes
This feature was pretty easy to add, but it'd be great if design could look over it, too! It is an optional prop, so you'd only see a difference when passing
underlined
into DatePicker. Otherwise, it is rendered normally. I added a VR test as well and some screenshots below:Microsoft Reviewers: Open in CodeFlow