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

Allows selecting the end date first for unattached vertically oriented datepickers #121

Merged
merged 1 commit into from
Nov 1, 2016

Conversation

majapw
Copy link
Collaborator

@majapw majapw commented Oct 13, 2016

This was behavior from back when we assume the vertical orientation would only ever be used on mobile devices and with a portal. This fixes the assumption.

to: @airbnb/webinfra

@majapw majapw force-pushed the maja-fix-vertical-datepicker-focus-logic branch from 2f63852 to 71f9c88 Compare October 13, 2016 21:17
@majapw majapw force-pushed the maja-fix-vertical-datepicker-focus-logic branch from 71f9c88 to b53bed3 Compare October 13, 2016 22:08
@coveralls
Copy link

Coverage Status

Coverage remained the same at 87.969% when pulling b53bed3 on maja-fix-vertical-datepicker-focus-logic into bc06856 on master.

@ljharb ljharb added the semver-major: breaking change A non-backwards-compatible change; anything that breaks code - including adding a peerDep. label Oct 31, 2016

if (!startDate && orientation === VERTICAL_ORIENTATION && !disabled) {
// Since the vertical datepicker is full screen, we never want to focus the end date first
if (!startDate && withFullScreenPortal && !disabled) {
Copy link
Member

Choose a reason for hiding this comment

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

do we want to keep this as semver-minor by leaving the vertical orientation check in place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

well but the old behavior was like, broken. So I think this needs to stay.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

LGTM pending a test and a rebase

@@ -894,12 +894,12 @@ describe('DateRangePicker', () => {
});
});

describe('props.orientation = VERTICAL_ORIENTATION', () => {
describe('props.withFullScreenPortal is truthy', () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the test @ljharb

@majapw majapw merged commit 0d5044f into master Nov 1, 2016
@majapw majapw deleted the maja-fix-vertical-datepicker-focus-logic branch November 1, 2016 00:25
@majapw majapw added semver-patch: fixes/refactors/etc Anything that's not major or minor. and removed semver-major: breaking change A non-backwards-compatible change; anything that breaks code - including adding a peerDep. labels Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch: fixes/refactors/etc Anything that's not major or minor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants