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

Add tap to view full screen image functionality #630

Merged
merged 49 commits into from
Nov 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d148a0d
add component and styles
thienlnam Oct 10, 2020
bcfd7ec
add packages pdf viewer image viewer
thienlnam Oct 12, 2020
3a34acf
update native components for image viewers
thienlnam Oct 12, 2020
0a5de9e
add utility function for checking pdf
thienlnam Oct 12, 2020
66848fd
update css and props passed in
thienlnam Oct 12, 2020
6446217
Merge branch 'master' into jack-fullscreenimage
thienlnam Oct 26, 2020
2628bc3
resolve conflicts and change image viewer
thienlnam Oct 26, 2020
b2e77f4
Merge branch 'master' into jack-fullscreenimage
thienlnam Oct 27, 2020
e33f16f
update broken filepaths
thienlnam Oct 27, 2020
32389dc
update image size and remove gesture handler imports
thienlnam Oct 27, 2020
ec2fdcd
remove commented out imageviewer
thienlnam Oct 27, 2020
3d77528
Merge branch 'master' into jack-fullscreenimage
thienlnam Oct 29, 2020
28288b4
styling for web and mobile!
thienlnam Oct 29, 2020
980dd8d
working and styled modals!
thienlnam Oct 30, 2020
a4af556
~ style ~
thienlnam Oct 30, 2020
373bfcb
Merge branch 'master' into jack-fullscreenimage
thienlnam Oct 30, 2020
8a52f51
style (remove unused imports, spacing)
thienlnam Oct 30, 2020
254856c
style in str.js
thienlnam Oct 30, 2020
1836a4d
update comments and move rendering logic
thienlnam Nov 2, 2020
604560a
break down into components
thienlnam Nov 5, 2020
543997f
clean up components and pass down method to update visibility
thienlnam Nov 6, 2020
1bdffb9
Merge branch 'master' into jack-fullscreenimage
thienlnam Nov 6, 2020
971e750
update component name to be more specific
thienlnam Nov 6, 2020
28cb9bf
add display name
thienlnam Nov 6, 2020
7c113ea
add mock so module passes unit test
thienlnam Nov 6, 2020
82bab00
DRY it up
thienlnam Nov 9, 2020
34162fe
move authtoken into component, clean up components
thienlnam Nov 10, 2020
979df6f
add comments and eslint disable for instance property
thienlnam Nov 10, 2020
4bfcc98
Merge branch 'master' into jack-fullscreenimage
thienlnam Nov 10, 2020
e0e3e74
don't pass down image thumbnail style, remove _ from variable name
thienlnam Nov 12, 2020
e5e7847
Merge branch 'master' into jack-fullscreenimage
thienlnam Nov 12, 2020
f586922
add another component for the modal view
thienlnam Nov 12, 2020
1a0a8fb
remove alter node, rename css classes, move down comments
thienlnam Nov 13, 2020
22d9e2e
update hash for js-libs and fix image path for dev
thienlnam Nov 13, 2020
78c8f16
remove alternode
thienlnam Nov 13, 2020
74ed27a
update the padding and some styles
thienlnam Nov 13, 2020
5e4769b
add comment about the cropHeight
thienlnam Nov 13, 2020
95f5a7f
update the styling of modal title
thienlnam Nov 16, 2020
0edc369
make changes based on review comments
thienlnam Nov 16, 2020
03a2e02
Merge branch 'master' into jack-fullscreenimage
thienlnam Nov 17, 2020
5ed1424
update .env variables
thienlnam Nov 17, 2020
6f56f04
update config and .env variables
thienlnam Nov 18, 2020
018bf99
Merge branch 'master' into jack-fullscreenimage
thienlnam Nov 18, 2020
71804f9
review comments
thienlnam Nov 18, 2020
a792afd
Merge branch 'master' into jack-fullscreenimage
thienlnam Nov 19, 2020
7a902d2
update config and readme
thienlnam Nov 19, 2020
eceebb3
add .env variable
thienlnam Nov 19, 2020
1c97737
small comment update
thienlnam Nov 19, 2020
37bd307
make config variable update and small comment change
thienlnam Nov 19, 2020
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
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/**
* Rename this file to `.env` and put your local config in here
*/
EXPENSIFY_API_ROOT=https://www.expensify.com.dev/api?
EXPENSIFY_URL_COM=https://www.expensify.com.dev/
EXPENSIFY_URL_CASH=https://www.chat.expensify.com/
EXPENSIFY_PARTNER_NAME=android
EXPENSIFY_PARTNER_PASSWORD=c3a9ac418ea3f152aae2
PUSHER_APP_KEY=ac6d22b891daae55283a
NGROK_URL=https://expensify-user.ngrok.io/
USE_NGROK=false
4 changes: 2 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EXPENSIFY_SITE_ROOT=https://chat.expensify.com/
EXPENSIFY_API_ROOT=https://www.expensify.com/api?
EXPENSIFY_URL_CASH=https://www.chat.expensify.com/
EXPENSIFY_URL_COM=https://www.expensify.com/
EXPENSIFY_PARTNER_NAME=chat-expensify-com
EXPENSIFY_PARTNER_PASSWORD=e21965746fd75f82bb66
PUSHER_APP_KEY=268df511a204fbb60884
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ This application is built with the following principles.

You can use any IDE or code editing tool for developing on any platform. Use your favorite!

## Setting up ngrok
Ngrok makes the our locally-hosted web application appear to be hosted on a subdomain of ngrok.com. This allows us to avoid many of our cross-domain issues with our API and is required for doing local development on android or viewing images on mobile.

1. Set up a permanent [ngrok route](https://stackoverflow.com/c/expensify/questions/3382)
2. Replace the value `NGROK_URL` in your `.env` file with the ngrok route you just set up
3. Set the `USE_NGROK` in your `.env` to true
4. Start ngrok with the name you previously set (`Expensidev/script/ngrok.sh thienlnam`)

Now, all of your API calls will be using the ngrok route.

## Running the web app 🕸
* To run a **Development Server**: `npm run web`
* To build a **production build**: `npm run build`
Expand All @@ -69,7 +79,7 @@ You can use any IDE or code editing tool for developing on any platform. Use you
## Running the Android app 🤖
* To install the Android dependencies, run: `npm install`, then `gradle` will install all linked dependencies
* Running via `ngrok` is required to communicate with the API
* Start ngrok (`Expensidev/script/ngrok.sh`), replace `expensify.com.dev` value in `.env` with your ngrok value
* Follow the instructions under the section `Setting up ngrok`
* To run a on a **Development Emulator**: `npm run android`
* Changes applied to Javascript will be applied automatically, any changes to native code will require a recompile

Expand Down
9 changes: 9 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

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'
}

defaultConfig {
applicationId "com.expensify.chat"
Expand Down
Binary file added assets/images/icon-x--20x20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 35 additions & 11 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ PODS:
- GoogleUtilities/Network (~> 6.7)
- "GoogleUtilities/NSData+zlib (~> 6.7)"
- nanopb (~> 1.30906.0)
- GoogleDataTransport (7.5.0):
- GoogleDataTransport (7.5.1):
- nanopb (~> 1.30906.0)
- GoogleUtilities/AppDelegateSwizzler (6.7.2):
- GoogleUtilities/Environment
Expand Down Expand Up @@ -330,9 +330,15 @@ PODS:
- React-Core
- react-native-netinfo (5.9.7):
- React-Core
- react-native-pdf (6.2.2):
- React-Core
- react-native-progress-bar-android (1.0.4):
- React
- react-native-progress-view (1.2.3):
- React
- react-native-safe-area-context (3.1.8):
- React-Core
- react-native-webview (10.9.2):
- react-native-webview (10.10.0):
- React-Core
- React-RCTActionSheet (0.63.3):
- React-Core/RCTActionSheetHeaders (= 0.63.3)
Expand Down Expand Up @@ -394,6 +400,8 @@ PODS:
- React-Core (= 0.63.3)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- rn-fetch-blob (0.12.0):
- React-Core
- RNCAsyncStorage (1.12.1):
- React-Core
- RNCPushNotificationIOS (1.6.1):
Expand Down Expand Up @@ -457,6 +465,9 @@ DEPENDENCIES:
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-pdf (from `../node_modules/react-native-pdf`)
- "react-native-progress-bar-android (from `../node_modules/@react-native-community/progress-bar-android`)"
- "react-native-progress-view (from `../node_modules/@react-native-community/progress-view`)"
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
Expand All @@ -469,6 +480,7 @@ DEPENDENCIES:
- React-RCTText (from `../node_modules/react-native/Libraries/Text`)
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- 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`)"
- "RNCPushNotificationIOS (from `../node_modules/@react-native-community/push-notification-ios`)"
- "RNFBAnalytics (from `../node_modules/@react-native-firebase/analytics`)"
Expand Down Expand Up @@ -543,6 +555,12 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-image-picker"
react-native-netinfo:
:path: "../node_modules/@react-native-community/netinfo"
react-native-pdf:
:path: "../node_modules/react-native-pdf"
react-native-progress-bar-android:
:path: "../node_modules/@react-native-community/progress-bar-android"
react-native-progress-view:
:path: "../node_modules/@react-native-community/progress-view"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
react-native-webview:
Expand All @@ -567,6 +585,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/Libraries/Vibration"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
rn-fetch-blob:
:path: "../node_modules/rn-fetch-blob"
RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage"
RNCPushNotificationIOS:
Expand Down Expand Up @@ -606,7 +626,7 @@ SPEC CHECKSUMS:
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
GoogleAppMeasurement: a6a3a066369828db64eda428cb2856dc1cdc7c4e
GoogleDataTransport: 445302b7da4216da63071a4c29e7023f47192e5a
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
OpenSSL-Universal: ff34003318d5e1163e9529b08470708e389ffcdd
Expand All @@ -622,11 +642,14 @@ SPEC CHECKSUMS:
React-jsiexecutor: b56c03e61c0dd5f5801255f2160a815f4a53d451
React-jsinspector: 8e68ffbfe23880d3ee9bafa8be2777f60b25cbe2
react-native-config: 9a061347e0136fdb32d43a34d60999297d672361
react-native-document-picker: b3e78a8f7fef98b5cb069f20fc35797d55e68e28
react-native-image-picker: 32d1ad2c0024ca36161ae0d5c2117e2d6c441f11
react-native-netinfo: e36c1bb6df27ab84aa933679b3f5bbf9d180b18f
react-native-safe-area-context: 01158a92c300895d79dee447e980672dc3fb85a6
react-native-webview: c51f73be304c61d359ec3e7c5e4e8f2c977fd360
react-native-document-picker: 0bba80cc56caab1f67dbaa81ff557e3a9b7f2b9f
react-native-image-picker: c6d75c4ab2cf46f9289f341242b219cb3c1180d3
react-native-netinfo: 250dc0ca126512f618a8a2ca6a936577e1f66586
react-native-pdf: 4b5a9e4465a6a3b399e91dc4838eb44ddf716d1f
react-native-progress-bar-android: be43138ab7da30d51fc038bafa98e9ed594d0c40
react-native-progress-view: 21b1e29e70c7559c16c9e0a04c4adc19fce6ede2
react-native-safe-area-context: 79fea126c6830c85f65947c223a5e3058a666937
react-native-webview: 73e409ecc987c189772bda27ba7f0e2f3dcd2e81
React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa
React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2
React-RCTBlob: 0b284339cbe4b15705a05e2313a51c6d8b51fa40
Expand All @@ -637,12 +660,13 @@ SPEC CHECKSUMS:
React-RCTText: 65a6de06a7389098ce24340d1d3556015c38f746
React-RCTVibration: 8e9fb25724a0805107fc1acc9075e26f814df454
ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3
RNCAsyncStorage: cb9a623793918c6699586281f0b51cbc38f046f9
RNCPushNotificationIOS: cfc6e1821f1af1874741d9b7055b75c0f8fa8a7d
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398
RNCPushNotificationIOS: 346c804c13fb99e644c996d1af5175a35452b2cb
RNFBAnalytics: 2dc4dd9e2445faffca041b10447a23a71dcdabf8
RNFBApp: 7eacc7da7ab19f96c05e434017d44a9f09410da8
RNFBCrashlytics: 4870c14cf8833053b6b5648911abefe1923854d2
urbanairship-react-native: fa123940041a6a13ab7dac192e32833c53754f00
urbanairship-react-native: 87a82abfbc182a854f66eb7fd25198ce62e95a54
Yoga: 7d13633d129fd179e01b8953d38d47be90db185a
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Expand Down
Loading