Skip to content

Commit

Permalink
copy files over
Browse files Browse the repository at this point in the history
Do a lot

Fix up routing issues on web by using Linking.getInitialUrl()

Make sure root route displays correctly

fix favicons

fix background issue for native modals

Fix report not loading on init

remove isSidebarShown code

move header gaps

fix weird window width issue
  • Loading branch information
marcaaron committed Feb 25, 2021
1 parent 39495d7 commit 3d9e274
Show file tree
Hide file tree
Showing 47 changed files with 1,453 additions and 729 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const defaultPresets = ['@babel/preset-react', '@babel/preset-env'];
const defaultPresets = ['@babel/preset-react', '@babel/preset-env', '@babel/preset-flow'];
const defaultPlugins = [
// Adding the commonjs: true option to react-native-web plugin can cause styling conflicts
['react-native-web'],
Expand Down
14 changes: 11 additions & 3 deletions config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ const platformIndex = process.argv.findIndex(arg => arg === '--platform');
const platform = (platformIndex > 0) ? process.argv[platformIndex + 1] : 'web';
const platformExclude = platform === 'web' ? new RegExp(/\.desktop\.js$/) : new RegExp(/\.website\.js$/);

const includeModules = [
'react-native-animatable',
'react-native-modal',
'react-native-webview',
'react-native-onyx',
'react-native-gesture-handler',
].join('|');

module.exports = {
entry: {
app: './index.js',
},
output: {
filename: '[name]-[hash].bundle.js',
path: path.resolve(__dirname, '../../dist'),
publicPath: '/',
},
plugins: [
new CleanWebpackPlugin(),
Expand Down Expand Up @@ -51,16 +60,15 @@ module.exports = {
loader: 'babel-loader',

/**
* Exclude node_modules except two packages we need to convert for rendering HTML because they import
* Exclude node_modules except any packages we need to convert for rendering HTML because they import
* "react-native" internally and use JSX which we need to convert to JS for the browser.
*
* You'll need to add anything in here that needs the alias for "react-native" -> "react-native-web"
* You can remove something from this list if it doesn't use "react-native" as an import and it doesn't
* use JSX/JS that needs to be transformed by babel.
*/
exclude: [
// eslint-disable-next-line max-len
/node_modules\/(?!(react-native-animatable|react-native-modal|react-native-webview|react-native-onyx)\/).*|\.native\.js$/,
new RegExp(`node_modules/(?!(${includeModules})/).*|.native.js$`),
platformExclude,
],
},
Expand Down
1 change: 1 addition & 0 deletions config/webpack/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = () => {
contentBase: path.join(__dirname, '../dist'),
hot: true,
...proxySettings,
historyApiFallback: true,
},
plugins: [
new webpack.DefinePlugin({
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* @format
*/

import 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './src/App';
import Config from './src/CONFIG';
Expand Down
16 changes: 16 additions & 0 deletions ios/ExpensifyCash/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLinkingManager.h>
#import <Firebase.h>

#import <UserNotifications/UserNotifications.h>
Expand Down Expand Up @@ -66,4 +67,19 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
#endif
}

- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
return [RCTLinkingManager application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}

@end
28 changes: 26 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ PODS:
- React
- react-native-progress-view (1.2.3):
- React
- react-native-safe-area-context (3.1.8):
- react-native-safe-area-context (3.1.9):
- React-Core
- react-native-webview (11.0.2):
- React-Core
Expand Down Expand Up @@ -404,6 +404,8 @@ PODS:
- React-Core
- RNCAsyncStorage (1.12.1):
- React-Core
- RNCMaskedView (0.1.10):
- React
- RNFBAnalytics (7.6.8):
- Firebase/Analytics (~> 6.34.0)
- React-Core
Expand All @@ -415,6 +417,12 @@ PODS:
- Firebase/Crashlytics (~> 6.34.0)
- React-Core
- RNFBApp
- RNGestureHandler (1.9.0):
- React-Core
- RNReanimated (1.13.2):
- React-Core
- RNScreens (2.17.1):
- React-Core
- RNSVG (12.1.0):
- React
- urbanairship-react-native (10.0.0):
Expand Down Expand Up @@ -482,9 +490,13 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- "RNFBAnalytics (from `../node_modules/@react-native-firebase/analytics`)"
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
- "RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`)"
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`)
- RNSVG (from `../node_modules/react-native-svg`)
- urbanairship-react-native (from `../node_modules/urbanairship-react-native`)
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
Expand Down Expand Up @@ -589,12 +601,20 @@ EXTERNAL SOURCES:
:path: "../node_modules/rn-fetch-blob"
RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage"
RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view"
RNFBAnalytics:
:path: "../node_modules/@react-native-firebase/analytics"
RNFBApp:
:path: "../node_modules/@react-native-firebase/app"
RNFBCrashlytics:
:path: "../node_modules/@react-native-firebase/crashlytics"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNReanimated:
:path: "../node_modules/react-native-reanimated"
RNScreens:
:path: "../node_modules/react-native-screens"
RNSVG:
:path: "../node_modules/react-native-svg"
urbanairship-react-native:
Expand Down Expand Up @@ -648,7 +668,7 @@ SPEC CHECKSUMS:
react-native-pdf: 4b5a9e4465a6a3b399e91dc4838eb44ddf716d1f
react-native-progress-bar-android: ce95a69f11ac580799021633071368d08aaf9ad8
react-native-progress-view: 5816e8a6be812c2b122c6225a2a3db82d9008640
react-native-safe-area-context: 01158a92c300895d79dee447e980672dc3fb85a6
react-native-safe-area-context: 86612d2c9a9e94e288319262d10b5f93f0b395f5
react-native-webview: b2542d6fd424bcc3e3b2ec5f854f0abb4ec86c87
React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa
React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2
Expand All @@ -662,9 +682,13 @@ SPEC CHECKSUMS:
ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNCAsyncStorage: cb9a623793918c6699586281f0b51cbc38f046f9
RNCMaskedView: f5c7d14d6847b7b44853f7acb6284c1da30a3459
RNFBAnalytics: 2dc4dd9e2445faffca041b10447a23a71dcdabf8
RNFBApp: 7eacc7da7ab19f96c05e434017d44a9f09410da8
RNFBCrashlytics: 4870c14cf8833053b6b5648911abefe1923854d2
RNGestureHandler: 9b7e605a741412e20e13c512738a31bd1611759b
RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
RNScreens: b6c9607e6fe47c1b6e2f1910d2acd46dd7ecea3a
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
urbanairship-react-native: dfb6dc22b2f41ccaadd636b73d51b448cd1b2bbc
Yoga: 7d13633d129fd179e01b8953d38d47be90db185a
Expand Down
Loading

0 comments on commit 3d9e274

Please sign in to comment.