Skip to content

Commit cd3fec1

Browse files
authored
fix: improve loading bottom sheet by using non modal version (#671)
* fix: improve loading bottom sheet by using non modal version * improve search lag * v8.5.2-alpha.1 * fix: android weird input * fix: more perf things * fix: pan to close * v8.5.2-alpha.2 * fix: update sb version * v8.5.2-alpha.3
1 parent 9404dd2 commit cd3fec1

26 files changed

+735
-479
lines changed

.eslintrc.js

+6
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@ module.exports = {
55
'react-native/no-inline-styles': 'off',
66
'react/react-in-jsx-scope': 'off',
77
curly: ['error', 'multi-line'],
8+
'react-hooks/exhaustive-deps': [
9+
'error',
10+
{
11+
additionalHooks: 'useStyle',
12+
},
13+
],
814
},
915
};

examples/expo-example/package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "expo-example",
3-
"version": "8.5.2-alpha.0",
3+
"version": "8.5.2-alpha.3",
44
"private": true,
55
"main": "index.js",
66
"scripts": {
@@ -25,24 +25,24 @@
2525
"@react-native-async-storage/async-storage": "1.23.1",
2626
"@react-native-community/datetimepicker": "8.2.0",
2727
"@react-native-community/slider": "4.5.5",
28-
"@storybook/addon-essentials": "^8.4.2",
29-
"@storybook/addon-interactions": "^8.4.2",
30-
"@storybook/addon-links": "^8.4.2",
31-
"@storybook/addon-ondevice-actions": "^8.5.2-alpha.0",
32-
"@storybook/addon-ondevice-backgrounds": "^8.5.2-alpha.0",
33-
"@storybook/addon-ondevice-controls": "^8.5.2-alpha.0",
34-
"@storybook/addon-ondevice-notes": "^8.5.2-alpha.0",
28+
"@storybook/addon-essentials": "^8.5.1",
29+
"@storybook/addon-interactions": "^8.5.1",
30+
"@storybook/addon-links": "^8.5.1",
31+
"@storybook/addon-ondevice-actions": "^8.5.2-alpha.3",
32+
"@storybook/addon-ondevice-backgrounds": "^8.5.2-alpha.3",
33+
"@storybook/addon-ondevice-controls": "^8.5.2-alpha.3",
34+
"@storybook/addon-ondevice-notes": "^8.5.2-alpha.3",
3535
"@storybook/addon-react-native-server": "0.0.6",
3636
"@storybook/addon-react-native-web": "^0.0.26",
3737
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
38-
"@storybook/blocks": "^8.4.2",
39-
"@storybook/builder-webpack5": "^8.4.2",
38+
"@storybook/blocks": "^8.5.1",
39+
"@storybook/builder-webpack5": "^8.5.1",
4040
"@storybook/global": "^5.0.0",
41-
"@storybook/react": "^8.4.2",
42-
"@storybook/react-native": "^8.5.2-alpha.0",
43-
"@storybook/react-native-theming": "^8.5.2-alpha.0",
44-
"@storybook/react-webpack5": "^8.4.2",
45-
"@storybook/test": "^8.4.2",
41+
"@storybook/react": "^8.5.1",
42+
"@storybook/react-native": "^8.5.2-alpha.3",
43+
"@storybook/react-native-theming": "^8.5.2-alpha.3",
44+
"@storybook/react-webpack5": "^8.5.1",
45+
"@storybook/test": "^8.5.1",
4646
"expo": "~52.0.11",
4747
"history": "^5.3.0",
4848
"querystring": "^0.2.1",
@@ -55,7 +55,7 @@
5555
"react-native-svg": "15.8.0",
5656
"react-native-web": "~0.19.13",
5757
"react-router": "^6.26.2",
58-
"storybook": "^8.4.2",
58+
"storybook": "^8.5.1",
5959
"storybook-addon-deep-controls": "^0.9.2",
6060
"ws": "^8.18.0"
6161
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import * as fs from 'fs';
2+
import * as path from 'path';
3+
4+
const template = (num: number) => `import { Meta, StoryObj } from '@storybook/react'
5+
import { View } from 'react-native'
6+
7+
const Test${num} = () => {
8+
return <View style={{ flex: 1, backgroundColor: 'red' }} />
9+
}
10+
11+
const meta: Meta<typeof Test${num}> = {
12+
title: 'PerfTesting/Test${num}',
13+
component: Test${num},
14+
}
15+
16+
export default meta
17+
18+
export const Default: StoryObj<typeof Test${num}> = {}
19+
export const one: StoryObj<typeof Test${num}> = {}
20+
export const two: StoryObj<typeof Test${num}> = {}
21+
export const three: StoryObj<typeof Test${num}> = {}
22+
export const four: StoryObj<typeof Test${num}> = {}
23+
export const five: StoryObj<typeof Test${num}> = {}
24+
export const six: StoryObj<typeof Test${num}> = {}
25+
export const seven: StoryObj<typeof Test${num}> = {}
26+
export const eight: StoryObj<typeof Test${num}> = {}
27+
export const nine: StoryObj<typeof Test${num}> = {}
28+
export const ten: StoryObj<typeof Test${num}> = {}
29+
export const eleven: StoryObj<typeof Test${num}> = {}
30+
export const twelve: StoryObj<typeof Test${num}> = {}
31+
export const thirteen: StoryObj<typeof Test${num}> = {}
32+
export const fourteen: StoryObj<typeof Test${num}> = {}
33+
export const fifteen: StoryObj<typeof Test${num}> = {}
34+
export const sixteen: StoryObj<typeof Test${num}> = {}
35+
export const seventeen: StoryObj<typeof Test${num}> = {}
36+
export const eighteen: StoryObj<typeof Test${num}> = {}
37+
export const nineteen: StoryObj<typeof Test${num}> = {}`;
38+
39+
const generateFiles = () => {
40+
const baseDir = path.join(__dirname, '../components/PerfTesting');
41+
42+
// Create directory if it doesn't exist
43+
if (!fs.existsSync(baseDir)) {
44+
fs.mkdirSync(baseDir, { recursive: true });
45+
}
46+
47+
// Generate files from Test11 to Test50 (since Test1-10 already exist)
48+
for (let i = 1; i <= 200; i++) {
49+
const fileName = `Test${i}.stories.tsx`;
50+
const filePath = path.join(baseDir, fileName);
51+
52+
fs.writeFileSync(filePath, template(i));
53+
console.log(`Generated ${fileName}`);
54+
}
55+
};
56+
57+
generateFiles();

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"npmClient": "yarn",
33
"registry": "https://registry.npmjs.org",
4-
"version": "8.5.2-alpha.0"
4+
"version": "8.5.2-alpha.3"
55
}

packages/ondevice-actions/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-ondevice-actions",
3-
"version": "8.5.2-alpha.0",
3+
"version": "8.5.2-alpha.3",
44
"description": "Action Logger addon for react-native storybook",
55
"keywords": [
66
"storybook"
@@ -27,8 +27,8 @@
2727
"prepare": "tsc"
2828
},
2929
"dependencies": {
30-
"@storybook/addon-actions": "^8.4.2",
31-
"@storybook/core": "^8.4.2",
30+
"@storybook/addon-actions": "^8.5.1",
31+
"@storybook/core": "^8.5.1",
3232
"@storybook/global": "^5.0.0",
3333
"fast-deep-equal": "^2.0.1"
3434
},

packages/ondevice-backgrounds/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-ondevice-backgrounds",
3-
"version": "8.5.2-alpha.0",
3+
"version": "8.5.2-alpha.3",
44
"description": "A react-native storybook addon to show different backgrounds for your preview",
55
"keywords": [
66
"addon",
@@ -32,8 +32,8 @@
3232
"dev": "tsc --watch"
3333
},
3434
"dependencies": {
35-
"@storybook/core": "^8.4.2",
36-
"@storybook/react-native-theming": "^8.5.2-alpha.0"
35+
"@storybook/core": "^8.5.1",
36+
"@storybook/react-native-theming": "^8.5.2-alpha.3"
3737
},
3838
"devDependencies": {
3939
"typescript": "^5.3.3"

packages/ondevice-controls/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-ondevice-controls",
3-
"version": "8.5.2-alpha.0",
3+
"version": "8.5.2-alpha.3",
44
"description": "Display storybook controls on your device.",
55
"keywords": [
66
"addon",
@@ -30,10 +30,10 @@
3030
"copyimages": "cross-env-shell cp -r src/components/color-picker/resources dist/components/color-picker/resources"
3131
},
3232
"dependencies": {
33-
"@storybook/addon-controls": "^8.4.2",
34-
"@storybook/core": "^8.4.2",
35-
"@storybook/react-native-theming": "^8.5.2-alpha.0",
36-
"@storybook/react-native-ui": "^8.5.2-alpha.0",
33+
"@storybook/addon-controls": "^8.5.1",
34+
"@storybook/core": "^8.5.1",
35+
"@storybook/react-native-theming": "^8.5.2-alpha.3",
36+
"@storybook/react-native-ui": "^8.5.2-alpha.3",
3737
"deep-equal": "^1.0.1",
3838
"prop-types": "^15.7.2",
3939
"react-native-modal-datetime-picker": "^14.0.0",

packages/ondevice-notes/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/addon-ondevice-notes",
3-
"version": "8.5.2-alpha.0",
3+
"version": "8.5.2-alpha.3",
44
"description": "Write notes for your react-native Storybook stories.",
55
"keywords": [
66
"addon",
@@ -29,8 +29,8 @@
2929
"dev": "tsc --watch"
3030
},
3131
"dependencies": {
32-
"@storybook/core": "^8.4.2",
33-
"@storybook/react-native-theming": "^8.5.2-alpha.0",
32+
"@storybook/core": "^8.5.1",
33+
"@storybook/react-native-theming": "^8.5.2-alpha.3",
3434
"react-native-markdown-display": "^7.0.2"
3535
},
3636
"devDependencies": {

packages/react-native-theming/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/react-native-theming",
3-
"version": "8.5.2-alpha.0",
3+
"version": "8.5.2-alpha.3",
44
"description": "A wrapper library around emotion 11 to provide theming support for react-native storybook",
55
"keywords": [
66
"react",

packages/react-native-ui/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@storybook/react-native-ui",
3-
"version": "8.5.2-alpha.0",
3+
"version": "8.5.2-alpha.3",
44
"description": "ui components for react native storybook",
55
"keywords": [
66
"react",
@@ -58,9 +58,9 @@
5858
"typescript": "^5.3.3"
5959
},
6060
"dependencies": {
61-
"@storybook/core": "^8.4.2",
62-
"@storybook/react": "^8.4.2",
63-
"@storybook/react-native-theming": "^8.5.2-alpha.0",
61+
"@storybook/core": "^8.5.1",
62+
"@storybook/react": "^8.5.1",
63+
"@storybook/react-native-theming": "^8.5.2-alpha.3",
6464
"fuse.js": "^7.0.0",
6565
"memoizerific": "^1.11.3",
6666
"polished": "^4.3.1",

0 commit comments

Comments
 (0)