Skip to content

Commit 58ed5ae

Browse files
authored
Merge pull request #2206 from oasisprotocol/mz/migrationCleanUp
Clean up minor issues introduced during the migration
2 parents 2d10f47 + 813c50e commit 58ed5ae

File tree

7 files changed

+17
-109
lines changed

7 files changed

+17
-109
lines changed

.changelog/2206.trivial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clean up minor issues introduced during the migration

src/app/components/LayerPicker/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { FC, useState } from 'react'
22
import { useTranslation } from 'react-i18next'
3-
import { Drawer, DrawerContent } from '@oasisprotocol/ui-library/src/components/ui/drawer'
3+
import {
4+
Drawer,
5+
DrawerContent,
6+
DrawerTitle,
7+
DrawerDescription,
8+
} from '@oasisprotocol/ui-library/src/components/ui/drawer'
49
import { Separator } from '@oasisprotocol/ui-library/src/components/ui/separator'
510
import { HomePageLink } from '../PageLayout/Logotype'
611
import { Network } from '../../../types/network'
@@ -62,7 +67,10 @@ const LayerPickerContent: FC<LayerPickerContentProps> = ({ isOutOfDate, onClose,
6267
return (
6368
<div className="flex flex-col w-full flex-1 lg:block lg:w-auto lg:flex-none">
6469
<div className="relative mb-0 lg:mb-2 lg:mb-10">
65-
<HomePageLink color="#0500e2" showText={!isMobile} />
70+
<DrawerTitle>
71+
<HomePageLink showText={!isMobile} />
72+
</DrawerTitle>
73+
<DrawerDescription className="sr-only">{t('layerPicker.description')}</DrawerDescription>
6674
</div>
6775
{isTablet && (
6876
<div className="flex justify-between items-center min-h-12">

src/app/components/PageLayout/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const Header: FC = () => {
3939
<div className="px-4">
4040
<div className="grid grid-cols-12 pt-3 pb-4 px-0 md:px-[4%]">
4141
<div className="col-span-6 xl:col-span-3 flex items-center">
42-
<HomePageLink showText={!scrollTrigger && !isMobile} color="#0500e2" />
42+
<HomePageLink showText={!scrollTrigger && !isMobile} />
4343
</div>
4444

4545
{withScopeSelector && (

src/app/components/PageLayout/Logotype.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@ import { OasisIcon } from '../CustomIcons/OasisIcon'
66
import { ExplorerIcon } from '../CustomIcons/ExplorerIcon'
77

88
interface LogotypeProps {
9-
color?: string
109
showText: boolean
1110
}
1211

13-
export const HomePageLink: FC<LogotypeProps> = ({ color, showText }) => {
12+
export const HomePageLink: FC<LogotypeProps> = ({ showText }) => {
1413
const { t } = useTranslation()
1514

1615
return (
1716
<RouterLink to="/" aria-label={t('home.link')}>
18-
<Logotype color={color} showText={showText} />
17+
<Logotype showText={showText} />
1918
</RouterLink>
2019
)
2120
}
2221

23-
export const Logotype: FC<LogotypeProps> = ({ color, showText }) => {
22+
export const Logotype: FC<LogotypeProps> = ({ showText }) => {
2423
const { isMobile } = useScreenSize()
2524
const oasisLogoSize = isMobile ? 32 : 40
2625
const logoSize = !showText ? { height: oasisLogoSize, width: oasisLogoSize } : { height: 40, width: 214 }

src/app/pages/HomePage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export const HomePage: FC = () => {
150150
<HomepageLayout>
151151
<Content>
152152
<LogotypeBox>
153-
<Logotype showText color="#0500e2" />
153+
<Logotype showText />
154154
</LogotypeBox>
155155
<SearchInputContainer transparent={isGraphZoomedIn && !searchHasFocus}>
156156
<SearchInputBox>

src/locales/en/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@
642642
"comingSoonTitle": "Coming soon",
643643
"comingSoonLabel": "(coming soon)",
644644
"consensus": "The consensus layer is a scalable, high-throughput, secure, proof-of-stake consensus run by a decentralized set of validator nodes.",
645+
"description": "Select the network and layer you want to explore.",
645646
"goToDashboard": "Go to dashboard",
646647
"hex": "Hex: {{ id }}",
647648
"hostedOn": "Hosted on {{ network }}",

src/styles/theme/defaultTheme.ts

Lines changed: 0 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Fade from '@mui/material/Fade'
44
import { outlinedInputClasses } from '@mui/material/OutlinedInput'
55
import { inputBaseClasses } from '@mui/material/InputBase'
66
import { inputAdornmentClasses } from '@mui/material/InputAdornment'
7-
import { tabClasses } from '@mui/material/Tab'
87

98
declare module '@mui/material/styles' {
109
interface Palette {
@@ -149,13 +148,6 @@ export const defaultTheme = createTheme({
149148
},
150149
},
151150
components: {
152-
MuiBackdrop: {
153-
styleOverrides: {
154-
root: {
155-
backgroundColor: 'rgba(0, 0, 0, 0.9)',
156-
},
157-
},
158-
},
159151
MuiButton: {
160152
defaultProps: {
161153
disableElevation: true,
@@ -537,92 +529,6 @@ export const defaultTheme = createTheme({
537529
},
538530
],
539531
},
540-
MuiPagination: {
541-
variants: [
542-
{
543-
props: { showFirstButton: true, showLastButton: true },
544-
style: {
545-
// Swap First and Previous page buttons
546-
'li:nth-of-type(2)': {
547-
order: -1,
548-
},
549-
// Swap Last and Next page buttons
550-
'li:nth-last-of-type(2)': {
551-
order: 1,
552-
},
553-
},
554-
},
555-
],
556-
},
557-
MuiPaginationItem: {
558-
variants: [
559-
{
560-
props: { selected: false },
561-
style: {
562-
color: COLORS.brandExtraDark,
563-
},
564-
},
565-
{
566-
props: { selected: true },
567-
style: {
568-
backgroundColor: 'unset !important',
569-
color: COLORS.disabledPagination,
570-
},
571-
},
572-
{
573-
props: { type: 'page' },
574-
style: {
575-
minWidth: 0,
576-
},
577-
},
578-
],
579-
},
580-
MuiTabs: {
581-
styleOverrides: {
582-
root: ({ theme }) => ({
583-
// neglect the default border radius of sibling element (Card component in most cases)
584-
'&& + *': {
585-
borderTopLeftRadius: 0,
586-
[theme.breakpoints.down('sm')]: {
587-
borderTopRightRadius: 0,
588-
},
589-
},
590-
}),
591-
indicator: {
592-
display: 'none',
593-
},
594-
},
595-
},
596-
MuiTab: {
597-
styleOverrides: {
598-
root: ({ theme }) => ({
599-
'&:hover, &:focus-visible': {
600-
color: COLORS.brandExtraDark,
601-
backgroundColor: COLORS.grayLight,
602-
},
603-
[`&.${tabClasses.selected}`]: {
604-
color: COLORS.brandExtraDark,
605-
backgroundColor: COLORS.white,
606-
},
607-
fontSize: '14px',
608-
fontWeight: 700,
609-
color: COLORS.brandDark,
610-
backgroundColor: COLORS.grayLight,
611-
border: `1px solid ${COLORS.grayLight}`,
612-
borderBottom: 'none',
613-
marginRight: theme.spacing(2),
614-
borderTopLeftRadius: 12,
615-
borderTopRightRadius: 12,
616-
textTransform: 'capitalize',
617-
[theme.breakpoints.down('sm')]: {
618-
padding: theme.spacing(3, 4),
619-
},
620-
[theme.breakpoints.up('sm')]: {
621-
padding: theme.spacing(4, 5),
622-
},
623-
}),
624-
},
625-
},
626532
MuiMobileStepper: {
627533
styleOverrides: {
628534
root: {
@@ -642,12 +548,5 @@ export const defaultTheme = createTheme({
642548
}),
643549
},
644550
},
645-
MuiList: {
646-
styleOverrides: {
647-
padding: {
648-
paddingTop: 0,
649-
},
650-
},
651-
},
652551
},
653552
})

0 commit comments

Comments
 (0)