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

Add anchorDirection prop to allow right-aligned Components #72

Merged
merged 1 commit into from
Oct 11, 2016

Conversation

travisbloom
Copy link
Contributor

@travisbloom travisbloom commented Sep 9, 2016

DateRangePicker and SingleDatePicker have a new prop, directionAnchor
that will align the components to the left/right side of the page.
This prop has two new constants, DIRECTION_ANCHOR_LEFT (default)
and DIRECTION_ANCHOR_RIGHT.

solves issue #71

left: 162px;
}
.DateRangePicker__picker--direction-right.DateRangePicker__picker--end::before {
right: 101px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unsure if there's a measurement strategy that should be used to calculate these offsets, just tried to eye them. Let me know if there's a calculation you were relying on (and the we can add a $sass-variable)

Copy link
Collaborator

Choose a reason for hiding this comment

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

They're kind of yoloed right now, which is like, well a whole thing. I think we should figure out some way to pin them to the input instead of the picker itself. It will help us with #83 as well.

Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

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

I think that the naming feels a little off to me. Can we rename the prop to anchorDirection and the constants to ANCHOR_LEFT and ANCHOR_RIGHT maybe. That makes more sense in my head. What do you think?

The change looks great and I think once we settle on the naming scheme we can merge it in.

@majapw majapw added needs rebase Please rebase your branch onto latest master! This removes merge commits, & keeps the git log clean. semver-minor: new stuff Any feature or API addition. labels Sep 15, 2016
@travisbloom travisbloom force-pushed the allow-different-directions branch 3 times, most recently from dc8f6b8 to fde2a41 Compare October 8, 2016 18:28
@travisbloom
Copy link
Contributor Author

@majapw fixes added

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 88.31% when pulling fde2a41 on rocketrip:allow-different-directions into 8c03d77 on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 88.31% when pulling fde2a41 on rocketrip:allow-different-directions into 8c03d77 on airbnb:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 88.31% when pulling fde2a41 on rocketrip:allow-different-directions into 8c03d77 on airbnb:master.

@Olliepop
Copy link

What's necessary to see this merged? This would be huge for us. Do you need any help?

@majapw
Copy link
Collaborator

majapw commented Oct 11, 2016

Looking into it today! I think it's basically ready. :)

On Tue, Oct 11, 2016, 8:40 AM Oliver Shaw notifications@github.com wrote:

What's necessary to see this merged? This would be huge for us. Do you
need any help?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#72 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABUdtfQ9nYuCibqFcYDFDboLJbvCOJKVks5qy63XgaJpZM4J5aY8
.

DateRangePicker and SingleDatePicker have a new prop, directionAnchor
that will align the components to the left/right side of the page.
This prop has two new constants, DIRECTION_ANCHOR_LEFT (default)
and DIRECTION_ANCHOR_RIGHT.
@travisbloom
Copy link
Contributor Author

@majapw just fixed a rebase issue with my other PR, let me know if there are any concerns :)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 87.969% when pulling f67c18c on rocketrip:allow-different-directions into 081375f on airbnb:master.

Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

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

Wonderful! Thank youuuu. Hopefully a lot of this css nonsense will be easier once we get the responsive PR going.

@majapw majapw removed the needs rebase Please rebase your branch onto latest master! This removes merge commits, & keeps the git log clean. label Oct 11, 2016
@majapw majapw merged commit ed1c43d into react-dates:master Oct 11, 2016
@majapw
Copy link
Collaborator

majapw commented Oct 11, 2016

I don't really know why the approval check wasn't passing. :/

@Olliepop
Copy link

Thanks guys, this is awesome! Is this worthy of a version bump?

@majapw
Copy link
Collaborator

majapw commented Oct 11, 2016

Just released v3.3.0 which should include this change! :)

@majapw majapw changed the title Add directionAnchor prop to allow right-aligned Components Add anchorDirection prop to allow right-aligned Components Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor: new stuff Any feature or API addition.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants