Skip to content

chore: more UI performance improvements #2702

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

Merged
merged 1 commit into from
May 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/entropy-explorer/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
const config = {
experimental: {
reactCompiler: true,
},

reactStrictMode: true,

pageExtensions: ["ts", "tsx", "mdx"],
Expand Down
1 change: 1 addition & 0 deletions apps/entropy-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"autoprefixer": "catalog:",
"babel-plugin-react-compiler": "catalog:",
"eslint": "catalog:",
"jest": "catalog:",
"postcss": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion apps/entropy-explorer/src/components/Home/chain-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const useResolvedProps = () => {
textValue: chainTextValue,
buttonLabel: viemChain?.name ?? "Chain",
...(viemChain && {
icon: () => <ChainIcon id={viemChain.id} />,
icon: <ChainIcon id={viemChain.id} />,
}),
};
};
Expand Down
3 changes: 1 addition & 2 deletions apps/entropy-explorer/src/components/Home/request-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const RequestDrawerBody = ({ request }: { request: Request }) => {
label="Details"
fill
className={styles.details ?? ""}
stickyHeader
columns={[
{
id: "field",
Expand Down Expand Up @@ -254,7 +253,7 @@ const CallbackFailedInfo = ({ request }: { request: CallbackErrorRequest }) => {
<Button
size="sm"
variant="ghost"
beforeIcon={Question}
beforeIcon={<Question />}
rounded
hideText
href="https://docs.pyth.network/entropy/debug-callback-failures"
Expand Down
1 change: 1 addition & 0 deletions apps/entropy-explorer/src/components/Home/results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const defaultProps = {
label: "Requests",
rounded: true,
fill: true,
stickyHeader: "appHeader",
columns: [
{
id: "chain" as const,
Expand Down
9 changes: 5 additions & 4 deletions apps/insights/next.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const config = {
reactStrictMode: true,

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

experimental: {
useCache: true,
reactCompiler: true,
},

reactStrictMode: true,

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

logging: {
fetches: {
fullUrl: true,
Expand Down
3 changes: 2 additions & 1 deletion apps/insights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"fix:lint:eslint": "eslint --fix .",
"fix:lint:stylelint": "stylelint --fix 'src/**/*.scss'",
"pull:env": "[ $CI ] || VERCEL_ORG_ID=team_BKQrg3JJFLxZyTqpuYtIY0rj VERCEL_PROJECT_ID=prj_TBkf9EyQjQF37gs4Vk0sQKJj97kE vercel env pull",
"start:dev": "next dev --port 3003 --turbopack",
"start:dev": "next dev --port 3003",
"start:prod": "next start --port 3003",
"test:format": "prettier --check .",
"test:lint:eslint": "eslint . --max-warnings 0",
Expand Down Expand Up @@ -58,6 +58,7 @@
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"autoprefixer": "catalog:",
"babel-plugin-react-compiler": "catalog:",
"eslint": "catalog:",
"jest": "catalog:",
"postcss": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion apps/insights/src/components/Explain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Explain = ({ size, title, children }: Props) => (
className={styles.trigger ?? ""}
variant="ghost"
size={size}
beforeIcon={(props) => <Info weight="fill" {...props} />}
beforeIcon={<Info weight="fill" />}
rounded
hideText
alert={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const HeadingExtra = ({ status, ...props }: HeadingExtraProps) => {
<OpenButton
variant="ghost"
hideText
beforeIcon={ArrowSquareOut}
beforeIcon={<ArrowSquareOut />}
rounded
className={styles.ghostOpenButton ?? ""}
{...props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export const PriceComponentsCardContents = <
label={label}
fill
rounded
stickyHeader
stickyHeader="appHeader"
className={styles.table ?? ""}
columns={[
{
Expand Down
2 changes: 1 addition & 1 deletion apps/insights/src/components/PriceFeed/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const PriceFeedHeaderImpl = (props: PriceFeedHeaderImplProps) => (
<Button
variant="outline"
size="sm"
beforeIcon={ListDashes}
beforeIcon={<ListDashes />}
isPending={props.isLoading}
{...(!props.isLoading && {
drawer: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const ReferenceData = ({ feed }: Props) => {
<Table
label="Reference Data"
fill
stickyHeader
stickyHeader="top"
className={styles.referenceData ?? ""}
columns={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const AssetClassTable = ({ numFeedsByAssetClass }: Props) => {
return (
<Table
fill
stickyHeader
stickyHeader="top"
label="Asset Classes"
columns={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
display: flex;
flex-flow: column nowrap;
overflow: hidden;
height: 100%;

.searchBar {
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const ComingSoonList = ({ comingSoonFeeds }: Props) => {
</div>
<Table
fill
stickyHeader
stickyHeader="top"
label="Coming Soon"
className={styles.priceFeeds ?? ""}
emptyState={
Expand Down
4 changes: 4 additions & 0 deletions apps/insights/src/components/PriceFeeds/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@
}
}
}

.comingSoonCard {
grid-template-rows: 1fr;
}
2 changes: 1 addition & 1 deletion apps/insights/src/components/PriceFeeds/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const FeaturedFeeds = ({
variant="outline"
drawer={{
fill: true,
className: styles.comingSoonCard ?? "",
bodyClassName: styles.comingSoonCard ?? "",
title: (
<>
<span>Coming Soon</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const PriceFeedsCardContents = ({ id, ...props }: PriceFeedsCardContents) => (
rounded
fill
label="Price Feeds"
stickyHeader
stickyHeader="appHeader"
className={styles.table ?? ""}
columns={[
{
Expand Down
4 changes: 2 additions & 2 deletions apps/insights/src/components/Publisher/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ const OisPoolCardImpl = (props: OisPoolCardImplProps) => (
size="sm"
href="https://staking.pyth.network"
target="_blank"
beforeIcon={Browsers}
beforeIcon={<Browsers />}
>
Open Staking App
</Button>
Expand All @@ -503,7 +503,7 @@ const OisPoolCardImpl = (props: OisPoolCardImplProps) => (
size="sm"
href="https://docs.pyth.network/home/oracle-integrity-staking"
target="_blank"
beforeIcon={BookOpenText}
beforeIcon={<BookOpenText />}
>
Documentation
</Button>
Expand Down
2 changes: 1 addition & 1 deletion apps/insights/src/components/Publishers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const Publishers = async () => {
target="_blank"
size="sm"
variant="outline"
afterIcon={ArrowSquareOut}
afterIcon={<ArrowSquareOut />}
>
Staking App
</Button>
Expand Down
4 changes: 2 additions & 2 deletions apps/insights/src/components/Publishers/publishers-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const PublishersCardContents = ({
variant="outline"
hideLabel
options={CLUSTER_NAMES.map((id) => ({ id }))}
icon={Database}
icon={<Database />}
{...(props.isLoading
? { isPending: true, buttonLabel: "Cluster" }
: {
Expand Down Expand Up @@ -323,7 +323,7 @@ const PublishersCardContents = ({
rounded
fill
label="Publishers"
stickyHeader
stickyHeader="appHeader"
className={styles.table ?? ""}
columns={[
{
Expand Down
6 changes: 3 additions & 3 deletions apps/insights/src/components/Root/search-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const SearchButtonImpl = (
<Button
className={styles.largeScreenSearchButton ?? ""}
variant="outline"
beforeIcon={MagnifyingGlass}
beforeIcon={<MagnifyingGlass />}
size="sm"
rounded
{...props}
Expand All @@ -88,7 +88,7 @@ const SearchButtonImpl = (
className={styles.smallScreenSearchButton ?? ""}
hideText
variant="ghost"
beforeIcon={MagnifyingGlass}
beforeIcon={<MagnifyingGlass />}
size="sm"
rounded
{...props}
Expand Down Expand Up @@ -249,7 +249,7 @@ const SearchDialogContents = ({
</div>
<Button
className={styles.closeButton ?? ""}
beforeIcon={(props) => <XCircle weight="fill" {...props} />}
beforeIcon={<XCircle weight="fill" />}
slot="close"
hideText
rounded
Expand Down
Loading
Loading