Skip to content
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

Merged
merged 4 commits into from
Aug 30, 2018

Conversation

natalieethell
Copy link
Contributor

@natalieethell natalieethell commented Aug 30, 2018

Pull request checklist

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:

image

image

Microsoft Reviewers: Open in CodeFlow

@natalieethell
Copy link
Contributor Author

natalieethell commented Aug 30, 2018

@betrue-final-final let me know what you think

value={date}
/>
))
.add('Underlined', () => (
Copy link
Member

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

Copy link
Member

@betrue-final-final betrue-final-final left a 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;
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

@micahgodbolt
Copy link
Member

image

@natalieethell
Copy link
Contributor Author

That's probably from the disabled DatePicker. I'll look into it

@micahgodbolt
Copy link
Member

looks like 1 change incoming. Focus color of the bottom line should be primary like Textfield

image

@natalieethell
Copy link
Contributor Author

To me, it looks like it has the same behavior as the normal DatePicker when opened. Do we want different behavior?

image

image

@micahgodbolt
Copy link
Member

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.

@micahgodbolt
Copy link
Member

Also, the black is also how it's done currently in production

image

@betrue-final-final
Copy link
Member

Will ok for now. FYI it's out of sync with SharePoint.
image

@micahgodbolt
Copy link
Member

@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?

@micahgodbolt micahgodbolt merged commit dc9f8b9 into microsoft:master Aug 30, 2018
@natalieethell natalieethell deleted the datePickerUnderlined branch October 22, 2018 20:33
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Underlined option for DatePicker
3 participants