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/ios wishlist #3

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a2eef23
feat: add fabric libs and fix import
WoLewicki Dec 7, 2022
61bc745
feat: prepare repo for testing
WoLewicki Dec 12, 2022
f06f818
feat: add fabric version of urbanairship-react-native
WoLewicki Dec 20, 2022
ecff45c
fix: add patches and proper commit
WoLewicki Dec 21, 2022
9730297
chore: merge current main
WoLewicki Dec 21, 2022
6d97b2b
feat: remove flipper, bump packages and add patches
WoLewicki Dec 22, 2022
dfef2bd
fix: patch reanimated so it works with webpack
WoLewicki Jan 3, 2023
58557c4
Fix race condition in React Native
j-piasecki Jan 4, 2023
1897703
Fix crash on long press
j-piasecki Jan 4, 2023
a154ded
chore: Add RN WishList dependency
mrousavy Jan 4, 2023
a5793a2
Install RN Worklets, RN WishList, Remove Flipper
mrousavy Jan 5, 2023
0aa1877
Patch react-native to add ShadowTreeRegistry patch for WishList
mrousavy Jan 5, 2023
0f50968
Patch RN Worklets to avoid crash for WishList
mrousavy Jan 5, 2023
503faa2
Patch RNGH to add support for WishList event
mrousavy Jan 5, 2023
f68d11f
Remove all of the Flipper stuff
mrousavy Jan 5, 2023
43950bd
Remove UrbanAirship
mrousavy Jan 5, 2023
b570370
Try to render WishList
mrousavy Jan 5, 2023
9f9be12
adjust code for wishlist
Szymon20000 Jan 5, 2023
b53eb76
Merge pull request #2 from margelo/@szymon/adjust_code_for_wishlist
mrousavy Jan 5, 2023
0ac83dc
Update react-native-worklets+0.1.5.patch
mrousavy Jan 5, 2023
0c54733
base 1
mrousavy Jan 5, 2023
9104809
convert ReportActionItem to Function Component
mrousavy Jan 5, 2023
2f68189
Remove comments
mrousavy Jan 5, 2023
a56967c
Nuke a bunch of stuff and try to render wishlist in chat
mrousavy Jan 6, 2023
1543a05
interval dummy update
mrousavy Jan 6, 2023
9487f74
try to render Image
mrousavy Jan 6, 2023
9fdf6ee
make text red
mrousavy Jan 6, 2023
1f869e6
make image size 40
mrousavy Jan 6, 2023
ccb4907
clean up a bit
mrousavy Jan 6, 2023
a9c3b8b
hardcode margin/bold styles
mrousavy Jan 6, 2023
0fc7f40
Placeholder for timestamp
mrousavy Jan 6, 2023
0d41aa2
Use reportID as key for WishList.Component
roryabraham Jan 6, 2023
6d082a5
chore: Update to latest RN WishList
mrousavy Jan 6, 2023
2cec260
fix: Fix key and type prop for data
mrousavy Jan 6, 2023
aeae5ee
Use different key for List
mrousavy Jan 6, 2023
babf7ca
HACK: Update data with 500ms delay
mrousavy Jan 6, 2023
525db0f
Update wishlist
mrousavy Jan 6, 2023
8eb8d7e
Remove log
mrousavy Jan 6, 2023
9d1166f
Fix inverted sorting order
roryabraham Jan 6, 2023
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
13 changes: 1 addition & 12 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,9 @@ def reactNativeArchitectures() {
}

android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion

packagingOptions {
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libjsc.so'
pickFirst 'lib/arm64-v8a/libjsc.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'

// Exclude generated files from APK, to fix 'More than one file was found with path' error
exclude 'META-INF/*'
}

defaultConfig {
applicationId "com.expensify.chat"
minSdkVersion rootProject.ext.minSdkVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import androidx.multidex.MultiDexApplication;

import com.expensify.chat.bootsplash.BootSplashPackage;
import com.expensify.chat.newarchitecture.MainApplicationReactNativeHost;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
Expand Down Expand Up @@ -47,10 +48,8 @@ protected String getJSMainModuleName() {
}
};

// TODO: Use this to enable new architecture.
// private final ReactNativeHost mNewArchitectureNativeHost =
// new MainApplicationReactNativeHost(this);
private final ReactNativeHost mNewArchitectureNativeHost = null;
private final ReactNativeHost mNewArchitectureNativeHost =
new MainApplicationReactNativeHost(this);

@Override
public ReactNativeHost getReactNativeHost() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import android.app.Application;
import androidx.annotation.NonNull;
import com.expensify.chat.bootsplash.BootSplashPackage;
import com.expensify.chat.ExpensifyAppPackage;
import com.facebook.react.PackageList;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
Expand Down Expand Up @@ -51,6 +53,8 @@ protected List<ReactPackage> getPackages() {
// packages.add(new TurboReactPackage() { ... });
// If you have custom Fabric Components, their ViewManagers should also be loaded here
// inside a ReactPackage.
packages.add(new BootSplashPackage());
packages.add(new ExpensifyAppPackage());
return packages;
}

Expand Down
35 changes: 19 additions & 16 deletions android/app/src/main/jni/MainApplicationModuleProvider.cpp
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@

#include "MainApplicationModuleProvider.h"

#include <rncli.h>
#include <rncore.h>

namespace facebook {
namespace react {

std::shared_ptr<TurboModule> MainApplicationModuleProvider(
const std::string moduleName,
const std::string &moduleName,
const JavaTurboModule::InitParams &params) {
// Here you can provide your own module provider for TurboModules coming from
// either your application or from external libraries. The approach to follow
// is similar to the following (for a library called `samplelibrary`:
//
// auto module = samplelibrary_ModuleProvider(moduleName, params);
// if (module != nullptr) {
// return module;
// }
// return rncore_ModuleProvider(moduleName, params);
return rncore_ModuleProvider(moduleName, params);
// Here you can provide your own module provider for TurboModules coming from
// either your application or from external libraries. The approach to follow
// is similar to the following (for a library called `samplelibrary`:
//
// auto module = samplelibrary_ModuleProvider(moduleName, params);
// if (module != nullptr) {
// return module;
// }
// return rncore_ModuleProvider(moduleName, params);

// Module providers autolinked by RN CLI
auto rncli_module = rncli_ModuleProvider(moduleName, params);
if (rncli_module != nullptr) {
return rncli_module;
}

// Module providers autolinked by RN CLI
auto rncli_module = rncli_ModuleProvider(moduleName, params);
if (rncli_module != nullptr) {
return rncli_module;
}
return rncore_ModuleProvider(moduleName, params);
}

} // namespace react
Expand Down
3 changes: 2 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ FLIPPER_VERSION=0.125.0
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64

# Use this property to enable support to the new architecture.
# This will allow you to use TurboModules and the Fabric render in
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
newArchEnabled=true

# Key Store Information
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
Expand Down
Loading