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

Lift component improvements (values + animation) from MM #1330 #450

Merged
merged 2 commits into from
Jul 15, 2016

Conversation

edhenderson
Copy link
Contributor

@edhenderson edhenderson commented Jul 14, 2016

  • added a max and min lift (2 == 200%)
  • curtailed our lift values
  • added animation
  • smarter variable names

@edhenderson edhenderson self-assigned this Jul 14, 2016
@edhenderson edhenderson changed the title 🍺 #1330 ❄️ Lift component improvements (values + animation) from MM #1330 Jul 14, 2016
@edhenderson edhenderson assigned alexkarim and unassigned edhenderson Jul 14, 2016
@edhenderson edhenderson force-pushed the eh-1330 branch 2 times, most recently from d835cf6 to ae77477 Compare July 14, 2016 21:21
@alexkarim
Copy link
Contributor

@edhenderson LGTM

@edhenderson edhenderson assigned edhenderson and unassigned alexkarim Jul 15, 2016
@edhenderson
Copy link
Contributor Author

❄️ HOLD for now.

@edhenderson edhenderson force-pushed the eh-1330 branch 2 times, most recently from 9d30a35 to aba5227 Compare July 15, 2016 06:42
@edhenderson
Copy link
Contributor Author

@apapirovski I don't want to merge this one just yet. The animation is looking a little janky. Its most likely the way I implemented it OR your example only had 1 hot thumb to mouse over. Can you take a look at this branch and give me your thoughts please?

<ReactCSSTransitionGroup transitionName="xxFadeInOutSequential" transitionEnterTimeout={400} transitionLeaveTimeout={400}>
<div className="xxLift-container" key={`lift-${classicLiftPercent}-${neonLiftPercent}-${originalLiftPercent}`}>
<strong className="xxLift-title">{T.get('copy.lift.units', {
'@lift': classicLiftPercent
Copy link
Contributor

Choose a reason for hiding this comment

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

This should always show the real Lift value, not the limited one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted

@apapirovski
Copy link
Contributor

apapirovski commented Jul 15, 2016

I see what you mean about the jank. Working on a fix. Will commit to this branch if you're ok with it?

@edhenderson
Copy link
Contributor Author

Were you able to see the animation in action?

@edhenderson
Copy link
Contributor Author

Crossed beams. Thanks.

@edhenderson
Copy link
Contributor Author

Whatever your fix. Needs to work in the xx sandbox at least and bonus here too. Cheers.

@edhenderson
Copy link
Contributor Author

@apapirovski I pushed a tweak (in case your working on this).

neonLift,
neonLiftPercent
// rawLift = isNaN(self.props.displayThumbLift) ? 0 : self.props.displayThumbLift,
rawLift = 30,
Copy link
Contributor

@apapirovski apapirovski Jul 15, 2016

Choose a reason for hiding this comment

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

Testing value? Seems like you're not using the prop displayThumbLift.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, I forgot a commit to put it back.

@apapirovski
Copy link
Contributor

apapirovski commented Jul 15, 2016

@edhenderson I'm working on a fix. It's a bit more complicated because ReactCSSTransitionGroup doesn't allow transitions to be interrupted and it's also no longer maintained by Facebook & the core React team. Trying to figure out whether I have to fork it and add the ability to interrupt transitions, or I can work around it somehow.

See facebook/react#5028 for more info.

@edhenderson
Copy link
Contributor Author

@apapirovski Might be worth pulling into a separate PR then?

@apapirovski
Copy link
Contributor

@edhenderson Maybe. If I have to do anything more complicated, I'll create a separate PR. If it's just a matter of some CSS or using something like react-motion for this particular transition then I think it would be fine to keep in this one. (To avoid needing you to rebase, integrate changes, etc.)

Your call though.

@edhenderson
Copy link
Contributor Author

This won't be merged till the PM at the earliest so see what you got by then.

@apapirovski
Copy link
Contributor

apapirovski commented Jul 15, 2016

Not perfect but this should work 99.9% of the time. The alternatives — such as creating our own fork of ReactCSSTransitionGroup — are also hardly perfect (since that would be a maintenance headache).

I might work on my own library for handling CSS transitions in React, which can be directly swapped with ReactCSSTransitionGroup. If that does happen, I'll send you an update so you can integrate that instead.

@edhenderson
Copy link
Contributor Author

OK, so GTG now?

@edhenderson edhenderson changed the title ❄️ Lift component improvements (values + animation) from MM #1330 Lift component improvements (values + animation) from MM #1330 Jul 15, 2016
@apapirovski
Copy link
Contributor

Yeah, I think it is.

@edhenderson
Copy link
Contributor Author

OK, when I merge it, if you got time, can you pull development and check you are happy with it. (I need to rebase).

edhenderson and others added 2 commits July 15, 2016 12:09
- added a max and min lift (2 == 200%)
- curtailed our lift values
- added animation
- smarter variable names
- added animation constant
- better variable names
- don’t throttle the `displayLiftPercent`, i.e. use `rawLift` before
its constrained
@edhenderson edhenderson merged commit c654f71 into development Jul 15, 2016
@edhenderson edhenderson deleted the eh-1330 branch July 18, 2016 07:33
@edhenderson edhenderson removed their assignment Jan 16, 2017
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.

3 participants