Skip to content

Commit

Permalink
Merge branch 'main' into @swm/style-based-three-pane-view
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgrzybowski committed Aug 30, 2023
2 parents 6c823b2 + 6e17b64 commit ec372f7
Show file tree
Hide file tree
Showing 322 changed files with 7,782 additions and 9,150 deletions.
10 changes: 9 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,23 @@ import ComposeProviders from '../src/components/ComposeProviders';
import HTMLEngineProvider from '../src/components/HTMLEngineProvider';
import OnyxProvider from '../src/components/OnyxProvider';
import {LocaleContextProvider} from '../src/components/withLocalize';
import {KeyboardStateProvider} from '../src/components/withKeyboardState';
import {EnvironmentProvider} from '../src/components/withEnvironment';
import {WindowDimensionsProvider} from '../src/components/withWindowDimensions';
import ONYXKEYS from '../src/ONYXKEYS';

Onyx.init({
keys: ONYXKEYS,
initialKeyStates: {
[ONYXKEYS.NETWORK]: {isOffline: false},
},
});

const decorators = [
(Story) => (
<ComposeProviders components={[OnyxProvider, LocaleContextProvider, HTMLEngineProvider, SafeAreaProvider, PortalProvider]}>
<ComposeProviders
components={[OnyxProvider, LocaleContextProvider, HTMLEngineProvider, SafeAreaProvider, PortalProvider, EnvironmentProvider, KeyboardStateProvider, WindowDimensionsProvider]}
>
<Story />
</ComposeProviders>
),
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001035705
versionName "1.3.57-5"
versionCode 1001035900
versionName "1.3.59-0"
}

flavorDimensions "default"
Expand Down
37 changes: 37 additions & 0 deletions android/app/src/adhoc/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="121"
android:viewportHeight="122">
<group android:scaleX="0.55155283"
android:scaleY="0.5561111"
android:translateX="27.131054"
android:translateY="27.077223">
<group>
<clip-path
android:pathData="M121,0H0V121.48H121V0Z"/>
<group>
<clip-path
android:pathData="M121,0H0V121.48H121V0Z"/>
<path
android:pathData="M81.83,42.82V30.22H39.17V91.41H81.83V78.81H54.9V67.12H76.68V54.21H54.9V43.13H81.83V42.82Z"
android:fillColor="#002E22"/>
<path
android:pathData="M60.5,9.87C71.24,9.87 81.22,13.21 89.54,18.98C91.66,20.5 94.53,20.35 96.35,18.53C98.31,16.55 98.31,13.21 95.89,11.39C85.91,4.25 73.66,0 60.5,0C27.07,0 0,27.18 0,60.74C0,73.95 4.24,86.25 11.34,96.12C13.01,98.4 16.33,98.55 18.45,96.58C20.27,94.76 20.42,91.87 18.91,89.74C13.16,81.54 9.83,71.52 9.83,60.59C9.83,32.65 32.52,9.87 60.5,9.87Z"
android:fillColor="#002E22"/>
<path
android:pathData="M110.41,26.42C108.75,23.99 105.27,23.84 103.3,25.97C101.49,27.79 101.34,30.52 102.7,32.65C107.99,40.7 111.17,50.41 111.17,60.74C111.17,71.07 107.99,81.09 102.4,89.29C101.04,91.41 101.04,94.3 102.85,96.12C104.97,98.25 108.29,98.1 109.96,95.67C116.92,85.8 121,73.8 121,60.74C121,47.83 117.07,36.14 110.41,26.42Z"
android:fillColor="#002E22"/>
<path
android:pathData="M60.5,111.61C50.21,111.61 40.53,108.42 32.52,103.11C30.4,101.74 27.53,101.89 25.86,103.71C23.75,105.84 23.9,109.18 26.32,110.85C36,117.53 47.79,121.48 60.5,121.48C73.2,121.48 85.3,117.38 95.29,110.4C97.71,108.73 97.86,105.39 95.74,103.26C93.93,101.44 91.05,101.29 88.93,102.8C80.92,108.27 71.09,111.61 60.5,111.61Z"
android:fillColor="#002E22"/>
</group>
<path
android:pathData="M73.73,77.11H91.88C100.19,77.11 107,83.94 107,92.3C107,100.65 100.19,107.48 91.88,107.48H73.73C65.41,107.48 58.6,100.65 58.6,92.3C58.6,83.94 65.41,77.11 73.73,77.11Z"
android:fillColor="#CF4CD9"/>
<path
android:pathData="M71.15,96.09L68.58,89.11H67.22L64.65,96.09H66.01L66.62,94.57H69.19L69.79,96.09H71.15ZM67.83,90.78L68.73,93.21H67.07L67.83,90.78ZM74.18,96.09C76.3,96.09 77.81,94.73 77.81,92.6C77.81,90.47 76.45,89.11 74.18,89.11H71.91V96.09H74.18ZM73.12,90.47H74.18C75.54,90.47 76.45,91.23 76.45,92.6C76.45,93.97 75.54,94.73 74.18,94.73H73.12V90.47ZM80.23,96.09V93.21H83.1V96.09H84.46V89.11H83.1V91.84H80.23V89.11H78.87V96.09H80.23ZM89.15,96.24C91.12,96.24 92.48,94.73 92.48,92.6C92.48,90.47 91.12,89.11 89.15,89.11C87.19,89.11 85.82,90.63 85.82,92.6C85.82,94.73 87.03,96.24 89.15,96.24ZM89.15,95.03C87.94,95.03 87.19,94.12 87.19,92.75C87.19,91.39 87.94,90.47 89.15,90.47C90.36,90.47 91.12,91.39 91.12,92.75C91.12,94.12 90.36,95.03 89.15,95.03ZM96.56,96.24C98.23,96.24 99.44,95.18 99.74,93.66H98.38C98.08,94.57 97.47,95.03 96.71,95.03C95.5,95.03 94.75,94.12 94.75,92.75C94.75,91.39 95.5,90.47 96.71,90.47C97.62,90.47 98.23,90.93 98.38,91.84H99.74C99.44,90.32 98.23,89.26 96.56,89.26C94.6,89.26 93.24,90.78 93.24,92.75C93.24,94.73 94.6,96.24 96.56,96.24Z"
android:fillColor="#ffffff"/>
</group>
</group>
</vector>
4 changes: 2 additions & 2 deletions android/app/src/adhoc/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified android/app/src/adhoc/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/adhoc/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified android/app/src/adhoc/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/adhoc/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/adhoc/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/adhoc/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/adhoc/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/adhoc/res/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/adhoc/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/adhoc/res/mipmap-xxxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions android/app/src/adhoc/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#3DDC84</color>
</resources>
<color name="ic_launcher_background">#03D47C</color>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="121"
android:viewportHeight="122">
<group android:scaleX="0.55155283"
android:scaleY="0.5561111"
android:translateX="27.131054"
android:translateY="27.077223">
<group>
<clip-path
android:pathData="M121,0H0V121.48H121V0Z"/>
<group>
<clip-path
android:pathData="M121,0H0V121.48H121V0Z"/>
<path
android:pathData="M81.83,42.82V30.22H39.17V91.41H81.83V78.81H54.9V67.12H76.68V54.21H54.9V43.13H81.83V42.82Z"
android:fillColor="#002E22"/>
<path
android:pathData="M60.5,9.87C71.24,9.87 81.22,13.21 89.54,18.98C91.66,20.5 94.53,20.35 96.35,18.53C98.31,16.55 98.31,13.21 95.89,11.39C85.91,4.25 73.66,0 60.5,0C27.07,0 0,27.18 0,60.74C0,73.95 4.24,86.25 11.34,96.12C13.01,98.4 16.33,98.55 18.45,96.58C20.27,94.76 20.42,91.87 18.91,89.74C13.16,81.54 9.83,71.52 9.83,60.59C9.83,32.65 32.52,9.87 60.5,9.87Z"
android:fillColor="#002E22"/>
<path
android:pathData="M110.41,26.42C108.75,23.99 105.27,23.84 103.3,25.97C101.49,27.79 101.34,30.52 102.7,32.65C107.99,40.7 111.17,50.41 111.17,60.74C111.17,71.07 107.99,81.09 102.4,89.29C101.04,91.41 101.04,94.3 102.85,96.12C104.97,98.25 108.29,98.1 109.96,95.67C116.92,85.8 121,73.8 121,60.74C121,47.83 117.07,36.14 110.41,26.42Z"
android:fillColor="#002E22"/>
<path
android:pathData="M60.5,111.61C50.21,111.61 40.53,108.42 32.52,103.11C30.4,101.74 27.53,101.89 25.86,103.71C23.75,105.84 23.9,109.18 26.32,110.85C36,117.53 47.79,121.48 60.5,121.48C73.2,121.48 85.3,117.38 95.29,110.4C97.71,108.73 97.86,105.39 95.74,103.26C93.93,101.44 91.05,101.29 88.93,102.8C80.92,108.27 71.09,111.61 60.5,111.61Z"
android:fillColor="#002E22"/>
</group>
<path
android:pathData="M74.73,77.11H92.88C101.19,77.11 108,83.94 108,92.3C108,100.65 101.19,107.48 92.88,107.48H74.73C66.41,107.48 59.6,100.65 59.6,92.3C59.6,83.94 66.41,77.11 74.73,77.11Z"
android:fillColor="#F25730"/>
<path
android:pathData="M74.57,96.85C77.6,96.85 79.57,95.03 79.57,91.99C79.57,88.96 77.6,87.29 74.57,87.29H71.4V96.85H74.57ZM73.06,89.11H74.42C76.39,89.11 77.45,90.17 77.45,92.14C77.45,94.12 76.24,95.18 74.42,95.18H73.06V89.11ZM88.04,96.85V95.03H82.89V92.75H87.28V90.93H82.89V88.96H87.88V87.13H80.93V96.85H88.04ZM93.78,96.85L97.11,87.29H95.14L92.88,94.42L90.61,87.29H88.64L91.97,96.85H93.78Z"
android:fillColor="#ffffff"/>
</group>
</group>
</vector>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified android/app/src/development/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified android/app/src/development/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified android/app/src/development/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/development/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/development/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/development/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#3DDC84</color>
</resources>
<color name="ic_launcher_background">#03D47C</color>
</resources>
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_launcher" />
android:resource="@mipmap/ic_launcher" />

<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
Expand Down
4 changes: 2 additions & 2 deletions android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Diff not rendered.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Diff not rendered.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Diff not rendered.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Diff not rendered.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Diff not rendered.
4 changes: 2 additions & 2 deletions android/app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#3DDC84</color>
</resources>
<color name="ic_launcher_background">#03D47C</color>
</resources>
1 change: 1 addition & 0 deletions assets/animations/SaveTheWorld.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions assets/images/heart.svg
4 changes: 2 additions & 2 deletions assets/images/new-expensify-dev.svg
4 changes: 2 additions & 2 deletions contributingGuides/PROPTYPES_CONVERSION_TABLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const propTypes = {
};

// After
type Props = {
type ComponentProps = {
isVisible: boolean;
// Consider it as required unless you have proof that it is indeed an optional prop.
confirmText: string; // vs. confirmText?: string;
Expand Down Expand Up @@ -115,7 +115,7 @@ type Input = {

type Size = "small" | "medium" | "large";

type Props = {
type ComponentProps = {
unknownData: string[];

// It's not possible to infer the data as it can be anything because of reasons X, Y and Z.
Expand Down
22 changes: 22 additions & 0 deletions contributingGuides/TS_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,28 @@ type Foo = {
type Color = "red" | "blue" | "green";
```

- Use `{ComponentName}Props` pattern for prop types.

```ts
// BAD
type Props = {
// component's props
};
function MyComponent({}: Props) {
// component's code
}
// GOOD
type MyComponentProps = {
// component's props
};
function MyComponent({}: MyComponentProps) {
// component's code
}
```

- For generic type parameters, use `T` if you have only one type parameter. Don't use the `T`, `U`, `V`... sequence. Make type parameter names descriptive, each prefixed with `T`.

> Prefix each type parameter name to distinguish them from other types.
Expand Down
Loading

0 comments on commit ec372f7

Please sign in to comment.