-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
861 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
- release/* | ||
paths: | ||
- "android/**" | ||
- "package.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
- release/* | ||
paths: | ||
- "ios/**" | ||
- "package.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"expo": { | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"ios": { | ||
"buildNumber": "2" | ||
"buildNumber": "3" | ||
}, | ||
"android": { | ||
"versionCode": 208 | ||
"versionCode": 212 | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
components/Screen/ScreenHeaderModalCloseButton/ScreenHeaderModalCloseButton.android.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { memo } from "react"; | ||
|
||
import { Optional } from "../../../types/general"; | ||
import { | ||
IScreenHeaderIconButtonProps, | ||
Check failure on line 5 in components/Screen/ScreenHeaderModalCloseButton/ScreenHeaderModalCloseButton.android.tsx GitHub Actions / tsc
Check failure on line 5 in components/Screen/ScreenHeaderModalCloseButton/ScreenHeaderModalCloseButton.android.tsx GitHub Actions / tsc
|
||
ScreenHeaderIconButton, | ||
} from "../ScreenHeaderIconButton/ScreenHeaderIconButton"; | ||
|
||
export type IScreenHeaderModalCloseButtonProps = Optional< | ||
IScreenHeaderIconButtonProps, | ||
"picto" | ||
>; | ||
|
||
export const ScreenHeaderModalCloseButton = memo( | ||
function ScreenHeaderModalCloseButton( | ||
props: Optional<IScreenHeaderModalCloseButtonProps, "variant" | "title"> | ||
) { | ||
const { title, variant, ...rest } = props; | ||
return <ScreenHeaderIconButton picto="chevron.left" {...rest} />; | ||
Check failure on line 19 in components/Screen/ScreenHeaderModalCloseButton/ScreenHeaderModalCloseButton.android.tsx GitHub Actions / tsc
|
||
} | ||
); |
32 changes: 32 additions & 0 deletions
32
components/Screen/ScreenHeaderModalCloseButton/ScreenHeaderModalCloseButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { memo } from "react"; | ||
import { Platform } from "react-native"; | ||
|
||
import { Optional } from "../../../types/general"; | ||
import { ScreenHeaderButton } from "../ScreenHeaderButton/ScreenHeaderButton"; | ||
import { IScreenHeaderButtonProps } from "../ScreenHeaderButton/ScreenHeaderButton.props"; | ||
|
||
export type IScreenHeaderModalCloseButtonProps = Optional< | ||
IScreenHeaderButtonProps, | ||
"title" | ||
>; | ||
|
||
export const ScreenHeaderModalCloseButton = memo( | ||
function ScreenHeaderModalCloseButton( | ||
props: Optional<IScreenHeaderModalCloseButtonProps, "variant" | "title"> | ||
) { | ||
const { title, variant, ...rest } = props; | ||
return ( | ||
<ScreenHeaderButton | ||
variant={variant ?? "text"} | ||
title={ | ||
title ?? | ||
Platform.select({ | ||
android: "Back", | ||
default: "Close", | ||
}) | ||
} | ||
{...rest} | ||
/> | ||
); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { jest, test } from "@jest/globals"; | ||
import { screen } from "@testing-library/react-native"; | ||
import React from "react"; | ||
import { measureRenders } from "reassure"; | ||
|
||
import Avatar from "../Avatar"; | ||
|
||
jest.setTimeout(600_000); | ||
|
||
const TestComponent = ({ uri }: { uri?: string }) => <Avatar uri={uri} />; | ||
|
||
test("Empty Avatar 10 runs", async () => { | ||
const scenario = async () => { | ||
await screen.findByTestId("avatar-placeholder"); | ||
}; | ||
|
||
await measureRenders(<TestComponent />, { scenario, runs: 10 }); | ||
}); | ||
|
||
test("Empty Avatar 50 runs", async () => { | ||
const scenario = async () => { | ||
await screen.findByTestId("avatar-placeholder"); | ||
}; | ||
|
||
await measureRenders(<TestComponent />, { scenario, runs: 50 }); | ||
}); | ||
|
||
test("Avatar Image 10 runs", async () => { | ||
const scenario = async () => { | ||
await screen.findByTestId("avatar-image"); | ||
}; | ||
|
||
await measureRenders(<TestComponent uri="https://picsum.photos/200/300" />, { | ||
scenario, | ||
runs: 10, | ||
}); | ||
}); | ||
|
||
test("Avatar Image 50 runs", async () => { | ||
const scenario = async () => { | ||
await screen.findByTestId("avatar-image"); | ||
}; | ||
|
||
await measureRenders(<TestComponent uri="https://picsum.photos/200/300" />, { | ||
scenario, | ||
runs: 50, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
import path from 'path'; | ||
import { dangerReassure } from 'reassure'; | ||
|
||
dangerReassure({ | ||
inputFilePath: path.join(__dirname, './.reassure/output.md'), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
BASELINE_BRANCH=${GITHUB_BASE_REF:="main"} | ||
|
||
# Required for `git switch` on CI | ||
git fetch origin | ||
|
||
# Gather baseline perf measurements | ||
git switch "$BASELINE_BRANCH" | ||
|
||
yarn | ||
yarn reassure --baseline | ||
|
||
# Gather current perf measurements & compare results | ||
git switch --detach - | ||
|
||
yarn | ||
yarn reassure --branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.