[go: up one dir, main page]

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

adding gradient background component #1759

Merged

Conversation

JayPerfetto
Copy link
Contributor
@JayPerfetto JayPerfetto commented Aug 7, 2021

Please verify the following:

  • yarn ci:test jest tests pass with new tests, if relevant
  • README.md has been updated with your changes, if relevant

Describe your PR

Adding a component which can be used as a LinearGradient Background wallpaper. I have replaced the use of the Wallpaper component in the demo screens, since it was not loading quickly enough in development builds and causing the UI to "flash" white when performing a navigation event. The component takes in an array of hex strings as props, so a user can customize the appearance of the gradient.

It's worth noting that this component required adding the dependency expo-linear-gradient and raising the minimum iOS deployment target from 10.0 to 11.0 as a result. I tried to look into a lower level implementation of this, but all roads seemed to point to either this or the library "react-native-linear-gradient".

This is my first PR for this project, but I did my best to conform to existing code style + conventions! Feedback is welcome 😅

@JayPerfetto
Copy link
Contributor Author

I'm gonna need a pointer resolving this failed test - The failure is complaining about seemingly normal import syntax, and I don't want to go changing babel configs without discussion first

@carlinisaacson
Copy link
Member

Hi @JayPerfetto, thanks for the PR. I haven't looked through the changes yet, but I did pull it down and look at the failing tests. To fix them, you just need to add the expo-linear-gradient package to the transformIgnorePatterns in the boilerplate package.json. You can find documentation for that property in the Jest docs here.

@jamonholmgren
Copy link
Member

This looks great! Just adding that Jest transformIgnorePatterns property and then we should be good to ship. Thanks @JayPerfetto !

@carlinisaacson
Copy link
Member

Had some time to scan through the code. Looks good!

@JayPerfetto
Copy link
Contributor Author

Great! I just checked in that change and it looks like everything is passing now - thanks for the quick pointer there

@jamonholmgren jamonholmgren merged commit 2efdf7e into infinitered:master Aug 10, 2021
@jamonholmgren
Copy link
Member

@JayPerfetto This is great, thanks. Now you're forever one of us. 💜

infinitered-circleci pushed a commit that referenced this pull request Aug 10, 2021
# [7.2.0](v7.1.1...v7.2.0) (2021-08-10)

### Bug Fixes

* **boilerplate:** Adds gradient background component, replacing Wallpaper ([#1759](#1759) by @JayPerfetto) ([2efdf7e](2efdf7e))

### Features

* **navigation:** Upgrade React Navigation to V6 ([#1758](#1758) by [@harrisrobin](https://github.com/harrisrobin)) ([5dd10ee](5dd10ee))
@infinitered-circleci
Copy link

🎉 This PR is included in version 7.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants