Skip to content

Commit

Permalink
Merge branch 'master' of github.com:AndrewGable/ReactNativeChat into …
Browse files Browse the repository at this point in the history
…andrew-actions-lockdown
  • Loading branch information
AndrewGable committed Dec 17, 2020
2 parents c875e68 + 6516bde commit 2eac8ea
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 14 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div align="center">
<img src="https://use.expensify.com/assets/logo/download/expensify-app-logo_circular/expensify-app-logo_circular.png" width="64" height="64">
</div>

# [Expensify.cash](https://Expensify.cash)

# Philosophy
## Philosophy
This application is built with the following principles.
1. **Data Flow** - Ideally, this is how data flows through the app:
1. Server pushes data to the disk of any client (Server -> Pusher event -> Action listening to pusher event -> Onyx). Currently the code only does this with report comments. Until we make more server changes, this steps is actually done by the client requesting data from the server via XHR and then storing the response in Onyx.
Expand Down Expand Up @@ -41,6 +45,8 @@ This application is built with the following principles.
1. If the reason you can't write cross platform code is because there is a bug in ReactNative that is preventing it from working, the correct action is to fix RN and submit a PR upstream -- not to hack around RN bugs with platform-specific code paths.
1. If there is a feature that simply doesn't exist on all platforms and thus doesn't exist in RN, rather than doing if (platform=iOS) { }, instead write a "shim" library that is implemented with NOOPs on the other platforms. For example, rather than injecting platform-specific multi-tab code (which can only work on browsers, because it's the only platform with multiple tabs), write a TabManager class that just is NOOP for non-browser platforms. This encapsulates the platform-specific code into a platform library, rather than sprinkling through the business logic.
1. Put all platform specific code in dedicated files and folders, like /platform, and reject any PR that attempts to put platform-specific code anywhere else. This maintains a strict separation between business logic and platform code.

----

# Local development
## Getting started
Expand Down Expand Up @@ -228,6 +234,8 @@ export default withOnyx({
})(ReportActionsView);
```
----
# Deploying
## Continuous deployment / GitHub workflows
Every PR merged into `master` will kick off the **Create a new version** GitHub workflow defined in `.github/workflows/version.yml`.
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 266
versionName "1.0.1-265"
versionCode 270
versionName "1.0.1-269"
}
splits {
abi {
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCash/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>266</string>
<string>270</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false />
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCashTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>266</string>
<string>270</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
"version": "1.0.1-265",
"version": "1.0.1-269",
"author": "Expensify, Inc.",
"homepage": "https://expensify.cash",
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
3 changes: 2 additions & 1 deletion src/components/InlineCodeBlock/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import inlineCodeBlockPropTypes from './inlineCodeBlockPropTypes';
import styles from '../../styles/styles';

const InlineCodeBlock = ({
TDefaultRenderer,
Expand All @@ -8,7 +9,7 @@ const InlineCodeBlock = ({
textStyle,
}) => (
<TDefaultRenderer
style={{...boxModelStyle, ...textStyle}}
style={{...boxModelStyle, ...textStyle, ...styles.dInlineBlock}}
// eslint-disable-next-line react/jsx-props-no-spreading
{...defaultRendererProps}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class ReportActionCompose extends React.Component {
title="Upload Attachment"
onConfirm={(file) => {
addAction(this.props.reportID, '', file);
this.setTextInputShouldClear(true);
this.setTextInputShouldClear(false);
}}
>
{({displayFileInModal}) => (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/sidebar/SidebarLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const SidebarLinks = (props) => {
: [styles.sidebarHeader];

return (
<View style={[styles.flex1, {marginTop: props.insets.top}]}>
<View style={[styles.flex1, styles.height100percent, {marginTop: props.insets.top}]}>
<View style={[chatSwitcherStyle]}>
<ChatSwitcherView
onLinkClick={props.onLinkClick}
Expand Down
15 changes: 11 additions & 4 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,18 @@ const styles = {
display: 'none',
},

dInlineBlock: {
display: 'inline-block',
},

overflowHidden: {
overflow: 'hidden',
},

height100percent: {
height: '100%',
},

h4: {
fontFamily: fontFamily.GTA_BOLD,
fontSize: variables.fontSizeLabel,
Expand Down Expand Up @@ -406,6 +414,7 @@ const styles = {
// Sidebar Styles
sidebar: {
backgroundColor: themeColors.sidebar,
height: '100%',
},

sidebarHeader: {
Expand Down Expand Up @@ -1005,6 +1014,8 @@ const styles = {
const baseCodeTagStyles = {
borderWidth: 1,
borderRadius: 5,
marginTop: 4,
marginBottom: 4,
borderColor: themeColors.border,
backgroundColor: themeColors.textBackground,
};
Expand Down Expand Up @@ -1054,10 +1065,6 @@ const webViewStyles = {
paddingRight: 8,
paddingLeft: 8,
fontFamily: fontFamily.MONOSPACE,

// override user agent styles
marginTop: 0,
marginBottom: 0
},

code: {
Expand Down

0 comments on commit 2eac8ea

Please sign in to comment.