Skip to content

Commit

Permalink
Merge branch 'main' into fix/37152
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Apr 12, 2024
2 parents e032763 + c7d6926 commit 32a844c
Show file tree
Hide file tree
Showing 197 changed files with 7,782 additions and 16,537 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({
Expand Down
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';
Expand Down
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';

Expand All @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions .storybook/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
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;
Expand Down
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
Expand Up @@ -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 1001046204
versionName "1.4.62-4"
// 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"
Expand Down
32 changes: 31 additions & 1 deletion assets/images/new-expensify-adhoc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 27 additions & 1 deletion assets/images/new-expensify-dev.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 32a844c

Please sign in to comment.