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

Improve the upgrade modal #737

Merged
merged 4 commits into from
Apr 23, 2019
Merged

Improve the upgrade modal #737

merged 4 commits into from
Apr 23, 2019

Conversation

bpierre
Copy link
Contributor

@bpierre bpierre commented Apr 19, 2019

  • Add a transition on the upgrade banner.
  • Add transitions between the highlight screens.
  • useSteps(): add the direction.

- Add a transition on the upgrade banner.
- Add transitions between the highlight screens.
- useSteps(): add the direction.
@bpierre bpierre requested a review from sohkai April 19, 2019 07:59
@luisivan luisivan mentioned this pull request Apr 19, 2019
25 tasks
Also, don’t animate the content when the modal opens.
const TRANSLATE_VALUE_HEADING = 40
const TRANSLATE_VALUE_CONTENT = 60

// Helping the styled-components `css` preprocessor
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this help at animate time? Should we do this everywhere (if using css within a react-spring)?

Copy link
Contributor Author

@bpierre bpierre Apr 22, 2019

Choose a reason for hiding this comment

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

It’s only for the css preprocessor: because animated.xyz components are not capitalized, it thinks they are HTML tags and transform them into into styled("animated.xyz") instead of styled(animated.xyz)… it’s probably pretty easy to fix, I don’t think there is any valid reason to do that.

So ideally it should be fixed in styled-components, but in the meantime, maybe we can keep doing this? We could also use a shared file to re-export all the animated.xyz into AnimXyz, I don’t really mind either way.

Edit: styled-components/babel-plugin-styled-components#220

Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ for that PR!!

Copy link
Contributor

@AquiGorka AquiGorka left a comment

Choose a reason for hiding this comment

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

When we merge useViewport we can update all of these to hook components (so much nicer on the 👀 ) 😄

Copy link
Contributor

@sohkai sohkai left a comment

Choose a reason for hiding this comment

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

🐎 🏇 🏎

@@ -193,7 +200,7 @@ HighlightScreen.propTypes = {
enterProgress: PropTypes.object,
onUpgrade: PropTypes.func.isRequired,
showProgress: PropTypes.object,
status: PropTypes.oneOf(['entering', 'leaving']),
state: PropTypes.string,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we leave this as a oneOf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided not to so we don’t have to keep it in sync with react-spring (since it’s directly coming from it now). Do you think we should list the react-spring states here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we might as well, just in case it accidentally moves underneath us without us noticing :).

@bpierre bpierre merged commit 04b5a65 into master Apr 23, 2019
@bpierre bpierre deleted the improve-upgrade-modal branch April 23, 2019 15:50
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