Skip to content

Commit

Permalink
Merge branch 'main' into fix/38959
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Apr 11, 2024
2 parents 65829ea + 260a7de commit fa0a393
Showing 108 changed files with 5,914 additions and 15,233 deletions.
3,024 changes: 1,321 additions & 1,703 deletions .github/actions/javascript/authorChecklist/index.js

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import type {StorybookConfig} from '@storybook/core-common';
import type {StorybookConfig} from '@storybook/types';

type Main = {
managerHead: (head: string) => string;
} & StorybookConfig;

const main: Main = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', '@storybook/addon-react-native-web'],
const main: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', '@storybook/addon-webpack5-compiler-babel'],
staticDirs: ['./public', {from: '../assets/css', to: 'css'}, {from: '../assets/fonts/web', to: 'fonts'}],
core: {
builder: 'webpack5',
},
managerHead: (head: string) => `
core: {},

managerHead: (head) => `
${head}
${process.env.ENV === 'staging' ? '<meta name="robots" content="noindex">' : ''}
`,
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: false,
},
};

export default main;
1 change: 0 additions & 1 deletion .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<link rel="icon" type="image/png" href="logo.png" />
<link rel="stylesheet" type="text/css" href="css/fonts.css" />
<link rel="stylesheet" type="text/css" href="index.css" />
2 changes: 1 addition & 1 deletion .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {addons} from '@storybook/addons';
import {addons} from '@storybook/manager-api';
import theme from './theme';

addons.setConfig({
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {PortalProvider} from '@gorhom/portal';
import type {Parameters} from '@storybook/addons';
import type {Parameters} from '@storybook/types';
import React from 'react';
import Onyx from 'react-native-onyx';
import {SafeAreaProvider} from 'react-native-safe-area-context';
11 changes: 11 additions & 0 deletions .storybook/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .storybook/public/logo.png
Binary file not shown.
3 changes: 2 additions & 1 deletion .storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {ThemeVars} from '@storybook/theming';
import {create} from '@storybook/theming';
import {create} from '@storybook/theming/create';
// eslint-disable-next-line @dword-design/import-alias/prefer-alias
import colors from '../src/styles/theme/colors';

@@ -13,6 +13,7 @@ const theme: ThemeVars = create({
colorPrimary: colors.productDark400,
colorSecondary: colors.green,
appContentBg: colors.productDark100,
appPreviewBg: colors.productDark100,
textColor: colors.productDark900,
barTextColor: colors.productDark900,
barSelectedColor: colors.green,
6 changes: 6 additions & 0 deletions .storybook/webpack.config.ts
Original file line number Diff line number Diff line change
@@ -87,6 +87,12 @@ const webpackConfig = ({config}: {config: Configuration}) => {
loader: require.resolve('@svgr/webpack'),
});

config.plugins.push(
new DefinePlugin({
__DEV__: process.env.NODE_ENV === 'development',
}),
);

return config;
};

9 changes: 4 additions & 5 deletions __mocks__/@react-native-community/netinfo.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import {NetInfoCellularGeneration, NetInfoStateType} from '@react-native-community/netinfo';
import type {addEventListener, configure, fetch, NetInfoState, refresh, useNetInfo} from '@react-native-community/netinfo';

const defaultState: NetInfoState = {
type: NetInfoStateType?.cellular,
const defaultState = {
type: 'cellular',
isConnected: true,
isInternetReachable: true,
details: {
isConnectionExpensive: true,
cellularGeneration: NetInfoCellularGeneration?.['3g'],
cellularGeneration: '3g',
carrier: 'T-Mobile',
},
};
} as NetInfoState;

type NetInfoMock = {
configure: typeof configure;
9 changes: 6 additions & 3 deletions __mocks__/@react-navigation/native/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import {useIsFocused as realUseIsFocused} from '@react-navigation/native';
import {useIsFocused as realUseIsFocused, useTheme as realUseTheme} from '@react-navigation/native';

// We only want this mocked for storybook, not jest
// We only want these mocked for storybook, not jest
const useIsFocused: typeof realUseIsFocused = process.env.NODE_ENV === 'test' ? realUseIsFocused : () => true;

// @ts-expect-error as we're mocking this function
const useTheme: typeof realUseTheme = process.env.NODE_ENV === 'test' ? realUseTheme : () => ({});

export * from '@react-navigation/core';
export * from '@react-navigation/native';
export {useIsFocused};
export {useIsFocused, useTheme};
7 changes: 5 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -98,8 +98,11 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001046105
versionName "1.4.61-5"
versionCode 1001046200
versionName "1.4.62-0"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
}

flavorDimensions "default"
5 changes: 4 additions & 1 deletion contributingGuides/HOW_TO_BECOME_A_CONTRIBUTOR_PLUS.md
Original file line number Diff line number Diff line change
@@ -24,4 +24,7 @@ C+ are contributors who are experienced at working with Expensify and have gaine

## How to join?

Email contributors@expensify.com and include "C+ Team Application" in the subject line if you’re interested in joining. Please include your GitHub username and a link to the PRs you've authored that have been merged. ie. `https://github.com/Expensify/App/pulls?q=is%3Apr+author%3Aparasharrajat+is%3Amerged`
Email contributors@expensify.com and include "C+ Team Application" in the subject line if you’re interested in joining. Please include:
1. Your GitHub username.
2. A link to the PRs you've authored that have been merged. ie. `https://github.com/Expensify/App/pulls?q=is%3Apr+is%3Amerged+author%3Aparasharrajat`.
3. Links to three GitHub issues that were particularly challenging and best demonstrate your skill level.
7 changes: 7 additions & 0 deletions docs/redirects.csv
Original file line number Diff line number Diff line change
@@ -77,6 +77,13 @@ https://help.expensify.com/articles/expensify-classic/workspace-and-domain-setti
https://help.expensify.com/articles/expensify-classic/workspace-and-domain-settings/Reimbursement,https://help.expensify.com/articles/expensify-classic/send-payments/Reimbursing-Reports
https://help.expensify.com/articles/expensify-classic/workspace-and-domain-settings/Tags,https://help.expensify.com/articles/expensify-classic/workspaces/Tags
https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/User-Roles,https://help.expensify.com/articles/expensify-classic/workspaces/Change-member-workspace-roles
https://help.expensify.com/articles/new-expensify/account-settings/Preferences,https://help.expensify.com/articles/new-expensify/settings/Preferences
https://help.expensify.com/articles/new-expensify/account-settings/Profile,https://help.expensify.com/articles/new-expensify/settings/Profile
https://help.expensify.com/articles/new-expensify/account-settings/Security,https://help.expensify.com/articles/new-expensify/settings/Security
https://help.expensify.com/articles/new-expensify/bank-accounts/Connect-a-Bank-Account,https://help.expensify.com/articles/new-expensify/bank-accounts-and-payments/Connect-a-Bank-Account
https://help.expensify.com/articles/new-expensify/payments/Distance-Requests,https://help.expensify.com/articles/new-expensify/expenses/Distance-Requests
https://help.expensify.com/articles/expensify-classic/expenses/Referral-Program,https://help.expensify.com/articles/new-expensify/expenses/Referral-Program
https://help.expensify.com/articles/new-expensify/payments/Request-Money,https://help.expensify.com/articles/new-expensify/expenses/Request-Money
https://help.expensify.com/articles/expensify-classic/workspace-and-domain-settings/tax-tracking,https://help.expensify.com/articles/expensify-classic/expenses/expenses/Apply-Tax
https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/User-Roles.html,https://help.expensify.com/expensify-classic/hubs/copilots-and-delegates/
https://help.expensify.com/articles/expensify-classic/expensify-billing/Billing-Owner,https://help.expensify.com/articles/expensify-classic/workspaces/Assign-billing-owner-and-payment-account
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.61</string>
<string>1.4.62</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.61.5</string>
<string>1.4.62.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
@@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.61</string>
<string>1.4.62</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.61.5</string>
<string>1.4.62.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>1.4.61</string>
<string>1.4.62</string>
<key>CFBundleVersion</key>
<string>1.4.61.5</string>
<string>1.4.62.0</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Loading

0 comments on commit fa0a393

Please sign in to comment.