diff --git a/package.json b/package.json index 2b2552dba..5bd0c517d 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@datadog/browser-logs": "^5.23.3", "@dydxprotocol/v4-abacus": "1.13.39", "@dydxprotocol/v4-client-js": "1.15.1", - "@dydxprotocol/v4-localization": "^1.1.254", + "@dydxprotocol/v4-localization": "^1.1.257", "@dydxprotocol/v4-proto": "^7.0.0-dev.0", "@emotion/is-prop-valid": "^1.3.0", "@ethersproject/providers": "^5.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 68e584b0f..c540f961e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ dependencies: specifier: 1.15.1 version: 1.15.1 '@dydxprotocol/v4-localization': - specifier: ^1.1.254 - version: 1.1.254 + specifier: ^1.1.257 + version: 1.1.257 '@dydxprotocol/v4-proto': specifier: ^7.0.0-dev.0 version: 7.0.0-dev.0 @@ -2649,8 +2649,8 @@ packages: - fp-ts dev: false - /@chain-registry/types@0.50.31: - resolution: {integrity: sha512-WOVNfC0ss4+LsWDqoeBFxHuVHNasxuNvjMWYf8h1x2axUlMDgTLFubkTdW0Hj93uk1fOBTC07bJXCf915NMVnA==} + /@chain-registry/types@0.50.34: + resolution: {integrity: sha512-CMhHOOiICw/mHHJNqiqbwlwrAnexGsmVdtTv0IdV0NphxfkqzvUomiUpQsHnU0hjjLoFPxoe8atMNIMJs9v4vg==} dev: false /@coinbase/wallet-sdk@3.9.3: @@ -3347,8 +3347,8 @@ packages: - utf-8-validate dev: false - /@dydxprotocol/v4-localization@1.1.254: - resolution: {integrity: sha512-KlVn8L7YeSWJkTwF6SsYh8c11HWQyw7SqDxbsJsWchKtohT/4IaJje4TEhj/NZXlUULHKk9crCaa6ldrHpHFYg==} + /@dydxprotocol/v4-localization@1.1.257: + resolution: {integrity: sha512-1SacTF9qB/Af6ajUy3gSM3y2blbx+kza57Ag9/6LpwBIUGtfT3RK6flYG1rW+bjUQKg0uAbORM7n7/WWN3ak2g==} dev: false /@dydxprotocol/v4-proto@7.0.0-dev.0: @@ -8459,7 +8459,7 @@ packages: hermes-profile-transformer: 0.0.6 node-stream-zip: 1.15.0 ora: 5.4.1 - semver: 7.6.2 + semver: 7.6.3 strip-ansi: 5.2.0 wcwidth: 1.0.1 yaml: 2.4.5 @@ -8542,7 +8542,7 @@ packages: node-fetch: 2.7.0(encoding@0.1.13) open: 6.4.0 ora: 5.4.1 - semver: 7.6.2 + semver: 7.6.3 shell-quote: 1.8.1 sudo-prompt: 9.2.1 transitivePeerDependencies: @@ -8576,7 +8576,7 @@ packages: fs-extra: 8.1.0 graceful-fs: 4.2.11 prompts: 2.4.2 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - bufferutil - encoding @@ -9873,7 +9873,7 @@ packages: '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.93.2) '@solana/web3.js': 1.93.2 axios: 1.6.7 - chain-registry: 1.69.57 + chain-registry: 1.69.60 cosmjs-types: 0.8.0 keccak256: 1.0.6 kujira.js: 0.9.162 @@ -14546,10 +14546,10 @@ packages: type-detect: 4.1.0 dev: true - /chain-registry@1.69.57: - resolution: {integrity: sha512-i9QC8yRJjoYCxB4VsPXxa5TcVH2dctKxejIfOohPr78j3F+qZw5yob8XaKVG0/iK5s4tVZnhur5ssHuebZHuMw==} + /chain-registry@1.69.60: + resolution: {integrity: sha512-uh8b/RsxP9QfwxPKldcZronEnU/BRYNRxDcCCW4chyr3vxBbGoXkCk2PtK6JgPV53W4CukhcxNgawzhKO2YnEw==} dependencies: - '@chain-registry/types': 0.50.31 + '@chain-registry/types': 0.50.34 dev: false /chalk@2.4.2: @@ -20054,7 +20054,7 @@ packages: '@ethersproject/bignumber': 5.7.0 '@keplr-wallet/types': 0.11.64 '@types/google-protobuf': 3.15.12 - chain-registry: 1.69.57 + chain-registry: 1.69.60 cosmjs-types: 0.8.0 long: 4.0.0 text-encoding: 0.7.0 @@ -24454,7 +24454,6 @@ packages: resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true - dev: true /send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} diff --git a/src/abacus-ts/lib/createStoreEffect.ts b/src/abacus-ts/lib/createStoreEffect.ts index 8d4f66226..0857b36e3 100644 --- a/src/abacus-ts/lib/createStoreEffect.ts +++ b/src/abacus-ts/lib/createStoreEffect.ts @@ -10,7 +10,7 @@ export function createStoreEffect( let lastValue = selector(store.getState()); let lastCleanup = handleChange(lastValue); - return store.subscribe(() => { + const removeStoreListener = store.subscribe(() => { const thisValue = selector(store.getState()); if (thisValue !== lastValue) { lastCleanup?.(); @@ -18,4 +18,8 @@ export function createStoreEffect( lastCleanup = handleChange(thisValue); } }); + return () => { + lastCleanup?.(); + removeStoreListener(); + }; } diff --git a/src/abacus-ts/rest/blockTradingRewards.ts b/src/abacus-ts/rest/blockTradingRewards.ts index 0f80a3147..86b039759 100644 --- a/src/abacus-ts/rest/blockTradingRewards.ts +++ b/src/abacus-ts/rest/blockTradingRewards.ts @@ -37,6 +37,7 @@ export function setUpBlockTradingRewardsQuery(store: RootStore) { }) ); }, + onNoQuery: () => store.dispatch(setAccountBlockTradingRewardsRaw(loadableIdle())), }); return () => { diff --git a/src/abacus-ts/rest/fills.ts b/src/abacus-ts/rest/fills.ts index d4e401188..93214b8cb 100644 --- a/src/abacus-ts/rest/fills.ts +++ b/src/abacus-ts/rest/fills.ts @@ -31,6 +31,7 @@ export function setUpFillsQuery(store: RootStore) { }) ); }, + onNoQuery: () => store.dispatch(setAccountFillsRaw(loadableIdle())), }); return () => { cleanupListener(); diff --git a/src/abacus-ts/rest/lib/indexerQueryStoreEffect.ts b/src/abacus-ts/rest/lib/indexerQueryStoreEffect.ts index ed6e708d7..3d68fd562 100644 --- a/src/abacus-ts/rest/lib/indexerQueryStoreEffect.ts +++ b/src/abacus-ts/rest/lib/indexerQueryStoreEffect.ts @@ -28,6 +28,7 @@ type QuerySetupConfig = { getQueryKey: (selectorResult: NoInfer) => any[]; getQueryFn: (client: IndexerClient, selectorResult: NoInfer) => (() => Promise) | null; onResult: (result: NoInfer>) => void; + onNoQuery: () => void; } & PassedQueryOptions; const baseOptions: PassedQueryOptions = { @@ -61,6 +62,7 @@ export function createIndexerQueryStoreEffect( const queryFn = config.getQueryFn(indexerClient, queryData); if (!queryFn) { IndexerClientManager.markDone(indexerClientConfig); + config.onNoQuery(); return undefined; } diff --git a/src/abacus-ts/rest/orders.ts b/src/abacus-ts/rest/orders.ts index 4f5699c8e..1d0082aa0 100644 --- a/src/abacus-ts/rest/orders.ts +++ b/src/abacus-ts/rest/orders.ts @@ -46,6 +46,7 @@ export function setUpOrdersQuery(store: RootStore) { }) ); }, + onNoQuery: () => store.dispatch(setAccountOrdersRaw(loadableIdle())), }); return () => { cleanupListener(); diff --git a/src/abacus-ts/rest/transfers.ts b/src/abacus-ts/rest/transfers.ts index fa68dc553..ae5847c9a 100644 --- a/src/abacus-ts/rest/transfers.ts +++ b/src/abacus-ts/rest/transfers.ts @@ -35,6 +35,7 @@ export function setUpTransfersQuery(store: RootStore) { }) ); }, + onNoQuery: () => store.dispatch(setAccountTransfersRaw(loadableIdle())), }); return () => { diff --git a/src/abacus-ts/websocket/parentSubaccount.ts b/src/abacus-ts/websocket/parentSubaccount.ts index 3919a5a83..b753e3575 100644 --- a/src/abacus-ts/websocket/parentSubaccount.ts +++ b/src/abacus-ts/websocket/parentSubaccount.ts @@ -59,14 +59,14 @@ function freshChildSubaccount({ function accountWebsocketValue( websocket: IndexerWebsocket, address: string, - parentSubaccount: string, + parentSubaccountNumber: string, onChange: (val: Loadable) => void ) { return new WebsocketDerivedValue>( websocket, { channel: 'v4_parent_subaccounts', - id: `${address}/${parentSubaccount}`, + id: `${address}/${parentSubaccountNumber}`, handleBaseData: (baseMessage) => { const message = isWsParentSubaccountSubscribed(baseMessage); accountRefreshSignal.notify(); diff --git a/src/components/DetailsDialog.tsx b/src/components/DetailsDialog.tsx index 28fae925e..95da756e3 100644 --- a/src/components/DetailsDialog.tsx +++ b/src/components/DetailsDialog.tsx @@ -36,8 +36,6 @@ export const DetailsDialog = ({ slotIcon, title, items, slotFooter, setIsOpen }: }; const $Content = styled.div` ${layoutMixins.expandingColumnWithStickyFooter} - --stickyFooterBackdrop-outsetX: var(--dialog-paddingX); - --stickyFooterBackdrop-outsetY: var(--dialog-content-paddingBottom); gap: 1rem; `; const $Footer = styled.footer` diff --git a/src/components/Dialog.tsx b/src/components/Dialog.tsx index 61f845b3c..d9d434f71 100644 --- a/src/components/Dialog.tsx +++ b/src/components/Dialog.tsx @@ -412,6 +412,7 @@ const $Header = styled.header<{ $withBorder: boolean; $withBlur: boolean }>` --stickyArea-backdropFilter: none; `}; `; + const $StackedHeaderTopRow = styled.div<{ $withBorder: boolean; $withBlur: boolean }>` ${layoutMixins.flexColumn} align-items: center; @@ -452,6 +453,7 @@ const $Content = styled.div` isolation: isolate; `; + const $Close = styled(Close)<{ $absolute?: boolean }>` width: 0.7813rem; height: 0.7813rem; @@ -509,8 +511,6 @@ const $Description = tw(Description)`mt-0.5 text-color-text-0 font-base-book`; const $Footer = styled.footer<{ $withBorder: boolean }>` display: grid; ${layoutMixins.stickyFooter} - ${layoutMixins.withStickyFooterBackdrop} - --stickyFooterBackdrop-outsetX: var(--dialog-paddingX); ${({ $withBorder }) => $withBorder && diff --git a/src/components/DropdownHeaderMenu.tsx b/src/components/DropdownHeaderMenu.tsx index 0fff8e2a0..35db80ffa 100644 --- a/src/components/DropdownHeaderMenu.tsx +++ b/src/components/DropdownHeaderMenu.tsx @@ -65,7 +65,6 @@ export const DropdownHeaderMenu = ({ }; const $Trigger = styled(Trigger)` ${popoverMixins.trigger} - ${popoverMixins.backdropOverlay} --trigger-padding: 0.33rem 0.5rem; --trigger-textColor: var(--color-text-2); diff --git a/src/components/DropdownMenu.tsx b/src/components/DropdownMenu.tsx index 569ecff0c..95be280e0 100644 --- a/src/components/DropdownMenu.tsx +++ b/src/components/DropdownMenu.tsx @@ -124,7 +124,6 @@ const $Item = styled(Item)<{ $highlightColor?: 'accent' | 'create' | 'destroy' } const $Trigger = styled(Trigger)` ${popoverMixins.trigger} - ${popoverMixins.backdropOverlay} `; const $DropdownIcon = styled.span` diff --git a/src/components/DropdownSelectMenu.tsx b/src/components/DropdownSelectMenu.tsx index 0e87a6876..337117747 100644 --- a/src/components/DropdownSelectMenu.tsx +++ b/src/components/DropdownSelectMenu.tsx @@ -126,7 +126,6 @@ const $Trigger = styled(Trigger)` gap: 1rem; ${popoverMixins.trigger} - ${popoverMixins.backdropOverlay} `; const $DropdownIcon = styled.span` diff --git a/src/components/NavigationMenu.tsx b/src/components/NavigationMenu.tsx index adccd8f3e..b23912bc4 100644 --- a/src/components/NavigationMenu.tsx +++ b/src/components/NavigationMenu.tsx @@ -285,7 +285,6 @@ const $Viewport = styled(Viewport)` &[data-orientation='vertical'] { left: 100%; - /* top: 100%; */ } `; @@ -312,11 +311,6 @@ const $Content = styled(Content)` max-height: 100vh; ${$List}[data-orientation="horizontal"] & { - /* position: absolute; - top: calc(100% + var(--submenu-side-offset)); - left: 50%; - right: 50%; */ - position: relative; width: 0; left: 50%; diff --git a/src/components/Popover.tsx b/src/components/Popover.tsx index d54f6eed8..3e4a98d7b 100644 --- a/src/components/Popover.tsx +++ b/src/components/Popover.tsx @@ -82,7 +82,6 @@ export const Popover = ({ ); }; const $Trigger = styled(Trigger)<{ $noBlur?: boolean; $triggerType: TriggerType }>` - ${popoverMixins.backdropOverlay} ${popoverMixins.trigger} ${({ $triggerType }) => diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx index 73c3becaa..80fb2b9f6 100644 --- a/src/components/Tabs.tsx +++ b/src/components/Tabs.tsx @@ -321,14 +321,11 @@ const $Content = styled(Content)<{ $hide?: boolean; $withTransitions: boolean }> pointer-events: none; } - &[data-state='active'] { - z-index: var(--activeTab-zIndex); - } - ${({ $hide }) => $hide && css` display: none; + opacity: 0; `} @media (prefers-reduced-motion: no-preference) { @@ -340,7 +337,6 @@ const $Content = styled(Content)<{ $hide?: boolean; $withTransitions: boolean }> from { translate: 0 -0.25rem -1.5rem; opacity: 0; - /* filter: blur(3px); */ } `} 0.2s var(--ease-out-expo); } @@ -352,7 +348,6 @@ const $Content = styled(Content)<{ $hide?: boolean; $withTransitions: boolean }> to { translate: 0 -0.25rem -1.5rem; opacity: 0; - /* filter: blur(3px); */ } `} 0.2s var(--ease-out-expo); } @@ -366,6 +361,7 @@ const $DropdownTabTrigger = styled(Trigger)<{ ${tabMixins.tabTriggerStyle} height: 100%; width: 100%; + --trigger-hover-filter: none; ${({ $withUnderline }) => $withUnderline && diff --git a/src/components/Toast.tsx b/src/components/Toast.tsx index 748694105..ddf4d5ab9 100644 --- a/src/components/Toast.tsx +++ b/src/components/Toast.tsx @@ -138,23 +138,17 @@ const $Root = styled(Root)` animation: ${keyframes` from { - /* scale: 0; */ grid-template-rows: 0fr; // height transition - /* grid-template-rows: 0fr 0fr; // height transition */ - margin-top: calc(-1 * var(--toasts-gap)); } `} var(--toast-transition-duration) var(--ease-out-expo), ${keyframes` from { opacity: 0; - /* filter: blur(1px); */ } `} var(--toast-transition-duration) var(--ease-out-expo), ${keyframes` 33% { - /* scale: 1.05; */ - /* filter: brightness(120%); */ filter: drop-shadow(0 0 var(--color-text-0)); } `} calc(var(--toast-transition-duration) * 3) 0.1s; diff --git a/src/constants/tooltips/vault.ts b/src/constants/tooltips/vault.ts index b8023eb5d..238dbb946 100644 --- a/src/constants/tooltips/vault.ts +++ b/src/constants/tooltips/vault.ts @@ -16,7 +16,8 @@ export const vaultTooltips = { 'vault-all-time-pnl': ({ stringGetter }) => ({ body: stringGetter({ key: TOOLTIP_STRING_KEYS.YOUR_ALL_TIME_PNL_BODY }), }), - 'vault-apr': ({ stringGetter }) => ({ + 'vault-apr': ({ stringGetter, urlConfigs }) => ({ body: stringGetter({ key: TOOLTIP_STRING_KEYS.VAULT_APR_BODY }), + learnMoreLink: urlConfigs?.vaultLearnMore, }), } satisfies TooltipStrings; diff --git a/src/constants/wallets.ts b/src/constants/wallets.ts index 195af278e..bf9f406e6 100644 --- a/src/constants/wallets.ts +++ b/src/constants/wallets.ts @@ -186,7 +186,6 @@ export const KEPLR_MIPD_RDNS = 'app.keplr'; export const COINBASE_MIPD_RDNS = 'com.coinbase.wallet'; export const METAMASK_MIPD_RDNS = 'io.metamask'; -export const METAMASK_DOWNLOAD_LINK = 'https://metamask.io/download/'; export const PHANTOM_DOWNLOAD_LINK = 'https://phantom.app/download'; export const KEPLR_DOWNLOAD_LINK = 'https://www.keplr.app/get'; diff --git a/src/hooks/useDisplayedWallets.ts b/src/hooks/useDisplayedWallets.ts index 66ac6be19..c2ab76d63 100644 --- a/src/hooks/useDisplayedWallets.ts +++ b/src/hooks/useDisplayedWallets.ts @@ -8,7 +8,6 @@ import { ConnectorType, KEPLR_DOWNLOAD_LINK, KEPLR_MIPD_RDNS, - METAMASK_DOWNLOAD_LINK, METAMASK_MIPD_RDNS, OKX_MIPD_RDNS, PHANTOM_DOWNLOAD_LINK, @@ -46,12 +45,12 @@ export const useDisplayedWallets = (): WalletInfo[] => { (wallet) => wallet.detail.info.rdns === METAMASK_MIPD_RDNS ); - const enabledInjectedWallets = injectedWallets + const otherInjectedWallets = injectedWallets .filter( (wallet) => - // Remove Metamask. We will always show it at the first spot regardless of detection + // Remove Metamask. We will always show it at the first spot if it exists wallet.detail.info.rdns !== METAMASK_MIPD_RDNS && - // Remove Phantom EVM support, but enable Phantom Solana support based on EIP-6963 detection + // Remove Phantom EVM support wallet.detail.info.rdns !== PHANTOM_MIPD_RDNS && // Remove Keplr EVM support since Keplr Cosmos is supported wallet.detail.info.rdns !== KEPLR_MIPD_RDNS && @@ -61,14 +60,6 @@ export const useDisplayedWallets = (): WalletInfo[] => { ) .map(getWalletInfoFromInjectedWallet); - const metamaskWallet = injectedMetaMask - ? getWalletInfoFromInjectedWallet(injectedMetaMask) - : { - connectorType: ConnectorType.DownloadWallet, - name: WalletType.MetaMask, - downloadLink: METAMASK_DOWNLOAD_LINK, - }; - const phantomWallet = phantomDetected ? { connectorType: ConnectorType.PhantomSolana, @@ -92,15 +83,12 @@ export const useDisplayedWallets = (): WalletInfo[] => { }; return [ - // If the user does not have any injected wallets installed, show Metamask as the first option - // with a download link since it the recommended wallet - metamaskWallet, + // always show Metamask extension first if it is detected + injectedMetaMask && getWalletInfoFromInjectedWallet(injectedMetaMask), + ...otherInjectedWallets, phantomWallet, keplrEnabled && keplrWallet, { connectorType: ConnectorType.WalletConnect, name: WalletType.WalletConnect2 }, - - ...enabledInjectedWallets, - { connectorType: ConnectorType.Coinbase, name: WalletType.CoinbaseWallet }, Boolean(import.meta.env.VITE_PRIVY_APP_ID) && { connectorType: ConnectorType.Privy, diff --git a/src/layout/Footer/FooterDesktop.tsx b/src/layout/Footer/FooterDesktop.tsx index 981014246..125bf9d31 100644 --- a/src/layout/Footer/FooterDesktop.tsx +++ b/src/layout/Footer/FooterDesktop.tsx @@ -141,6 +141,7 @@ const $Footer = styled.footer` ${layoutMixins.stickyFooter} ${layoutMixins.spacedRow} grid-area: Footer; + background-color: var(--color-layer-2); `; const $Row = styled.div` diff --git a/src/layout/Footer/FooterMobile.tsx b/src/layout/Footer/FooterMobile.tsx index 9a86e7b43..d00d89132 100644 --- a/src/layout/Footer/FooterMobile.tsx +++ b/src/layout/Footer/FooterMobile.tsx @@ -107,6 +107,7 @@ export const FooterMobile = () => { }; const $MobileNav = styled.footer` grid-area: Footer; + background-color: var(--color-layer-2); ${layoutMixins.stickyFooter} `; @@ -161,8 +162,6 @@ const $NavigationMenu = styled(NavigationMenu)` top: 12.5%; bottom: 12.5%; right: 0; - - background: linear-gradient(to bottom, transparent, var(--border-color), transparent); } } } diff --git a/src/layout/Header/HeaderDesktop.tsx b/src/layout/Header/HeaderDesktop.tsx index 40bdb974d..b8ca7b5ba 100644 --- a/src/layout/Header/HeaderDesktop.tsx +++ b/src/layout/Header/HeaderDesktop.tsx @@ -239,7 +239,7 @@ const $Header = styled.header` ${layoutMixins.stickyHeader} ${layoutMixins.scrollSnapItem} backdrop-filter: none; - + background-color: var(--color-layer-2); height: var(--page-currentHeaderHeight); grid-area: Header; @@ -263,12 +263,6 @@ const $Header = styled.header` } font-size: 0.9375rem; - - &:before { - --backdrop-filter: blur(10px); - -webkit-backdrop-filter: var(--backdrop-filter); - backdrop-filter: var(--backdrop-filter); - } `; const $NavigationScrollBar = styled.div` diff --git a/src/pages/portfolio/EquityTiers.tsx b/src/pages/portfolio/EquityTiers.tsx index fef41f0c8..6ae28e663 100644 --- a/src/pages/portfolio/EquityTiers.tsx +++ b/src/pages/portfolio/EquityTiers.tsx @@ -98,18 +98,18 @@ export const EquityTiers = () => { } selectionBehavior="replace" paginationBehavior="showAll" - withOuterBorder={isNotTablet} + withOuterBorder withInnerBorders /> ); }; + const $Table = styled(Table)` --tableCell-padding: 0.5rem 1.5rem; --bordered-content-border-radius: 0.625rem; --table-cell-align: end; - font: var(--font-base-book); @media ${breakpoints.mobile} { @@ -118,11 +118,12 @@ const $Table = styled(Table)` } @media ${breakpoints.notTablet} { - --tableStickyRow-backgroundColor: var(--color-layer-1); + --tableStickyRow-backgroundColor: var(--color-layer-2); } ` as typeof Table; const $HighlightOutput = tw(Output)`text-color-text-1`; + const $Description = styled.div` color: var(--color-text-0); padding: 0 1rem; diff --git a/src/pages/portfolio/Fees.tsx b/src/pages/portfolio/Fees.tsx index 66734254c..44b11c775 100644 --- a/src/pages/portfolio/Fees.tsx +++ b/src/pages/portfolio/Fees.tsx @@ -240,7 +240,7 @@ export const Fees = () => { ).filter(isTruthy)} selectionBehavior="replace" paginationBehavior="showAll" - withOuterBorder={isNotTablet} + withOuterBorder withInnerBorders /> @@ -360,7 +360,7 @@ const $FeeTable = styled(Table)` } @media ${breakpoints.notTablet} { - --tableStickyRow-backgroundColor: var(--color-layer-1); + --tableStickyRow-backgroundColor: var(--color-layer-2); } ` as typeof Table; const $Highlighted = tw.strong`text-color-text-1`; diff --git a/src/pages/portfolio/Portfolio.tsx b/src/pages/portfolio/Portfolio.tsx index b95b00ece..8d7c13a32 100644 --- a/src/pages/portfolio/Portfolio.tsx +++ b/src/pages/portfolio/Portfolio.tsx @@ -123,7 +123,7 @@ const PortfolioPage = () => { } /> diff --git a/src/pages/trade/HorizontalPanel.tsx b/src/pages/trade/HorizontalPanel.tsx index 4741b679f..c70958236 100644 --- a/src/pages/trade/HorizontalPanel.tsx +++ b/src/pages/trade/HorizontalPanel.tsx @@ -2,6 +2,7 @@ import { useCallback, useMemo, useState } from 'react'; import { shallowEqual } from 'react-redux'; import { useNavigate } from 'react-router-dom'; +import styled from 'styled-components'; import { STRING_KEYS } from '@/constants/localization'; import { AppRoute } from '@/constants/routes'; @@ -294,7 +295,7 @@ export const HorizontalPanel = ({ isOpen = true, setIsOpen }: ElementProps) => { ) : ( <> - { ); }; + +const $CollapsibleTabs = styled(CollapsibleTabs)` + header { + background-color: var(--color-layer-2); + } + + --trigger-active-underline-backgroundColor: var(--color-layer-2); +` as typeof CollapsibleTabs; diff --git a/src/pages/trade/TradeDialogTrigger.tsx b/src/pages/trade/TradeDialogTrigger.tsx index f0a6c0808..7eb8d5cb1 100644 --- a/src/pages/trade/TradeDialogTrigger.tsx +++ b/src/pages/trade/TradeDialogTrigger.tsx @@ -68,6 +68,7 @@ export const TradeDialogTrigger = () => { }; const $TradeDialogTrigger = styled.div<{ hasSummary?: boolean }>` ${layoutMixins.stickyFooter} + background-color: var(--color-layer-2); ${layoutMixins.spacedRow} diff --git a/src/pages/trade/VerticalPanel.tsx b/src/pages/trade/VerticalPanel.tsx index 67bebf590..c50c5535b 100644 --- a/src/pages/trade/VerticalPanel.tsx +++ b/src/pages/trade/VerticalPanel.tsx @@ -1,5 +1,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'; +import styled from 'styled-components'; + import { TradeLayouts } from '@/constants/layout'; import { STRING_KEYS } from '@/constants/localization'; import { ORDERBOOK_HEADER_HEIGHT, ORDERBOOK_ROW_HEIGHT } from '@/constants/orderbook'; @@ -61,7 +63,7 @@ export const VerticalPanel = ({ tradeLayout }: { tradeLayout: TradeLayouts }) => }, [calculateNumRows, canvasOrderbook]); return ( - /> ); }; + +const $Tabs = styled(Tabs)` + --trigger-active-underline-backgroundColor: var(--color-layer-2); +` as typeof Tabs; diff --git a/src/pages/vaults/VaultDepositWithdrawForm.tsx b/src/pages/vaults/VaultDepositWithdrawForm.tsx index cc6477ec8..58d2b6a20 100644 --- a/src/pages/vaults/VaultDepositWithdrawForm.tsx +++ b/src/pages/vaults/VaultDepositWithdrawForm.tsx @@ -449,10 +449,10 @@ export const VaultDepositWithdrawForm = ({ const inputFormConfig = operation === 'DEPOSIT' ? { - formLabel: stringGetter({ key: STRING_KEYS.AMOUNT_TO_DEPOSIT }), + formLabel: stringGetter({ key: STRING_KEYS.AMOUNT_TO_ADD }), buttonLabel: confirmationStep - ? stringGetter({ key: STRING_KEYS.CONFIRM_DEPOSIT }) - : stringGetter({ key: STRING_KEYS.PREVIEW_DEPOSIT }), + ? stringGetter({ key: STRING_KEYS.CONFIRM }) + : stringGetter({ key: STRING_KEYS.REVIEW }), inputReceiptItems: [ { key: 'cross-free-collateral', @@ -481,15 +481,15 @@ export const VaultDepositWithdrawForm = ({ }, } : { - formLabel: stringGetter({ key: STRING_KEYS.AMOUNT_TO_WITHDRAW }), + formLabel: stringGetter({ key: STRING_KEYS.AMOUNT_TO_REMOVE }), buttonLabel: confirmationStep - ? stringGetter({ key: STRING_KEYS.CONFIRM_WITHDRAW }) - : stringGetter({ key: STRING_KEYS.PREVIEW_WITHDRAW }), + ? stringGetter({ key: STRING_KEYS.CONFIRM }) + : stringGetter({ key: STRING_KEYS.REVIEW }), inputReceiptItems: [ { key: 'vault-balance', tooltip: 'vault-available-to-withdraw', - label: stringGetter({ key: STRING_KEYS.AVAILABLE_TO_WITHDRAW }), + label: stringGetter({ key: STRING_KEYS.AVAILABLE_TO_REMOVE }), value: availableToWithdrawDiff, }, ] satisfies DetailsItem[], @@ -568,7 +568,7 @@ export const VaultDepositWithdrawForm = ({ $active={operation === 'DEPOSIT'} onClick={() => setOperation('DEPOSIT')} > - {stringGetter({ key: STRING_KEYS.DEPOSIT })} + {stringGetter({ key: STRING_KEYS.ADD_FUNDS })} <$TypeButton shape={ButtonShape.Rectangle} @@ -577,7 +577,7 @@ export const VaultDepositWithdrawForm = ({ $active={operation === 'WITHDRAW'} onClick={() => setOperation('WITHDRAW')} > - {stringGetter({ key: STRING_KEYS.WITHDRAW })} + {stringGetter({ key: STRING_KEYS.REMOVE_FUNDS })} diff --git a/src/pages/vaults/VaultLockedSharesTable.tsx b/src/pages/vaults/VaultLockedSharesTable.tsx index 66ce9dd18..6f052c908 100644 --- a/src/pages/vaults/VaultLockedSharesTable.tsx +++ b/src/pages/vaults/VaultLockedSharesTable.tsx @@ -38,7 +38,7 @@ export const VaultLockedSharesCard = ({ className }: { className?: string }) =>
-

Locked Balance

+

{stringGetter({ key: STRING_KEYS.LOCKED_BALANCE })}

diff --git a/src/pages/vaults/VaultPnlChart.tsx b/src/pages/vaults/VaultPnlChart.tsx index d760d7186..be28a1c73 100644 --- a/src/pages/vaults/VaultPnlChart.tsx +++ b/src/pages/vaults/VaultPnlChart.tsx @@ -189,7 +189,7 @@ export const VaultPnlChart = ({ className }: VaultPnlChartProps) => { size={ButtonSize.Small} items={[ { value: 'pnl', label: stringGetter({ key: STRING_KEYS.VAULT_PNL }) }, - { value: 'equity', label: stringGetter({ key: STRING_KEYS.VAULT_EQUITY }) }, + { value: 'equity', label: stringGetter({ key: STRING_KEYS.VAULT_TVL }) }, ]} value={selectedChart} onValueChange={setSelectedChart} diff --git a/src/pages/vaults/VaultTransactions.tsx b/src/pages/vaults/VaultTransactions.tsx index 393a9f6d1..5f5869d18 100644 --- a/src/pages/vaults/VaultTransactions.tsx +++ b/src/pages/vaults/VaultTransactions.tsx @@ -33,7 +33,7 @@ export const VaultTransactionsCard = ({ className }: { className?: string }) => <>

- {stringGetter({ key: STRING_KEYS.YOUR_DEPOSITS_AND_WITHDRAWALS })} + {stringGetter({ key: STRING_KEYS.YOUR_MEGAVAULT_HISTORY })} {transactions.length}

<$ShowHideHistoryButton @@ -53,13 +53,15 @@ export const VaultTransactionsCard = ({ className }: { className?: string }) =>
-
{stringGetter({ key: STRING_KEYS.YOU_HAVE_NO_VAULT_DEPOSITS })}
+
{stringGetter({ key: STRING_KEYS.YOU_HAVE_NO_VAULT_BALANCE })}
)}
); }; + const $ShowHideHistoryButton = styled(Button)``; + export const VaultTransactionsTable = ({ className, withOuterBorders, @@ -105,9 +107,9 @@ export const VaultTransactionsTable = ({ scrollSnapItem} `; -// Use with layoutMixins.stickyFooter -const withStickyFooterBackdrop = css` - /* Params */ - --stickyFooterBackdrop-outsetY: ; - --stickyFooterBackdrop-outsetX: ; - - /* Rules */ - backdrop-filter: none; - - &:before { - content: ''; - - z-index: -1; - position: absolute; - inset: calc(-1 * var(--stickyFooterBackdrop-outsetY, 0px)) - calc(-1 * var(--stickyFooterBackdrop-outsetX, 0px)); - - background: linear-gradient(transparent, var(--stickyArea-background)); - - pointer-events: none; - } -`; - export const layoutMixins = { // A standalone row row: css` @@ -869,8 +832,6 @@ export const layoutMixins = { scrollSnapItem, - withStickyFooterBackdrop, - withOuterBorder, // Show "borders" between and around grid/flex items using gap + box-shadow @@ -1004,7 +965,6 @@ export const layoutMixins = { > :last-child { ${() => stickyFooter} - ${() => withStickyFooterBackdrop} } `, diff --git a/src/views/AccountInfo/AccountInfoSection.tsx b/src/views/AccountInfo/AccountInfoSection.tsx index ac91fe97d..cf8962d3e 100644 --- a/src/views/AccountInfo/AccountInfoSection.tsx +++ b/src/views/AccountInfo/AccountInfoSection.tsx @@ -218,4 +218,8 @@ const $WithSeparators = styled(WithSeparators)` const $Button = styled(Button)` --button-padding: 0; + + &:hover { + text-decoration: underline; + } `; diff --git a/src/views/CanvasOrderbook/CanvasOrderbook.tsx b/src/views/CanvasOrderbook/CanvasOrderbook.tsx index 6f10bdd74..0abb469f3 100644 --- a/src/views/CanvasOrderbook/CanvasOrderbook.tsx +++ b/src/views/CanvasOrderbook/CanvasOrderbook.tsx @@ -36,6 +36,7 @@ import { OrderbookControls } from './OrderbookControls'; import { OrderbookMiddleRow, OrderbookRow } from './OrderbookRow'; type ElementProps = { + className?: string; rowsPerSide?: number; layout?: 'vertical' | 'horizontal'; }; @@ -48,6 +49,7 @@ type StyleProps = { export const CanvasOrderbook = forwardRef( ( { + className, histogramSide = 'right', hideHeader = false, layout = 'vertical', @@ -130,7 +132,7 @@ export const CanvasOrderbook = forwardRef( ); } }, - [currentInput, tickSizeDecimals] + [dispatch, currentInput, tickSizeDecimals] ); const displayUnit = useAppSelector(getSelectedDisplayUnit); @@ -201,7 +203,7 @@ export const CanvasOrderbook = forwardRef( ); return ( -
+
<$OrderbookContent $isLoading={!hasOrderbook}> {!hideHeader && } {!hideHeader && ( diff --git a/src/views/MarketsDropdown.tsx b/src/views/MarketsDropdown.tsx index 5b9a9b9ff..8de2416ae 100644 --- a/src/views/MarketsDropdown.tsx +++ b/src/views/MarketsDropdown.tsx @@ -1,7 +1,7 @@ import { Key, memo, useEffect, useMemo, useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; -import styled, { keyframes } from 'styled-components'; +import styled from 'styled-components'; import { Nullable } from '@/constants/abacus'; import { ButtonStyle } from '@/constants/buttons'; @@ -391,7 +391,7 @@ const $Popover = styled(Popover)` height: calc( 100vh - var(--page-header-height) - var(--market-info-row-height) - var(--page-footer-height) - var( - --restriction-warning-height + --restriction-warning-currentHeight ) ); @@ -402,25 +402,6 @@ const $Popover = styled(Popover)` box-shadow: 0 0 0 1px var(--color-border); border-radius: 0; - &[data-state='open'] { - animation: ${keyframes` - from { - opacity: 0; - scale: 0.9; - max-height: 0; - } - `} 0.2s var(--ease-out-expo); - } - - &[data-state='closed'] { - animation: ${keyframes` - to { - opacity: 0; - scale: 0.95; - max-height: 0; - } - `} 0.2s; - } &:focus-visible { outline: none; } @@ -487,6 +468,8 @@ const $Table = styled(Table)` thead { --stickyArea-totalInsetTop: 0px; --stickyArea-totalInsetBottom: 0px; + background-color: var(--color-layer-2); + tr { height: var(--stickyArea-topHeight); } @@ -495,6 +478,7 @@ const $Table = styled(Table)` tfoot { --stickyArea-totalInsetTop: 0px; --stickyArea-totalInsetBottom: 3px; + background-color: var(--color-layer-2); tr { height: var(--stickyArea-bottomHeight); diff --git a/src/views/charts/DepthChart/index.tsx b/src/views/charts/DepthChart/index.tsx index 9a205d885..86bb8151e 100644 --- a/src/views/charts/DepthChart/index.tsx +++ b/src/views/charts/DepthChart/index.tsx @@ -342,7 +342,7 @@ export const DepthChart = ({ )} showHorizontalCrosshair horizontalCrosshairStyle={{ strokeWidth: 1, strokeDasharray: '5 5', opacity: 0.7 }} - snapCrosshairToDatumY={!isEditingOrder} + snapCrosshairToDatumY={false} renderYAxisLabel={({ tooltipData }) => (isEditingOrder || tooltipData!.nearestDatum?.datum.depth) && ( <$YAxisLabelOutput @@ -392,6 +392,7 @@ export const DepthChart = ({ ); }; + const $Container = styled.div` width: 0; min-width: 100%; @@ -415,7 +416,6 @@ const $Container = styled.div` animation: ${keyframes` from { opacity: 0; - /* filter: blur(2px); */ } `} 0.1s var(--ease-out-expo); } @@ -424,12 +424,12 @@ const $Container = styled.div` animation: ${keyframes` to { opacity: 0; - /* filter: blur(2px); */ } `} 0.2s 0.3s var(--ease-out-expo) forwards; } } `; + const $YAxisLabelOutput = styled(AxisLabelOutput)` --axisLabel-offset: 0.5rem; diff --git a/src/views/charts/TradingView/BaseTvChart.tsx b/src/views/charts/TradingView/BaseTvChart.tsx index 3fd42df59..61f31d601 100644 --- a/src/views/charts/TradingView/BaseTvChart.tsx +++ b/src/views/charts/TradingView/BaseTvChart.tsx @@ -28,7 +28,6 @@ export const BaseTvChart = ({ tvWidget }: { tvWidget?: TvWidget | null }) => { const $PriceChart = styled.div<{ isChartReady?: boolean }>` ${layoutMixins.stack} user-select: none; - pointer-events: initial; // allow pointer events when dialog overlay is visible height: 100%; diff --git a/src/views/forms/AccountManagementForms/DepositForm.tsx b/src/views/forms/AccountManagementForms/DepositForm.tsx index 68b8cf9ea..c41db3bab 100644 --- a/src/views/forms/AccountManagementForms/DepositForm.tsx +++ b/src/views/forms/AccountManagementForms/DepositForm.tsx @@ -863,5 +863,4 @@ const $Form = styled.form` `; const $Footer = styled.footer` ${formMixins.footer} - --stickyFooterBackdrop-outsetY: var(--dialog-content-paddingBottom); `; diff --git a/src/views/forms/AccountManagementForms/TestnetDepositForm.tsx b/src/views/forms/AccountManagementForms/TestnetDepositForm.tsx index c5b1fa7aa..e1a275dac 100644 --- a/src/views/forms/AccountManagementForms/TestnetDepositForm.tsx +++ b/src/views/forms/AccountManagementForms/TestnetDepositForm.tsx @@ -101,7 +101,6 @@ const $Form = styled.form` const $Footer = styled.footer` ${formMixins.footer} - --stickyFooterBackdrop-outsetY: var(--dialog-content-paddingBottom); button { --button-width: 100%; diff --git a/src/views/forms/AccountManagementForms/WithdrawForm.tsx b/src/views/forms/AccountManagementForms/WithdrawForm.tsx index bfc8dd5e5..7b74851e8 100644 --- a/src/views/forms/AccountManagementForms/WithdrawForm.tsx +++ b/src/views/forms/AccountManagementForms/WithdrawForm.tsx @@ -683,5 +683,4 @@ const $Form = styled.form` const $Footer = styled.footer` ${formMixins.footer} - --stickyFooterBackdrop-outsetY: var(--dialog-content-paddingBottom); `; diff --git a/src/views/forms/NewMarketForm/index.tsx b/src/views/forms/NewMarketForm/index.tsx index a259fa3f7..a9c16443f 100644 --- a/src/views/forms/NewMarketForm/index.tsx +++ b/src/views/forms/NewMarketForm/index.tsx @@ -124,17 +124,17 @@ export const NewMarketForm = ({ const receiptItems: DetailsItem[] = useMemo(() => { return [ { - key: 'deposit-apr', - label: `${stringGetter({ key: STRING_KEYS.DEPOSIT_APR })} (30${stringGetter({ key: STRING_KEYS.DAYS_ABBREVIATED })})`, + key: 'est-apr', + label: `${stringGetter({ key: STRING_KEYS.EST_APR_PLAIN })} (30${stringGetter({ key: STRING_KEYS.DAYS_ABBREVIATED })})`, value: , }, { - key: 'deposit-lockup', - label: stringGetter({ key: STRING_KEYS.DEPOSIT_LOCKUP }), + key: 'lockup-period', + label: stringGetter({ key: STRING_KEYS.LOCKUP_PERIOD }), value: ( ), }, diff --git a/src/views/forms/NewMarketForm/v7/NewMarketPreviewStep.tsx b/src/views/forms/NewMarketForm/v7/NewMarketPreviewStep.tsx index 305d1a90b..e24591e11 100644 --- a/src/views/forms/NewMarketForm/v7/NewMarketPreviewStep.tsx +++ b/src/views/forms/NewMarketForm/v7/NewMarketPreviewStep.tsx @@ -347,7 +347,7 @@ export const NewMarketPreviewStep = ({ {stringGetter({ key: STRING_KEYS.MEGAVAULT_TERMS_TEXT, params: { - CONFIRM_BUTTON_TEXT: stringGetter({ key: STRING_KEYS.DEPOSIT_AND_LAUNCH }), + CONFIRM_BUTTON_TEXT: stringGetter({ key: STRING_KEYS.ADD_FUNDS_AND_LAUNCH }), LINK: ( {stringGetter({ key: STRING_KEYS.LAUNCH_MARKET_TERMS })} @@ -368,7 +368,7 @@ export const NewMarketPreviewStep = ({ action={ButtonAction.Primary} state={{ isDisabled: shouldDisableForm || !hasAcceptedTerms, isLoading }} > - {stringGetter({ key: STRING_KEYS.DEPOSIT_AND_LAUNCH })} + {stringGetter({ key: STRING_KEYS.ADD_FUNDS_AND_LAUNCH })}
diff --git a/src/views/forms/NewMarketForm/v7/NewMarketSelectionStep.tsx b/src/views/forms/NewMarketForm/v7/NewMarketSelectionStep.tsx index ce6a39c7a..760c54465 100644 --- a/src/views/forms/NewMarketForm/v7/NewMarketSelectionStep.tsx +++ b/src/views/forms/NewMarketForm/v7/NewMarketSelectionStep.tsx @@ -170,7 +170,7 @@ export const NewMarketSelectionStep = ({ diff --git a/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx b/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx index a97417bef..f76bffad9 100644 --- a/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx +++ b/src/views/forms/TradeForm/PlaceOrderButtonAndReceipt.tsx @@ -400,7 +400,6 @@ export const PlaceOrderButtonAndReceipt = ({ const $Footer = styled.footer` ${formMixins.footer} padding-bottom: var(--dialog-content-paddingBottom); - --stickyFooterBackdrop-outsetY: var(--dialog-content-paddingBottom); ${layoutMixins.column} `; diff --git a/src/views/forms/TransferForm.tsx b/src/views/forms/TransferForm.tsx index 789a5319a..fdcfefac2 100644 --- a/src/views/forms/TransferForm.tsx +++ b/src/views/forms/TransferForm.tsx @@ -474,7 +474,6 @@ const $Form = styled.form` const $Footer = styled.footer` ${formMixins.footer} - --stickyFooterBackdrop-outsetY: var(--dialog-content-paddingBottom); `; const $Row = styled.div` diff --git a/src/views/tables/OrderbookTradesTable.tsx b/src/views/tables/OrderbookTradesTable.tsx index da6dfb49f..3e92483b8 100644 --- a/src/views/tables/OrderbookTradesTable.tsx +++ b/src/views/tables/OrderbookTradesTable.tsx @@ -3,7 +3,7 @@ import styled, { css, keyframes } from 'styled-components'; import breakpoints from '@/styles/breakpoints'; import { Output } from '@/components/Output'; -import { Table, BaseTableRowData, AllTableProps } from '@/components/Table'; +import { AllTableProps, BaseTableRowData, Table } from '@/components/Table'; import { getSimpleStyledOutputType } from '@/lib/genericFunctionalComponentUtils'; @@ -53,6 +53,7 @@ const $OrderbookTradesTable = styled(Table)` thead { font: var(--font-mini-book); + background-color: var(--color-layer-2); } tbody tr {