diff --git a/src/app/features/container/container.tsx b/src/app/features/container/container.tsx index 7723a160787..5470c7649e9 100644 --- a/src/app/features/container/container.tsx +++ b/src/app/features/container/container.tsx @@ -66,10 +66,9 @@ export function Container() { ); }; - // > scroll behaviour - // dialog titles - // signout dialog bottom padding - // mnemonic key login styling + // > scroll behaviour - test more + // signout dialog bottom radius + // > settings fix menu - dialogs // - need to show Settings menu on unlock screen // > fix hacky code around showing logo or not - get rid of placeholder etc @@ -106,17 +105,10 @@ export function Container() { return ( <> - {/* #4370 SMELL - - without this check for isShowingSwitchAccount the wallet crashes on new install - - Wallet is neither of type `ledger` nor `software` - Moved here from SwitchAccountDialog but should be improved - */} - {isShowingSwitchAccount && ( - setIsShowingSwitchAccount(false)} - /> - )} + setIsShowingSwitchAccount(false)} + /> {/* TODO #4310 Toast */} { const { whenWallet } = useWalletType(); + // TODO 4370 task #1 - test LEDGER DIALOGS return ( 6 ? 'scroll' : 'hidden', + // PETE check this with new structure on Ledger // fill space on ledger as no create account button maxHeight: whenWallet({ ledger: '100vh', software: '' }), }} > ( diff --git a/src/app/features/dialogs/switch-account-dialog/switch-account-dialog.tsx b/src/app/features/dialogs/switch-account-dialog/switch-account-dialog.tsx index 381899d0efc..541bc6e0a6b 100644 --- a/src/app/features/dialogs/switch-account-dialog/switch-account-dialog.tsx +++ b/src/app/features/dialogs/switch-account-dialog/switch-account-dialog.tsx @@ -32,9 +32,12 @@ export const SwitchAccountDialog = memo(({ isShowing, onClose }: SwitchAccountDi onClose(); }; - if (stacksAddressesNum === 0 && btcAddressesNum === 0) { + if (isShowing && stacksAddressesNum === 0 && btcAddressesNum === 0) { return ; } + // #4370 SMELL without this early return the wallet crashes on new install with: Wallet is neither of type `ledger` nor `software` + // test this more as it could be OK to remove. + if (!isShowing) return null; return ( { return ( {whenWallet({ software: , ledger: <> })} + {/* TODO test this virtuoso */} { if (stacksAddressesNum === 0 && btcAddressesNum === 0) return null; - // TODO 4370 task #3 virtuoso boxes - test UI of this and other virtuoso lists and maybe change to share more code? return ( 7 ? 'scroll' : 'hidden', maxHeight: '100vh', }} > ( - - {/* TODO check if this box is even needed now - - Probably is needed for account selector - */} - {/* */} - {/* PETE check this for onboarding as the header spacing should be space.04 and not space.05 */} - {/* {header ? ( + {/* PETE check this for onboarding as the header spacing should be space.04 and not space.05 */} + {/* {header ? ( header ) : ( */} - {title && ( -
: title} - /> - )} + {title && ( +
: title} + /> + )} - {/* TODO - test this cross browser and remove if repaced by global.ts + {/* TODO - test this cross browser and remove if repaced by global.ts Probably is needed for account selector */} - - {children} - - {footer} + + {children} + {footer} diff --git a/src/app/ui/shared/styles/virtuoso-styles.ts b/src/app/ui/shared/styles/virtuoso-styles.ts deleted file mode 100644 index ace2dff65a4..00000000000 --- a/src/app/ui/shared/styles/virtuoso-styles.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { css } from 'leather-styles/css'; - -export const virtuosoContainerStyle = css.raw({ - '&::-webkit-scrollbar': { - display: 'none', - }, - maxHeight: { base: '75vh', md: '100%' }, -}); - -export const virtuosoStyle = css.raw({ - paddingTop: '24px', - minHeight: { base: '85vh', md: '70vh' }, -}); diff --git a/theme/tokens.ts b/theme/tokens.ts index 7e2a41cb353..ca240656c8e 100644 --- a/theme/tokens.ts +++ b/theme/tokens.ts @@ -12,6 +12,7 @@ export const tokens = defineTokens({ twoColumnPageWidth: { value: '500px' }, fullPageMaxWidth: { value: '882px' }, dialogHeight: { value: '600px' }, + dialogContentHeight: { value: '500px' }, headerHeight: { value: '80px' }, footerHeight: { value: '95px' }, // #4250 setting consistent dimensions of extension + popup to match mobile