Skip to content
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

remove skeleton animations #2505

Merged
merged 3 commits into from
Jan 6, 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
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const RESTRICTED_MODULES = {
{ name: 'playwright/TestApp', message: 'Please use render() fixture from test() function of playwright/lib module' },
{
name: '@chakra-ui/react',
importNames: [ 'Popover', 'Menu', 'PinInput', 'useToast' ],
importNames: [ 'Popover', 'Menu', 'PinInput', 'useToast', 'Skeleton' ],
message: 'Please use corresponding component or hook from ui/shared/chakra component instead',
},
{
Expand Down
1 change: 1 addition & 0 deletions theme/components/Skeleton.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { Skeleton as SkeletonComponent } from '@chakra-ui/react';
import {
defineStyle,
Expand Down
3 changes: 2 additions & 1 deletion ui/address/AddressCsvExportLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { chakra, Tooltip, Hide, Skeleton, Flex } from '@chakra-ui/react';
import { chakra, Tooltip, Hide, Flex } from '@chakra-ui/react';
import React from 'react';

import type { CsvExportParams } from 'types/client/address';
Expand All @@ -8,6 +8,7 @@ import { route } from 'nextjs-routes';
import config from 'configs/app';
import useIsInitialLoading from 'lib/hooks/useIsInitialLoading';
import useIsMobile from 'lib/hooks/useIsMobile';
import Skeleton from 'ui/shared/chakra/Skeleton';
import IconSvg from 'ui/shared/IconSvg';
import LinkInternal from 'ui/shared/links/LinkInternal';

Expand Down
3 changes: 2 additions & 1 deletion ui/address/accountHistory/AddressAccountHistoryListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Box, Flex, Skeleton, Text } from '@chakra-ui/react';
import { Box, Flex, Text } from '@chakra-ui/react';
import React, { useMemo } from 'react';

import type { NovesResponseData } from 'types/api/noves';

import Skeleton from 'ui/shared/chakra/Skeleton';
import IconSvg from 'ui/shared/IconSvg';
import LinkInternal from 'ui/shared/links/LinkInternal';
import ListItemMobile from 'ui/shared/ListItemMobile/ListItemMobile';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/accountHistory/AddressAccountHistoryTableItem.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Td, Tr, Skeleton, Box } from '@chakra-ui/react';
import { Td, Tr, Box } from '@chakra-ui/react';
import React, { useMemo } from 'react';

import type { NovesResponseData } from 'types/api/noves';

import Skeleton from 'ui/shared/chakra/Skeleton';
import IconSvg from 'ui/shared/IconSvg';
import LinkInternal from 'ui/shared/links/LinkInternal';
import NovesFromTo from 'ui/shared/Noves/NovesFromTo';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Text, Flex, Skeleton } from '@chakra-ui/react';
import { Text, Flex } from '@chakra-ui/react';
import BigNumber from 'bignumber.js';
import React from 'react';

Expand All @@ -8,6 +8,7 @@ import config from 'configs/app';
import getBlockTotalReward from 'lib/block/getBlockTotalReward';
import { currencyUnits } from 'lib/units';
import BlockGasUsed from 'ui/shared/block/BlockGasUsed';
import Skeleton from 'ui/shared/chakra/Skeleton';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import ListItemMobile from 'ui/shared/ListItemMobile/ListItemMobile';
import TimeAgoWithTooltip from 'ui/shared/TimeAgoWithTooltip';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Td, Tr, Flex, Skeleton } from '@chakra-ui/react';
import { Td, Tr, Flex } from '@chakra-ui/react';
import BigNumber from 'bignumber.js';
import React from 'react';

Expand All @@ -7,6 +7,7 @@ import type { Block } from 'types/api/block';
import config from 'configs/app';
import getBlockTotalReward from 'lib/block/getBlockTotalReward';
import BlockGasUsed from 'ui/shared/block/BlockGasUsed';
import Skeleton from 'ui/shared/chakra/Skeleton';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TimeAgoWithTooltip from 'ui/shared/TimeAgoWithTooltip';

Expand Down
3 changes: 2 additions & 1 deletion ui/address/coinBalance/AddressCoinBalanceListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Text, Stat, StatHelpText, StatArrow, Flex, Skeleton } from '@chakra-ui/react';
import { Text, Stat, StatHelpText, StatArrow, Flex } from '@chakra-ui/react';
import BigNumber from 'bignumber.js';
import React from 'react';

import type { AddressCoinBalanceHistoryItem } from 'types/api/address';

import { WEI, ZERO } from 'lib/consts';
import { currencyUnits } from 'lib/units';
import Skeleton from 'ui/shared/chakra/Skeleton';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TxEntity from 'ui/shared/entities/tx/TxEntity';
import ListItemMobile from 'ui/shared/ListItemMobile/ListItemMobile';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/coinBalance/AddressCoinBalanceTableItem.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Td, Tr, Text, Stat, StatHelpText, StatArrow, Skeleton } from '@chakra-ui/react';
import { Td, Tr, Text, Stat, StatHelpText, StatArrow } from '@chakra-ui/react';
import BigNumber from 'bignumber.js';
import React from 'react';

import type { AddressCoinBalanceHistoryItem } from 'types/api/address';

import { WEI, ZERO } from 'lib/consts';
import Skeleton from 'ui/shared/chakra/Skeleton';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TxEntity from 'ui/shared/entities/tx/TxEntity';
import TimeAgoWithTooltip from 'ui/shared/TimeAgoWithTooltip';
Expand Down
2 changes: 1 addition & 1 deletion ui/address/contract/ContractCodeIdes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {
PopoverBody,
PopoverContent,
Image,
Skeleton,
useDisclosure,
useColorModeValue,
} from '@chakra-ui/react';
import React from 'react';

import config from 'configs/app';
import Popover from 'ui/shared/chakra/Popover';
import Skeleton from 'ui/shared/chakra/Skeleton';
import IconSvg from 'ui/shared/IconSvg';
import LinkExternal from 'ui/shared/links/LinkExternal';

Expand Down
4 changes: 3 additions & 1 deletion ui/address/contract/ContractDetailsVerificationButton.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Button, Skeleton } from '@chakra-ui/react';
import { Button } from '@chakra-ui/react';
import React from 'react';

import { route } from 'nextjs-routes';

import Skeleton from 'ui/shared/chakra/Skeleton';

interface Props {
isLoading: boolean;
addressHash: string;
Expand Down
2 changes: 1 addition & 1 deletion ui/address/contract/ContractExternalLibraries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
PopoverBody,
PopoverContent,
PopoverTrigger,
Skeleton,
StackDivider,
useDisclosure,
VStack,
Expand All @@ -22,6 +21,7 @@ import type { SmartContractExternalLibrary } from 'types/api/contract';
import useIsMobile from 'lib/hooks/useIsMobile';
import { apos } from 'lib/html-entities';
import Popover from 'ui/shared/chakra/Popover';
import Skeleton from 'ui/shared/chakra/Skeleton';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import IconSvg from 'ui/shared/IconSvg';

Expand Down
3 changes: 2 additions & 1 deletion ui/address/contract/ContractSourceAddressSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { chakra, Flex, Skeleton } from '@chakra-ui/react';
import { chakra, Flex } from '@chakra-ui/react';
import React from 'react';

import { route } from 'nextjs-routes';

import Skeleton from 'ui/shared/chakra/Skeleton';
import CopyToClipboard from 'ui/shared/CopyToClipboard';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import LinkNewTab from 'ui/shared/links/LinkNewTab';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/contract/ContractSourceCode.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Flex, Skeleton, Text, Tooltip } from '@chakra-ui/react';
import { Flex, Text, Tooltip } from '@chakra-ui/react';
import React from 'react';

import type { SmartContract } from 'types/api/contract';

import { route } from 'nextjs-routes';

import formatLanguageName from 'lib/contracts/formatLanguageName';
import Skeleton from 'ui/shared/chakra/Skeleton';
import CopyToClipboard from 'ui/shared/CopyToClipboard';
import LinkInternal from 'ui/shared/links/LinkInternal';
import CodeEditor from 'ui/shared/monaco/CodeEditor';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/contract/alerts/ContractDetailsAlerts.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { chakra, Alert, Box, Flex, Skeleton } from '@chakra-ui/react';
import { chakra, Alert, Box, Flex } from '@chakra-ui/react';
import type { Channel } from 'phoenix';
import React from 'react';

Expand All @@ -8,6 +8,7 @@ import type { SmartContract } from 'types/api/contract';
import { route } from 'nextjs-routes';

import useSocketMessage from 'lib/socket/useSocketMessage';
import Skeleton from 'ui/shared/chakra/Skeleton';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import LinkExternal from 'ui/shared/links/LinkExternal';
import LinkInternal from 'ui/shared/links/LinkInternal';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/contract/info/ContractDetailsInfoItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { chakra, useColorModeValue, Flex, GridItem, Skeleton } from '@chakra-ui/react';
import { chakra, useColorModeValue, Flex, GridItem } from '@chakra-ui/react';
import React from 'react';

import Skeleton from 'ui/shared/chakra/Skeleton';
import Hint from 'ui/shared/Hint';

interface Props {
Expand Down
3 changes: 2 additions & 1 deletion ui/address/contract/methods/ContractConnectWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Alert, Button, Flex, Skeleton } from '@chakra-ui/react';
import { Alert, Button, Flex } from '@chakra-ui/react';
import React from 'react';

import config from 'configs/app';
import useIsMobile from 'lib/hooks/useIsMobile';
import useWeb3Wallet from 'lib/web3/useWallet';
import Skeleton from 'ui/shared/chakra/Skeleton';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';

interface Props {
Expand Down
3 changes: 2 additions & 1 deletion ui/address/contract/methods/ContractCustomAbiAlert.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Alert, Skeleton } from '@chakra-ui/react';
import { Alert } from '@chakra-ui/react';
import React from 'react';

import Skeleton from 'ui/shared/chakra/Skeleton';
interface Props {
isLoading?: boolean;
}
Expand Down
3 changes: 2 additions & 1 deletion ui/address/contract/methods/ContractMethodsCustom.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Flex, Skeleton, useDisclosure } from '@chakra-ui/react';
import { Button, Flex, useDisclosure } from '@chakra-ui/react';
import { useQueryClient } from '@tanstack/react-query';
import { useRouter } from 'next/router';
import React from 'react';
Expand All @@ -8,6 +8,7 @@ import type { SmartContract } from 'types/api/contract';
import useApiQuery, { getResourceKey } from 'lib/api/useApiQuery';
import getQueryParamString from 'lib/router/getQueryParamString';
import CustomAbiModal from 'ui/customAbi/CustomAbiModal/CustomAbiModal';
import Skeleton from 'ui/shared/chakra/Skeleton';
import RawDataSnippet from 'ui/shared/RawDataSnippet';
import AuthGuard from 'ui/snippets/auth/AuthGuard';
import useIsAuth from 'ui/snippets/auth/useIsAuth';
Expand Down
2 changes: 1 addition & 1 deletion ui/address/details/AddressCounterItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Skeleton } from '@chakra-ui/react';
import type { UseQueryResult } from '@tanstack/react-query';
import BigNumber from 'bignumber.js';
import React from 'react';
Expand All @@ -8,6 +7,7 @@ import type { AddressCounters } from 'types/api/address';
import { route } from 'nextjs-routes';

import type { ResourceError } from 'lib/api/resources';
import Skeleton from 'ui/shared/chakra/Skeleton';
import LinkInternal from 'ui/shared/links/LinkInternal';

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion ui/address/details/AddressNameInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Skeleton } from '@chakra-ui/react';
import React from 'react';

import type { Address } from 'types/api/address';

import Skeleton from 'ui/shared/chakra/Skeleton';
import * as DetailsInfoItem from 'ui/shared/DetailsInfoItem';
import TokenEntity from 'ui/shared/entities/token/TokenEntity';

Expand Down
3 changes: 2 additions & 1 deletion ui/address/details/AddressNetWorth.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Skeleton, Text, Flex } from '@chakra-ui/react';
import { Text, Flex } from '@chakra-ui/react';
import React from 'react';

import type { Address } from 'types/api/address';

import config from 'configs/app';
import getCurrencyValue from 'lib/getCurrencyValue';
import * as mixpanel from 'lib/mixpanel/index';
import Skeleton from 'ui/shared/chakra/Skeleton';
import TextSeparator from 'ui/shared/TextSeparator';

import { getTokensTotalInfo } from '../utils/tokenUtils';
Expand Down
2 changes: 1 addition & 1 deletion ui/address/details/AddressQrCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
useDisclosure,
Tooltip,
IconButton,
Skeleton,
} from '@chakra-ui/react';
import { useRouter } from 'next/router';
import QRCode from 'qrcode';
Expand All @@ -23,6 +22,7 @@ import type { Address as AddressType } from 'types/api/address';
import getPageType from 'lib/mixpanel/getPageType';
import * as mixpanel from 'lib/mixpanel/index';
import { useRollbar } from 'lib/rollbar';
import Skeleton from 'ui/shared/chakra/Skeleton';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import IconSvg from 'ui/shared/IconSvg';

Expand Down
3 changes: 2 additions & 1 deletion ui/address/details/AddressSaveOnGas.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Image, Skeleton } from '@chakra-ui/react';
import { Image } from '@chakra-ui/react';
import { useQuery } from '@tanstack/react-query';
import React from 'react';
import * as v from 'valibot';

import config from 'configs/app';
import Skeleton from 'ui/shared/chakra/Skeleton';
import LinkExternal from 'ui/shared/links/LinkExternal';
import TextSeparator from 'ui/shared/TextSeparator';

Expand Down
2 changes: 1 addition & 1 deletion ui/address/ensDomains/AddressEnsDomains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
PopoverContent,
PopoverTrigger,
Show,
Skeleton,
useDisclosure,
chakra,
} from '@chakra-ui/react';
Expand All @@ -23,6 +22,7 @@ import { route } from 'nextjs-routes';
import type { ResourceError } from 'lib/api/resources';
import dayjs from 'lib/date/dayjs';
import Popover from 'ui/shared/chakra/Popover';
import Skeleton from 'ui/shared/chakra/Skeleton';
import EnsEntity from 'ui/shared/entities/ens/EnsEntity';
import IconSvg from 'ui/shared/IconSvg';
import LinkInternal from 'ui/shared/links/LinkInternal';
Expand Down
2 changes: 1 addition & 1 deletion ui/address/epochRewards/AddressEpochRewardsListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Skeleton } from '@chakra-ui/react';
import React from 'react';

import type { AddressEpochRewardsItem } from 'types/api/address';

import getCurrencyValue from 'lib/getCurrencyValue';
import Skeleton from 'ui/shared/chakra/Skeleton';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TokenEntity from 'ui/shared/entities/token/TokenEntity';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/epochRewards/AddressEpochRewardsTableItem.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Flex, Td, Tr, Text, Skeleton } from '@chakra-ui/react';
import { Flex, Td, Tr, Text } from '@chakra-ui/react';
import React from 'react';

import type { AddressEpochRewardsItem } from 'types/api/address';

import getCurrencyValue from 'lib/getCurrencyValue';
import Skeleton from 'ui/shared/chakra/Skeleton';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TokenEntity from 'ui/shared/entities/token/TokenEntity';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/internals/AddressIntTxsListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, HStack, Skeleton } from '@chakra-ui/react';
import { Flex, HStack } from '@chakra-ui/react';
import BigNumber from 'bignumber.js';
import React from 'react';

Expand All @@ -7,6 +7,7 @@ import type { InternalTransaction } from 'types/api/internalTransaction';
import config from 'configs/app';
import { currencyUnits } from 'lib/units';
import AddressFromTo from 'ui/shared/address/AddressFromTo';
import Skeleton from 'ui/shared/chakra/Skeleton';
import Tag from 'ui/shared/chakra/Tag';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TxEntity from 'ui/shared/entities/tx/TxEntity';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/internals/AddressIntTxsTableItem.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Tr, Td, Box, Flex, Skeleton } from '@chakra-ui/react';
import { Tr, Td, Box, Flex } from '@chakra-ui/react';
import BigNumber from 'bignumber.js';
import React from 'react';

import type { InternalTransaction } from 'types/api/internalTransaction';

import config from 'configs/app';
import AddressFromTo from 'ui/shared/address/AddressFromTo';
import Skeleton from 'ui/shared/chakra/Skeleton';
import Tag from 'ui/shared/chakra/Tag';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TxEntity from 'ui/shared/entities/tx/TxEntity';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/mud/AddressMudTablesListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Divider, Text, Skeleton, useBoolean, Flex, Link, VStack, chakra, Box, Grid, GridItem } from '@chakra-ui/react';
import { Divider, Text, useBoolean, Flex, Link, VStack, chakra, Box, Grid, GridItem } from '@chakra-ui/react';
import { useRouter } from 'next/router';
import React from 'react';

import type { AddressMudTableItem } from 'types/api/address';

import { route } from 'nextjs-routes';

import Skeleton from 'ui/shared/chakra/Skeleton';
import Tag from 'ui/shared/chakra/Tag';
import HashStringShorten from 'ui/shared/HashStringShorten';
import IconSvg from 'ui/shared/IconSvg';
Expand Down
3 changes: 2 additions & 1 deletion ui/address/mud/AddressMudTablesTableItem.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Td, Tr, Text, Skeleton, useBoolean, Link, Table, VStack, chakra } from '@chakra-ui/react';
import { Td, Tr, Text, useBoolean, Link, Table, VStack, chakra } from '@chakra-ui/react';
import { useRouter } from 'next/router';
import React from 'react';

import type { AddressMudTableItem } from 'types/api/address';

import { route } from 'nextjs-routes';

import Skeleton from 'ui/shared/chakra/Skeleton';
import Tag from 'ui/shared/chakra/Tag';
import IconSvg from 'ui/shared/IconSvg';
import LinkInternal from 'ui/shared/links/LinkInternal';
Expand Down
Loading
Loading