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

feat: upgrade expo, RN, and Skia (and deps) #259

Merged
merged 12 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/forty-turtles-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"victory-native": major
---

Bump Expo 51, RN 74, Skia 1.0+


2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ node_modules/
example/.expo/
dist/
web-build/
example/android/*
example/ios/*

# Native
*.orig.*
Expand Down
6 changes: 4 additions & 2 deletions example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
"bundleIdentifier": "com.formidable.victorynativexldemo"
},
"android": {
"userInterfaceStyle": "automatic"
"userInterfaceStyle": "automatic",
"package": "com.formidable.victorynativexldemo"
},
"plugins": [
"expo-router"
"expo-router",
"expo-asset"
],
"extra": {
"router": {
Expand Down
7 changes: 3 additions & 4 deletions example/app/scrollview-charts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from "react";
import { StyleSheet, View, SafeAreaView } from "react-native";
import { StyleSheet, View, SafeAreaView, ScrollView } from "react-native";
import { CartesianChart, Line, useChartPressState } from "victory-native";
import { ScrollView } from "react-native-gesture-handler";
import { Circle, useFont } from "@shopify/react-native-skia";
import type { SharedValue } from "react-native-reanimated";
import { InfoCard } from "example/components/InfoCard";
Expand All @@ -13,7 +12,7 @@ const DATA = Array.from({ length: 31 }, (_, i) => ({
highTmp: 40 + 30 * Math.random(),
}));

const BarChart = () => {
const LineChart = () => {
const font = useFont(inter, 12);
const { state, isActive } = useChartPressState({ x: 0, y: { highTmp: 0 } });
return (
Expand Down Expand Up @@ -45,7 +44,7 @@ export default function GettingStartedScreen() {
{Array.from({ length: 5 }, (_, i) => (
<React.Fragment key={i}>
<View style={styles.chart}>
<BarChart />
<LineChart />
</View>
<InfoCard style={styles.card}>
Just a page with a number of charts nested within a ScrollView
Expand Down
22 changes: 13 additions & 9 deletions example/app/stock-price.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,6 @@ const StockArea = ({
return path;
});

const gradColors = useDerivedValue(() => {
if (!isWindowActive) return [appColors.tint, `${appColors.tint}33`];

return isDeltaPositive.value
? [appColors.success[colorPrefix], `${appColors.success[colorPrefix]}33`]
: [appColors.error[colorPrefix], `${appColors.error[colorPrefix]}33`];
});

const windowLineColor = useDerivedValue(() => {
return isDeltaPositive.value
? appColors.success[colorPrefix]
Expand Down Expand Up @@ -329,7 +321,19 @@ const StockArea = ({
<LinearGradient
start={vec(0, 0)}
end={vec(top, bottom)}
colors={gradColors}
colors={
!isWindowActive
? [appColors.tint, `${appColors.tint}33`]
: isDeltaPositive.value
? [
appColors.success[colorPrefix],
`${appColors.success[colorPrefix]}33`,
]
: [
appColors.error[colorPrefix],
`${appColors.error[colorPrefix]}33`,
]
}
/>
</Path>
<Path
Expand Down
6 changes: 1 addition & 5 deletions example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
plugins: [
"react-native-dark/plugin",
"react-native-reanimated/plugin",
"expo-router/babel",
],
plugins: ["react-native-dark/plugin"],
};
};
30 changes: 0 additions & 30 deletions example/ios/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions example/ios/.xcode.env

This file was deleted.

87 changes: 0 additions & 87 deletions example/ios/Podfile

This file was deleted.

Loading
Loading