Skip to content

Conversation

@nboliver
Copy link

No description provided.

@coveralls
Copy link

coveralls commented Apr 13, 2017

Coverage Status

Coverage increased (+0.02%) to 83.927% when pulling aea2784 on nboliver:daypicker_height into a5fb097 on airbnb:master.

@majapw
Copy link
Collaborator

majapw commented Apr 13, 2017

Can you explain the motivation for why you want to do this? Because reaching into the child component to grab a method is generally an antipattern.

@nboliver
Copy link
Author

nboliver commented Apr 13, 2017

Updated this PR in response to your comments in the issue. Let me know if you think that covers the possible situations when it might need to update.

@coveralls
Copy link

coveralls commented Apr 13, 2017

Coverage Status

Coverage decreased (-0.2%) to 83.728% when pulling 877cd7e on nboliver:daypicker_height into 782b5f3 on airbnb:master.

@nboliver nboliver changed the title Expose adjustDayPickerHeight to parent components Update conditions when adjustDayPickerHeight is called Apr 13, 2017
@coveralls
Copy link

coveralls commented Apr 13, 2017

Coverage Status

Coverage decreased (-0.2%) to 83.728% when pulling 811212a on nboliver:daypicker_height into 782b5f3 on airbnb:master.

@nboliver
Copy link
Author

@majapw Any further thoughts on this? I was wondering if maybe adjustDayPickerHeight should always be called when the component receives props. It's a tough balance between performance and making sure it is always the correct dimensions.

componentWillReceiveProps(nextProps) {
...
  if (this.isHorizontal()) {
    this.adjustDayPickerHeight();
  }
...
}

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.

This needs a rebase and some sort of test coverage.

@coveralls
Copy link

coveralls commented Apr 19, 2017

Coverage Status

Coverage decreased (-0.2%) to 83.781% when pulling add3b41 on nboliver:daypicker_height into 3815516 on airbnb:master.

@nboliver
Copy link
Author

@ljharb rebased - anything else required? what do you think of my comment above about calling adjustDayPickerHeight every time the component receives props?

@coveralls
Copy link

coveralls commented Apr 26, 2017

Coverage Status

Coverage increased (+0.07%) to 84.03% when pulling 3750622 on nboliver:daypicker_height into 3815516 on airbnb:master.

}
}

if (orientation !== prevProps.orentation || daySize !== prevProps.daySize) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not super sure why this isn't just integrated into the above conditional? Let's make that change and then merge this in.

Copy link
Member

Choose a reason for hiding this comment

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

I think it still needs nonzero test coverage before going in tho, if possible.

@brosewarne
Copy link

I've attempted to update / finish this in #640

@majapw
Copy link
Collaborator

majapw commented Sep 6, 2017

Closing in favor of #640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants