Skip to content

Commit 741ed86

Browse files
authored
Merge pull request #2702 from pyth-network/cprussin/perf-improvements
chore: more UI performance improvements
2 parents 56e4ff5 + 988dd16 commit 741ed86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2693
-531
lines changed

apps/entropy-explorer/next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
const config = {
2+
experimental: {
3+
reactCompiler: true,
4+
},
5+
26
reactStrictMode: true,
37

48
pageExtensions: ["ts", "tsx", "mdx"],

apps/entropy-explorer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"@types/react": "catalog:",
4646
"@types/react-dom": "catalog:",
4747
"autoprefixer": "catalog:",
48+
"babel-plugin-react-compiler": "catalog:",
4849
"eslint": "catalog:",
4950
"jest": "catalog:",
5051
"postcss": "catalog:",

apps/entropy-explorer/src/components/Home/chain-select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const useResolvedProps = () => {
9696
textValue: chainTextValue,
9797
buttonLabel: viemChain?.name ?? "Chain",
9898
...(viemChain && {
99-
icon: () => <ChainIcon id={viemChain.id} />,
99+
icon: <ChainIcon id={viemChain.id} />,
100100
}),
101101
};
102102
};

apps/entropy-explorer/src/components/Home/request-drawer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ const RequestDrawerBody = ({ request }: { request: Request }) => {
6565
label="Details"
6666
fill
6767
className={styles.details ?? ""}
68-
stickyHeader
6968
columns={[
7069
{
7170
id: "field",
@@ -254,7 +253,7 @@ const CallbackFailedInfo = ({ request }: { request: CallbackErrorRequest }) => {
254253
<Button
255254
size="sm"
256255
variant="ghost"
257-
beforeIcon={Question}
256+
beforeIcon={<Question />}
258257
rounded
259258
hideText
260259
href="https://docs.pyth.network/entropy/debug-callback-failures"

apps/entropy-explorer/src/components/Home/results.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ const defaultProps = {
207207
label: "Requests",
208208
rounded: true,
209209
fill: true,
210+
stickyHeader: "appHeader",
210211
columns: [
211212
{
212213
id: "chain" as const,

apps/insights/next.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
const config = {
2-
reactStrictMode: true,
3-
4-
pageExtensions: ["ts", "tsx", "mdx"],
5-
62
experimental: {
73
useCache: true,
4+
reactCompiler: true,
85
},
96

7+
reactStrictMode: true,
8+
9+
pageExtensions: ["ts", "tsx", "mdx"],
10+
1011
logging: {
1112
fetches: {
1213
fullUrl: true,

apps/insights/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"fix:lint:eslint": "eslint --fix .",
1313
"fix:lint:stylelint": "stylelint --fix 'src/**/*.scss'",
1414
"pull:env": "[ $CI ] || VERCEL_ORG_ID=team_BKQrg3JJFLxZyTqpuYtIY0rj VERCEL_PROJECT_ID=prj_TBkf9EyQjQF37gs4Vk0sQKJj97kE vercel env pull",
15-
"start:dev": "next dev --port 3003 --turbopack",
15+
"start:dev": "next dev --port 3003",
1616
"start:prod": "next start --port 3003",
1717
"test:format": "prettier --check .",
1818
"test:lint:eslint": "eslint . --max-warnings 0",
@@ -58,6 +58,7 @@
5858
"@types/react": "catalog:",
5959
"@types/react-dom": "catalog:",
6060
"autoprefixer": "catalog:",
61+
"babel-plugin-react-compiler": "catalog:",
6162
"eslint": "catalog:",
6263
"jest": "catalog:",
6364
"postcss": "catalog:",

apps/insights/src/components/Explain/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const Explain = ({ size, title, children }: Props) => (
1717
className={styles.trigger ?? ""}
1818
variant="ghost"
1919
size={size}
20-
beforeIcon={(props) => <Info weight="fill" {...props} />}
20+
beforeIcon={<Info weight="fill" />}
2121
rounded
2222
hideText
2323
alert={{

apps/insights/src/components/PriceComponentDrawer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ const HeadingExtra = ({ status, ...props }: HeadingExtraProps) => {
270270
<OpenButton
271271
variant="ghost"
272272
hideText
273-
beforeIcon={ArrowSquareOut}
273+
beforeIcon={<ArrowSquareOut />}
274274
rounded
275275
className={styles.ghostOpenButton ?? ""}
276276
{...props}

apps/insights/src/components/PriceComponentsCard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export const PriceComponentsCardContents = <
489489
label={label}
490490
fill
491491
rounded
492-
stickyHeader
492+
stickyHeader="appHeader"
493493
className={styles.table ?? ""}
494494
columns={[
495495
{

0 commit comments

Comments
 (0)