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

Fix transaction preview layout in extension and loading text size #1937

Merged
merged 3 commits into from
May 15, 2024
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
1 change: 1 addition & 0 deletions .changelog/1937.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce loading text size
2 changes: 1 addition & 1 deletion src/app/components/Persist/PersistLoadingGate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function PersistLoadingGate(props: Props) {
<Layer modal background="background-front" responsive={false}>
<Box pad="medium" gap="medium" direction="row" align="center">
<Spinner size="medium" />
<Text size="large">{t('persist.loading', 'Loading')}</Text>
<Text size="medium">{t('persist.loading', 'Loading')}</Text>
</Box>
</Layer>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/TransactionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,19 @@ export function TransactionModal() {
{step === TransactionStep.Building && (
<Box direction="row" align="center" gap="medium">
<Spinner size="medium" />
<Text size="large">{t('transaction.step.building', 'Building transaction')}</Text>
<Text size="medium">{t('transaction.step.building', 'Building transaction')}</Text>
</Box>
)}
{step === TransactionStep.Signing && (
<Box direction="row" align="center" gap="medium">
<Spinner size="medium" />
<Text size="large">{t('transaction.step.signing', 'Signing transaction')}</Text>
<Text size="medium">{t('transaction.step.signing', 'Signing transaction')}</Text>
</Box>
)}
{step === TransactionStep.Submitting && (
<Box direction="row" align="center" gap="medium">
<Spinner size="medium" />
<Text size="large">{t('transaction.step.submitting', 'Submitting transaction')}</Text>
<Text size="medium">{t('transaction.step.submitting', 'Submitting transaction')}</Text>
</Box>
)}
</Box>
Expand Down
7 changes: 3 additions & 4 deletions src/app/components/TransactionTypeFormatter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { NewTransactionType } from 'app/state/transaction/types'
import React, { memo } from 'react'
import { useTranslation } from 'react-i18next'
import { Box } from 'grommet/es6/components/Box'
import { Text } from 'grommet/es6/components/Text'

interface Props {
Expand All @@ -20,13 +19,13 @@ export const TransactionTypeFormatter = memo((props: Props) => {

const typeMessage = typeMap[type]
return (
<Box direction="row" align="center" gap="xsmall">
<span>
<Text color="grayMedium" size="small" style={{ textTransform: 'capitalize', fontWeight: 600 }}>
{type}
</Text>
<Text color="grayMedium" size="xsmall" style={{ letterSpacing: 0 }}>
({typeMessage})
&nbsp;({typeMessage})
</Text>
</Box>
</span>
)
})
4 changes: 2 additions & 2 deletions src/app/pages/AccountPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export function AccountPage(props: AccountPageProps) {
{active && <TransactionModal />}
{(stake.loading || account.loading) && (
<Layer modal background="background-front" responsive={false}>
<Box pad="medium" gap="medium" direction="row" align="center">
<Box pad="medium" gap="medium" direction="row" align="center" width="max-content">
<Spinner size="medium" />
<Text size="large">{t('account.loading', 'Loading account')}</Text>
<Text size="medium">{t('account.loading', 'Loading account')}</Text>
</Box>
</Layer>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function ImportAccountsSelectionModal(props: ImportAccountsSelectionModal
<Box direction="row" gap="medium" alignContent="center" pad={{ top: 'small' }}>
<Spinner size="medium" />
<Box alignSelf="center">
<Text size="xlarge">
<Text size="medium">
<ImportAccountsStepFormatter step={importAccounts.step} />
</Text>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/ParaTimesPage/ParaTimeFormFooter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ParaTimeFormFooter = ({
label={secondaryLabel || t('paraTimes.footer.back', 'Back')}
onClick={secondaryAction}
plain
style={{ textAlign: 'center', fontSize: '14px', textDecoration: 'underline', color: 'brand' }}
style={{ textAlign: 'center', fontSize: '14px', textDecoration: 'underline' }}
/>
)}
</Box>
Expand Down
Loading