Skip to content

Instantly share code, notes, and snippets.

@jehartzog
jehartzog / gist:646538fdb90edf9aee4e14c7c26cb2af
Created May 4, 2023 15:54
copy of vimeo embed react component
import React from "react";
import Vimeo from "/imports/api/video/vimeo/vimeo";
// @ts-expect-error TS(7016): Could not find a declaration file for module '@vim... Remove this comment to see the full error message
import VimeoPlayer from "@vimeo/player";
import VimeoLogging from "./vimeo-logging";
type Props = {
@jehartzog
jehartzog / react-native-image-crop-picker+0.36.4.patch
Last active May 22, 2024 20:23
react-native-image-crop-picker+0.36.4.patch
diff --git a/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m b/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m
index cb64b7d..cc7b353 100644
--- a/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m
+++ b/node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m
@@ -153,7 +153,7 @@ - (UIViewController*) getRootVC {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
- picker.allowsEditing = NO;
+ picker.allowsEditing = YES;
@jehartzog
jehartzog / stream-chat-react-native-core+3.6.0.patch
Created July 22, 2021 01:03
Avoid occasional iOS CPU looping for stream-chat-react-native
diff --git a/node_modules/stream-chat-react-native-core/src/components/ImageGallery/ImageGallery.tsx b/node_modules/stream-chat-react-native-core/src/components/ImageGallery/ImageGallery.tsx
index a443f69..7ea15c7 100644
--- a/node_modules/stream-chat-react-native-core/src/components/ImageGallery/ImageGallery.tsx
+++ b/node_modules/stream-chat-react-native-core/src/components/ImageGallery/ImageGallery.tsx
@@ -180,6 +180,7 @@ export const ImageGallery = <
: vh(100);
const halfScreenHeight = screenHeight / 2;
const quarterScreenHeight = screenHeight / 4;
+ const snapPoints = React.useMemo(() => [0, (screenHeight * 9) / 10], []);
diff --git a/node_modules/@testing-library/react-native/build/helpers/byText.js b/node_modules/@testing-library/react-native/build/helpers/byText.js
index 182bc6a..54dad43 100644
--- a/node_modules/@testing-library/react-native/build/helpers/byText.js
+++ b/node_modules/@testing-library/react-native/build/helpers/byText.js
@@ -54,7 +54,8 @@ const getNodeByText = (node, text) => {
const isTextComponent = (0, _filterNodeByType.filterNodeByType)(node, Text);
- if (isTextComponent) {
+ // https://github.com/callstack/react-native-testing-library/issues/553#issuecomment-719108211
@jehartzog
jehartzog / AppDelegate.m
Last active April 15, 2021 19:42
New App AppDelegate.m For Iterable Build Issue
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
// UniModules per https://docs.expo.io/bare/installing-unimodules/
#import <UMCore/UMModuleRegistry.h>
#import <UMReactNativeAdapter/UMNativeModulesProxy.h>
#import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
@jehartzog
jehartzog / react-native-tus-client+1.1.0.patch
Created April 10, 2021 20:59
react-native-tus-client TUSKit Version Fix
diff --git a/node_modules/react-native-tus-client/RNTusClient.podspec b/node_modules/react-native-tus-client/RNTusClient.podspec
index b855287..3f49b50 100644
--- a/node_modules/react-native-tus-client/RNTusClient.podspec
+++ b/node_modules/react-native-tus-client/RNTusClient.podspec
@@ -15,5 +15,5 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.0'
s.dependency 'React-Core'
- s.dependency 'TUSKit'
+ s.dependency 'TUSKit', '~> 1.4.2'
@jehartzog
jehartzog / react-native-reanimated+2.0.0.patch
Created March 17, 2021 14:51
iOS fix build Reanimated 2.0.0 RN 64 w/ Hermes
diff --git a/node_modules/react-native-reanimated/RNReanimated.podspec b/node_modules/react-native-reanimated/RNReanimated.podspec
index 6cdf6ac..2852ea0 100644
--- a/node_modules/react-native-reanimated/RNReanimated.podspec
+++ b/node_modules/react-native-reanimated/RNReanimated.podspec
@@ -85,6 +85,7 @@ Pod::Spec.new do |s|
s.dependency 'Yoga'
s.dependency 'DoubleConversion'
s.dependency 'glog'
+ s.dependency 'hermes-engine'
@jehartzog
jehartzog / react-navigation-drawer+2.5.0.patch
Last active March 5, 2021 17:49
react-navigation-drawer 2.5.0 prevent initial render flash
diff --git a/node_modules/react-navigation-drawer/lib/module/views/Drawer.js b/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
index 352ca07..0f5dad4 100644
--- a/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
+++ b/node_modules/react-navigation-drawer/lib/module/views/Drawer.js
@@ -60,6 +60,10 @@ export default class Drawer extends React.PureComponent {
constructor(...args) {
super(...args);
+ _defineProperty(this, "state", {
+ isReady: false,
@jehartzog
jehartzog / gist:ef5e4091d18176c55a84b67c9e5358b7
Created December 23, 2020 22:07
RN Patch to fix SectionList header remount when switching to/from empty section array
diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js b/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js
index 53eb54b..d870b3b 100644
--- a/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js
+++ b/node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js
@@ -173,7 +173,7 @@ class VirtualizedSectionList<
_computeState(props: Props<SectionT>): State {
const offset = props.ListHeaderComponent ? 1 : 0;
- const stickyHeaderIndices = [];
+ const stickyHeaderIndices = [0];
@jehartzog
jehartzog / gist:9490e310a07d74a546c680a27c4a339a
Last active October 5, 2020 23:22
Iterable Android Notification Action not fired at App Load Workaround
const getIterableInternalData = (payload: IterablePushPayload): any =>
Platform.OS === 'android'
? JSON.parse((payload as IterablePushPayloadAndroid).itbl)
: (payload as IterablePushPayloadIOS).itbl;
const doAndroidAppLoadCheck = async () => {
if (Platform.OS !== 'android') {
return;
}