Skip to content

Commit

Permalink
fix conflicts respond to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed Mar 12, 2021
2 parents ccacadc + ea65ee2 commit 51c8cca
Show file tree
Hide file tree
Showing 21 changed files with 94 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .github/actions/markPullRequestsAsDeployed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ class GithubUtils {
});
}

issueBody += '\r\ncc @Expensify/applauseleads\r\n';

return issueBody;
})
// eslint-disable-next-line no-console
Expand Down
2 changes: 2 additions & 0 deletions .github/libs/GithubUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ class GithubUtils {
});
}

issueBody += '\r\ncc @Expensify/applauseleads\r\n';

return issueBody;
})
// eslint-disable-next-line no-console
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ on:
push:
tags:
- '*'
release:
types: [created]

jobs:
build:
if: github.actor == 'OSBotify'
runs-on: ubuntu-latest
env:
# TODO: Uncomment when we'd like to deploy to production
# SHOULD_DEPLOY_PRODUCTION: ${{ github.event_name == 'release' }}
SHOULD_DEPLOY_PRODUCTION: ${{ false }}
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -44,7 +50,7 @@ jobs:
run: bundle exec fastlane android beta

- name: Run Fastlane production
if: ${{ env.SHOULD_DEPLOY_PRODUCTION }}
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
run: bundle exec fastlane android production
env:
VERSION: ${{ env.VERSION }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ on:
push:
tags:
- '*'
release:
types: [created]

jobs:
build:
if: github.actor == 'OSBotify'
runs-on: macos-latest
env:
# TODO: Uncomment when we'd like to deploy to staging
# SHOULD_DEPLOY_PRODUCTION: ${{ github.event_name == 'release' }}
SHOULD_DEPLOY_PRODUCTION: ${{ true }}
steps:
- uses: actions/checkout@v2

Expand All @@ -31,6 +37,7 @@ jobs:
DEVELOPER_ID_SECRET_PASSPHRASE: ${{ secrets.DEVELOPER_ID_SECRET_PASSPHRASE }}

- name: Build production desktop app
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
run: npm run desktop-build -- --publish always -c.afterSign=desktop/notarize.js
env:
CSC_LINK: ${{ secrets.CSC_LINK }}
Expand All @@ -42,6 +49,7 @@ jobs:
SHOULD_DEPLOY_PRODUCTION: true

- name: Build staging desktop app
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
run: npm run desktop-build -- --publish always -c.afterSign=desktop/notarize.js
env:
CSC_LINK: ${{ secrets.CSC_LINK }}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
tags:
- '*'
release:
types: [created]

env:
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
Expand All @@ -13,6 +15,10 @@ jobs:
build:
if: github.actor == 'OSBotify'
runs-on: macos-latest
env:
# TODO: Uncomment when we'd like to deploy to production7
# SHOULD_DEPLOY_PRODUCTION: ${{ github.event_name == 'release' }}
SHOULD_DEPLOY_PRODUCTION: ${{ false }}
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -65,7 +71,7 @@ jobs:
APPLE_DEMO_PASSWORD: ${{ secrets.APPLE_DEMO_PASSWORD }}

- name: Run Fastlane for App Store release
if: ${{ env.SHOULD_DEPLOY_PRODUCTION }}
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
run: bundle exec fastlane ios production
env:
VERSION: ${{ env.NEW_IOS_VERSION }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ on:
push:
tags:
- '*'
release:
types: [created]

jobs:
build:
if: github.actor == 'OSBotify'
runs-on: ubuntu-latest
env:
# TODO: Uncomment when we'd like to deploy to staging
# SHOULD_DEPLOY_PRODUCTION: ${{ github.event_name == 'release' }}
SHOULD_DEPLOY_PRODUCTION: ${{ true }}

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -51,17 +57,21 @@ jobs:
run: npm run build

- name: Deploy production to S3
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
run: aws s3 cp --recursive --acl public-read $GITHUB_WORKSPACE/dist s3://expensify-cash/

- name: Deploy staging to S3
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
run: aws s3 cp --recursive --acl public-read $GITHUB_WORKSPACE/dist s3://staging-expensify-cash/

- name: Purge production Cloudflare cache
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'true' }}
run: /home/runner/.local/bin/cli4 --delete hosts=["expensify.cash"] /zones/:357b42c0989e3bed82f6d6400e8b9d66/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}

- name: Purge staging Cloudflare cache
if: ${{ env.SHOULD_DEPLOY_PRODUCTION == 'false' }}
run: /home/runner/.local/bin/cli4 --delete hosts=["staging.expensify.cash"] /zones/:357b42c0989e3bed82f6d6400e8b9d66/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}
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 1001000229
versionName "1.0.2-29"
versionCode 1001000237
versionName "1.0.2-37"
}
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>1.0.2.29</string>
<string>1.0.2.37</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</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>1.0.2.29</string>
<string>1.0.2.37</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.2-29",
"version": "1.0.2-37",
"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
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const CONST = {
},
},
TIMING: {
SEARCH_RENDER: 'search_render',
HOMEPAGE_INITIAL_RENDER: 'homepage_initial_render',
HOMEPAGE_REPORTS_LOADED: 'homepage_reports_loaded',
SWITCH_REPORT: 'switch_report',
Expand Down
5 changes: 4 additions & 1 deletion src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Onyx.registerLogger(({level, message}) => {
});

const propTypes = {
/* Onyx Props */

// Session info for the currently logged in user.
session: PropTypes.shape({
authToken: PropTypes.string,
accountID: PropTypes.number,
Expand Down Expand Up @@ -84,7 +87,7 @@ class Expensify extends PureComponent {
}

render() {
// Until the authToken has been initialized from Onyx and the onyx migration is done, display a blank page
// Display a blank page until the onyx migration completes
if (!this.state.isOnyxMigrated) {
return (
<View style={styles.genericView} />
Expand Down
1 change: 0 additions & 1 deletion src/components/OptionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ class OptionsList extends Component {
showsVerticalScrollIndicator={false}
sections={this.props.sections}
keyExtractor={this.extractKey}
initialNumToRender={500}
onScrollToIndexFailed={this.onScrollToIndexFailed}
stickySectionHeadersEnabled={false}
renderItem={this.renderItem}
Expand Down
18 changes: 18 additions & 0 deletions src/libs/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,23 @@ function SetNameValuePair(parameters) {
return Network.post(commandName, parameters);
}

/**
*
* @param {Object} parameters
* @param {String[]} data
* @returns {Promise}
*/
function Mobile_GetConstants(parameters) {
const commandName = 'Mobile_GetConstants';
requireParameters(['data'], parameters, commandName);

// For some reason, the Mobile_GetConstants endpoint requires a JSON string, so we need to stringify the data param
const finalParameters = parameters;
finalParameters.data = JSON.stringify(parameters.data);

return Network.post(commandName, finalParameters);
}

export {
getAuthToken,
Authenticate,
Expand All @@ -628,6 +645,7 @@ export {
GetRequestCountryCode,
Graphite_Timer,
Log,
Mobile_GetConstants,
PersonalDetails_GetForEmails,
PersonalDetails_Update,
Push_Authenticate,
Expand Down
13 changes: 4 additions & 9 deletions src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,10 @@ function getOptions(reports, personalDetails, draftComments, activeReportID, {
return;
}

// Skip this entry if it has no comments and is not the active report. We will only show reports from
// people we have sent or received at least one message with.
const hasNoComments = report.lastMessageTimestamp === 0;
const shouldFilterReport = !showReportsWithNoComments && hasNoComments
&& report.reportID !== activeReportID && !report.isPinned;
if (shouldFilterReport) {
return;
}
if (hideReadReports && report.unreadActionCount === 0 && !report.isPinned) {
const shouldFilterReportIfEmpty = !showReportsWithNoComments && report.lastMessageTimestamp === 0;
const shouldFilterReportIfRead = hideReadReports && report.unreadActionCount === 0;
const shouldFilterReport = shouldFilterReportIfEmpty || shouldFilterReportIfRead;
if (report.reportID !== activeReportID && !report.isPinned && shouldFilterReport) {
return;
}
const reportPersonalDetails = getPersonalDetailsForLogins(logins, personalDetails);
Expand Down
4 changes: 2 additions & 2 deletions src/libs/actions/Timing.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ function start(eventName) {
* End performance timing. Measure the time between event start/end in milliseconds, and push to Grafana
*
* @param {String} eventName - event name used as timestamp key
* @param {String} secondaryName - optional secondary event name, passed to grafana
* @param {String} [secondaryName] - optional secondary event name, passed to grafana
*/
function end(eventName, secondaryName) {
function end(eventName, secondaryName = '') {
if (eventName in timestampData) {
const eventTime = Date.now() - timestampData[eventName];
const grafanaEventName = secondaryName
Expand Down
9 changes: 8 additions & 1 deletion src/pages/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import withWindowDimensions, {windowDimensionsPropTypes} from '../components/wit
import {fetchOrCreateChatReport} from '../libs/actions/Report';
import HeaderWithCloseButton from '../components/HeaderWithCloseButton';
import ScreenWrapper from '../components/ScreenWrapper';
import Timing from '../libs/actions/Timing';
import CONST from '../CONST';

const personalDetailsPropTypes = PropTypes.shape({
// The login of the person (either email or phone number)
Expand Down Expand Up @@ -51,6 +53,8 @@ class SearchPage extends Component {
constructor(props) {
super(props);

Timing.start(CONST.TIMING.SEARCH_RENDER);

this.selectReport = this.selectReport.bind(this);

const {
Expand All @@ -71,6 +75,10 @@ class SearchPage extends Component {
};
}

componentDidMount() {
Timing.end(CONST.TIMING.SEARCH_RENDER);
}

/**
* Returns the sections needed for the OptionsSelector
*
Expand Down Expand Up @@ -126,7 +134,6 @@ class SearchPage extends Component {
(this.state.recentReports.length + this.state.personalDetails.length) !== 0,
Boolean(this.state.userToInvite),
);

return (
<ScreenWrapper>
{() => (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/sidebar/OptionRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const OptionRow = ({
</View>
</TouchableOpacity>
{!hideAdditionalOptionStates && (
<View style={styles.flexRow}>
<View style={[styles.flexRow, styles.pr5]}>
{option.hasDraftComment && (
<View style={styles.ml2}>
<Icon src={Pencil} />
Expand Down
4 changes: 4 additions & 0 deletions src/styles/utilities/spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ export default {
paddingRight: 8,
},

pr5: {
paddingRight: 20,
},

pl5: {
paddingLeft: 20,
},
Expand Down
Loading

0 comments on commit 51c8cca

Please sign in to comment.