From 76d242cabf0d5fa1216e397d21bbabb2550930e3 Mon Sep 17 00:00:00 2001 From: Kristof Csillag Date: Thu, 29 Feb 2024 02:48:14 +0100 Subject: [PATCH] Use h2 insteaf of h3 in some places (But since h2 and h3 look the same, this doesn't change the UI) --- .changelog/1308.trivial.md | 1 + src/app/components/Snapshots/Snapshot.tsx | 2 +- src/app/components/SubPageCard/index.tsx | 10 ++++++---- .../pages/AccountDetailsPage/AccountDetailsCard.tsx | 1 + .../ConsensusAccountDetailsCard.tsx | 2 +- src/app/pages/ConsensusAccountsPage/index.tsx | 1 + src/app/pages/ConsensusBlocksPage/index.tsx | 1 + src/app/pages/ConsensusTransactionsPage/index.tsx | 1 + src/app/pages/ProposalDetailsPage/index.tsx | 2 +- src/app/pages/ProposalsPage/index.tsx | 1 + src/app/pages/RuntimeBlockDetailPage/index.tsx | 2 +- src/app/pages/RuntimeBlocksPage/index.tsx | 1 + src/app/pages/RuntimeTransactionDetailPage/index.tsx | 1 + src/app/pages/RuntimeTransactionsPage/index.tsx | 1 + src/app/pages/TokensOverviewPage/index.tsx | 1 + src/app/pages/ValidatorsPage/index.tsx | 1 + src/styles/theme/defaultTheme.ts | 4 ++-- 17 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 .changelog/1308.trivial.md diff --git a/.changelog/1308.trivial.md b/.changelog/1308.trivial.md new file mode 100644 index 000000000..274fe0f8a --- /dev/null +++ b/.changelog/1308.trivial.md @@ -0,0 +1 @@ +Adjust title levels: use h2 for main title on each page diff --git a/src/app/components/Snapshots/Snapshot.tsx b/src/app/components/Snapshots/Snapshot.tsx index 34d31b387..b65a833f2 100644 --- a/src/app/components/Snapshots/Snapshot.tsx +++ b/src/app/components/Snapshots/Snapshot.tsx @@ -26,7 +26,7 @@ export const Snapshot: FC = ({ children, header, scope, title }) {title} diff --git a/src/app/components/SubPageCard/index.tsx b/src/app/components/SubPageCard/index.tsx index d0e6b59dd..2d3b27328 100644 --- a/src/app/components/SubPageCard/index.tsx +++ b/src/app/components/SubPageCard/index.tsx @@ -15,6 +15,7 @@ type StyledComponentProps = { subheader?: string action?: ReactNode noPadding?: boolean + mainTitle?: boolean } type SubPageCardProps = PropsWithChildren @@ -69,6 +70,7 @@ export const SubPageCard: FC = ({ subheader, action, noPadding = false, + mainTitle = false, }) => { const theme = useTheme() const { isMobile } = useScreenSize() @@ -78,8 +80,8 @@ export const SubPageCard: FC = ({ {isMobile && (title || subheader || action) && ( @@ -102,8 +104,8 @@ export const SubPageCard: FC = ({ title={isLoadingTitle ? : title} titleTypographyProps={{ display: 'inline', - component: 'h3', - variant: 'h3', + component: mainTitle ? 'h2' : 'h3', + variant: mainTitle ? 'h2' : 'h3', }} subheader={subheader} subheaderTypographyProps={{ diff --git a/src/app/pages/AccountDetailsPage/AccountDetailsCard.tsx b/src/app/pages/AccountDetailsPage/AccountDetailsCard.tsx index 23bfe2975..18c57866d 100644 --- a/src/app/pages/AccountDetailsPage/AccountDetailsCard.tsx +++ b/src/app/pages/AccountDetailsPage/AccountDetailsCard.tsx @@ -28,6 +28,7 @@ export const AccountDetailsCard: FC = ({ featured isLoadingTitle={isLoading} title={isContract ? t('contract.title') : t('account.title')} + mainTitle > = const { t } = useTranslation() return ( - + ) diff --git a/src/app/pages/ConsensusAccountsPage/index.tsx b/src/app/pages/ConsensusAccountsPage/index.tsx index 7ea6ead67..5df98c75c 100644 --- a/src/app/pages/ConsensusAccountsPage/index.tsx +++ b/src/app/pages/ConsensusAccountsPage/index.tsx @@ -57,6 +57,7 @@ export const ConsensusAccountsPage: FC = () => { isTotalCountClipped={accountsData?.is_total_count_clipped} /> } + mainTitle action={isMobile && } noPadding={tableView === TableLayout.Vertical} > diff --git a/src/app/pages/ConsensusBlocksPage/index.tsx b/src/app/pages/ConsensusBlocksPage/index.tsx index ed359f474..701639336 100644 --- a/src/app/pages/ConsensusBlocksPage/index.tsx +++ b/src/app/pages/ConsensusBlocksPage/index.tsx @@ -90,6 +90,7 @@ export const ConsensusBlocksPage: FC = () => { title={t('blocks.title')} action={isMobile && } noPadding={tableView === TableLayout.Vertical} + mainTitle > {tableView === TableLayout.Horizontal && ( { title={t('transactions.latest')} action={isMobile && } noPadding={tableView === TableLayout.Vertical} + mainTitle > {tableView === TableLayout.Horizontal && ( { const proposal = data?.data! return ( - + diff --git a/src/app/pages/ProposalsPage/index.tsx b/src/app/pages/ProposalsPage/index.tsx index d6bdf8c42..8dca90fb3 100644 --- a/src/app/pages/ProposalsPage/index.tsx +++ b/src/app/pages/ProposalsPage/index.tsx @@ -60,6 +60,7 @@ export const ProposalsPage: FC = () => { } action={isMobile && } noPadding={tableView === TableLayout.Vertical} + mainTitle > {tableView === TableLayout.Horizontal && ( { return ( - + {!!block?.num_transactions && } diff --git a/src/app/pages/RuntimeBlocksPage/index.tsx b/src/app/pages/RuntimeBlocksPage/index.tsx index 0fccedb74..efcdca2a5 100644 --- a/src/app/pages/RuntimeBlocksPage/index.tsx +++ b/src/app/pages/RuntimeBlocksPage/index.tsx @@ -87,6 +87,7 @@ export const RuntimeBlocksPage: FC = () => { title={t('blocks.latest')} action={isMobile && } noPadding={tableView === TableLayout.Vertical} + mainTitle > {tableView === TableLayout.Horizontal && ( { onSelectionChange={addressSwitch => setAddressSwitchOption(addressSwitch)} /> } + mainTitle > { title={t('transactions.latest')} action={isMobile && } noPadding={tableView === TableLayout.Vertical} + mainTitle > {tableView === TableLayout.Horizontal && ( { title={t('common.tokens')} action={isMobile && } noPadding={tableView === TableLayout.Vertical} + mainTitle > {tableView === TableLayout.Horizontal && ( { } action={isMobile && } noPadding={tableView === TableLayout.Vertical} + mainTitle > {tableView === TableLayout.Horizontal && (