-
Notifications
You must be signed in to change notification settings - Fork 17
Boost Lighthouse Performance (Partially Fixes Issue #433) #509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5385c04
71712df
6698525
2d512ab
9810ecc
343c143
accb9b0
696bd65
50ddb53
aa0911a
1d008ed
1b083e9
0fb397a
bfcbd13
ef4073a
3f5b8ca
ebba531
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { Skeleton } from "@livepeer/design-system"; | ||
|
|
||
| const ConnectButtonSkeleton = () => ( | ||
| <Skeleton | ||
| css={{ | ||
| height: "40px", | ||
| minWidth: "145px", | ||
| width: "145px", | ||
| borderRadius: "8px", | ||
| display: "inline-block", | ||
| }} | ||
| /> | ||
| ); | ||
|
|
||
| export default ConnectButtonSkeleton; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import { DrawerItem } from "@layouts/main"; | ||
| import { Box, Flex, Link as A, Text } from "@livepeer/design-system"; | ||
| import { Box, Flex, Link as A } from "@livepeer/design-system"; | ||
| import { IS_L2 } from "lib/chains"; | ||
| import Link from "next/link"; | ||
| import Router, { useRouter } from "next/router"; | ||
|
|
@@ -162,8 +162,9 @@ const Index = ({ | |
|
|
||
| <LlamaswapModal | ||
| trigger={ | ||
| <A | ||
| as={Text} | ||
| <Box | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| as="button" | ||
| type="button" | ||
| css={{ | ||
| cursor: "pointer", | ||
| fontSize: "$2", | ||
|
|
@@ -172,7 +173,7 @@ const Index = ({ | |
| }} | ||
| > | ||
| Get LPT | ||
| </A> | ||
| </Box> | ||
| } | ||
| > | ||
| <Box | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -179,7 +179,7 @@ const LivepeerLogo = ({ | |||||
| if (!isLink) return markup; | ||||||
| return ( | ||||||
| <Link href="/" passHref> | ||||||
|
||||||
| <Link href="/" passHref> | |
| <Link href="/" passHref legacyBehavior> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| import { Box, Flex, Skeleton } from "@livepeer/design-system"; | ||
|
|
||
| const OrchestratorListSkeleton = () => { | ||
| return ( | ||
| <Box | ||
| css={{ | ||
| border: "1px solid $colors$neutral4", | ||
| backgroundColor: "$panel", | ||
| borderRadius: "$4", | ||
| }} | ||
| > | ||
| {/* Input section skeleton */} | ||
| <Box | ||
| css={{ | ||
| marginTop: "$4", | ||
| marginLeft: "$5", | ||
| marginBottom: "$4", | ||
| }} | ||
| > | ||
| <Flex css={{ alignItems: "center", marginBottom: "$2" }}> | ||
| <Skeleton css={{ width: 20, height: 20, borderRadius: "$2" }} /> | ||
| <Skeleton css={{ width: 200, height: 16, marginLeft: "$2" }} /> | ||
| </Flex> | ||
| <Flex css={{ gap: "$2", marginBottom: "$2" }}> | ||
| <Skeleton css={{ width: 120, height: 32, borderRadius: "$2" }} /> | ||
| <Skeleton css={{ width: 120, height: 32, borderRadius: "$2" }} /> | ||
| <Skeleton css={{ width: 120, height: 32, borderRadius: "$2" }} /> | ||
| </Flex> | ||
| </Box> | ||
|
|
||
| {/* Table header skeleton */} | ||
| <Box | ||
| css={{ padding: "$3 $5", borderBottom: "1px solid $colors$neutral4" }} | ||
| > | ||
| <Flex css={{ gap: "$4" }}> | ||
| <Skeleton css={{ width: 150, height: 16 }} /> | ||
| <Skeleton css={{ width: 120, height: 16 }} /> | ||
| <Skeleton css={{ width: 120, height: 16 }} /> | ||
| <Skeleton css={{ width: 100, height: 16 }} /> | ||
| <Skeleton css={{ width: 100, height: 16 }} /> | ||
| </Flex> | ||
| </Box> | ||
|
|
||
| {/* Table rows skeleton (10 rows) */} | ||
| {Array.from({ length: 10 }).map((_, i) => ( | ||
| <Box | ||
| key={i} | ||
| css={{ | ||
| padding: "$3 $5", | ||
| borderBottom: i < 9 ? "1px solid $colors$neutral4" : "none", | ||
| }} | ||
| > | ||
| <Flex css={{ gap: "$4", alignItems: "center" }}> | ||
| <Skeleton css={{ width: 150, height: 40, borderRadius: "$2" }} /> | ||
| <Skeleton css={{ width: 120, height: 20 }} /> | ||
| <Skeleton css={{ width: 120, height: 20 }} /> | ||
| <Skeleton css={{ width: 100, height: 20 }} /> | ||
| <Skeleton css={{ width: 100, height: 20 }} /> | ||
| </Flex> | ||
| </Box> | ||
| ))} | ||
|
|
||
| {/* Pagination skeleton */} | ||
| <Flex | ||
| css={{ | ||
| paddingTop: "$4", | ||
| paddingBottom: "$4", | ||
| alignItems: "center", | ||
| justifyContent: "center", | ||
| gap: "$3", | ||
| }} | ||
| > | ||
| <Skeleton css={{ width: 20, height: 20, borderRadius: "$2" }} /> | ||
| <Skeleton css={{ width: 100, height: 16 }} /> | ||
| <Skeleton css={{ width: 20, height: 20, borderRadius: "$2" }} /> | ||
| </Flex> | ||
| </Box> | ||
| ); | ||
| }; | ||
|
|
||
| export default OrchestratorListSkeleton; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -256,7 +256,7 @@ const OrchestratorList = ({ | |||||||||||||||||
| </Box> | ||||||||||||||||||
| } | ||||||||||||||||||
| > | ||||||||||||||||||
| <Box>Orchestrator</Box> | ||||||||||||||||||
| <Box role="button">Orchestrator</Box> | ||||||||||||||||||
|
||||||||||||||||||
| <Box role="button">Orchestrator</Box> | |
| <Box | |
| as="button" | |
| type="button" | |
| css={{ all: "unset", cursor: "pointer" }} | |
| > | |
| Orchestrator | |
| </Box> |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role="button" is applied to a Box used as a tooltip trigger, but the element still isn’t keyboard-focusable/clickable (no tabIndex, no key handlers, and it’s likely rendered as a div). For accessibility, use an actual <button type="button"> (e.g., as="button") or ensure the element is focusable and supports keyboard interaction.
| <Box role="button">Forecasted Yield</Box> | |
| <Box as="button" type="button">Forecasted Yield</Box> |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role="button" is applied to a Box used as a tooltip trigger, but the element still isn’t keyboard-focusable/clickable (no tabIndex, no key handlers, and it’s likely rendered as a div). For accessibility, use an actual <button type="button"> (e.g., as="button") or ensure the element is focusable and supports keyboard interaction.
| <Box role="button">Delegated Stake</Box> | |
| <Box as="button" type="button">Delegated Stake</Box> |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role="button" is applied to a Box used as a tooltip trigger, but the element still isn’t keyboard-focusable/clickable (no tabIndex, no key handlers, and it’s likely rendered as a div). For accessibility, use an actual <button type="button"> (e.g., as="button") or ensure the element is focusable and supports keyboard interaction.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,49 +3,56 @@ import { ChevronRightIcon } from "@modulz/radix-icons"; | |
| import Link from "next/link"; | ||
|
|
||
| const PopoverLink = ({ href, children, newWindow = false }) => { | ||
| return ( | ||
| <A | ||
| as={Link} | ||
| href={href} | ||
| passHref | ||
| {...(newWindow | ||
| ? { | ||
| target: "_blank", | ||
| rel: "noopener noreferrer", | ||
| } | ||
| : {})} | ||
| css={{ | ||
| display: "flex", | ||
| alignItems: "center", | ||
| justifyContent: "space-between", | ||
| textDecoration: "none", | ||
| borderRadius: "$2", | ||
| cursor: "pointer", | ||
| marginBottom: "$1", | ||
| paddingLeft: "$3", | ||
| paddingRight: "$3", | ||
| paddingTop: "$1", | ||
| paddingBottom: "$1", | ||
| const linkStyles = { | ||
| display: "flex", | ||
| alignItems: "center", | ||
| justifyContent: "space-between", | ||
| textDecoration: "none", | ||
| borderRadius: "$2", | ||
| cursor: "pointer", | ||
| marginBottom: "$1", | ||
| paddingLeft: "$3", | ||
| paddingRight: "$3", | ||
| paddingTop: "$1", | ||
| paddingBottom: "$1", | ||
| transition: ".2s transform", | ||
| "&:last-child": { | ||
| marginBottom: 0, | ||
| }, | ||
| svg: { | ||
| transition: ".2s transform", | ||
| transform: "translateX(0px)", | ||
| }, | ||
| "&:hover": { | ||
| bc: "$neutral6", | ||
| svg: { | ||
| transition: ".2s transform", | ||
| "&:last-child": { | ||
| marginBottom: 0, | ||
| }, | ||
| svg: { | ||
| transition: ".2s transform", | ||
| transform: "translateX(0px)", | ||
| }, | ||
| "&:hover": { | ||
| bc: "$neutral6", | ||
| svg: { | ||
| transition: ".2s transform", | ||
| transform: "translateX(6px)", | ||
| }, | ||
| }, | ||
| }} | ||
| > | ||
| transform: "translateX(6px)", | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually think this is wrong. But would double-check @Roaring30s |
||
| // For external links, use regular anchor tag to avoid Next.js Link issues | ||
| if (newWindow || href.startsWith("http")) { | ||
| return ( | ||
| <A href={href} target="_blank" rel="noopener noreferrer" css={linkStyles}> | ||
|
Comment on lines
+35
to
+38
|
||
| {children} | ||
| <Box | ||
| as={ChevronRightIcon} | ||
| aria-hidden="true" | ||
| css={{ marginLeft: "$2", width: 16, height: 16 }} | ||
| /> | ||
| </A> | ||
| ); | ||
| } | ||
|
|
||
| // For internal links, use Next.js Link | ||
| return ( | ||
| <A as={Link} href={href} passHref css={linkStyles}> | ||
| {children} | ||
| <Box | ||
| as={ChevronRightIcon} | ||
| aria-hidden="true" | ||
| css={{ marginLeft: "$2", width: 16, height: 16 }} | ||
| /> | ||
| </A> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes inconsistent styling in the mobile drawer: