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

Feat/page header footer design #982

Merged
merged 32 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3c90285
added test cases for themeswitcher
sk-enya Jun 16, 2023
632e001
test cases for menu list
sk-enya Jun 16, 2023
8750946
updated test cases for layout header page
sk-enya Jun 16, 2023
4a0d374
footer implemenation
sk-enya Jun 17, 2023
85565fa
Implementation of footer design
sk-enya Jun 18, 2023
24b976d
design fixes of footer on light mode
sk-enya Jun 19, 2023
bed67e0
added stories for footer
sk-enya Jun 19, 2023
7220e18
added font's for roboto and monteserrat
sk-enya Jun 21, 2023
a2c5c3b
fix storybook to render font's correctly
sk-enya Jun 21, 2023
1e7f172
fix for connect button
sk-enya Jun 28, 2023
71ff7f7
partial changes
sk-enya Jun 29, 2023
939d229
change:
sk-enya Jul 2, 2023
0a91a24
- created hook for useOnboard & useWalletConnect
sk-enya Jul 2, 2023
8ab5268
added fee switcher
sk-enya Jul 2, 2023
374077a
added fee switcher to header component
sk-enya Jul 3, 2023
d80f8f8
gaswatcher to be migrated to typescript
sk-enya Jul 5, 2023
3631390
fix for select dropdown & gasWatcher component
sk-enya Jul 5, 2023
e7d18f6
fix for select styles
sk-enya Jul 5, 2023
c42a566
Merge branch 'develop' of github.com-enya:bobanetwork/boba into feat/…
sk-enya Jul 5, 2023
e7c3554
fix for storybook breaking & gas undefined error
sk-enya Jul 5, 2023
31d47bd
fix for gas
sk-enya Jul 5, 2023
fd4a741
Fix connect button after close connect modal
Alvarriti Jul 6, 2023
e318bc0
Merge branch 'feat/page-header-footer-design' of https://github.com/b…
Alvarriti Jul 6, 2023
9fef327
Merge branch 'develop' into feat/page-header-footer-design
sk-enya Jul 7, 2023
d25254d
removed font files, loaded from google, updated comment
sk-enya Jul 7, 2023
e2b0348
change:
sk-enya Jul 7, 2023
23e3aba
reverted the index.scss & index.js
sk-enya Jul 7, 2023
7224684
added types for custom files
sk-enya Jul 7, 2023
f8062a6
updated test snapshots
sk-enya Jul 7, 2023
40ed9fc
test fixes gateway
sk-enya Jul 7, 2023
d91a88b
Merge branch 'develop' into feat/page-header-footer-design
sk-enya Jul 7, 2023
4824fd8
Merge branch 'develop' into feat/page-header-footer-design
sk-enya Jul 7, 2023
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
9 changes: 9 additions & 0 deletions packages/boba/gateway/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const storybookConfig: StorybookConfig = {
features: {
storyStoreV7: true,
},
staticDirs: ['../src/assets'],
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
Expand All @@ -13,6 +14,14 @@ const storybookConfig: StorybookConfig = {
'@storybook/addon-toolbars',
'@storybook/addon-actions',
'@storybook/addon-styling',
{
name: 'storybook-addon-sass-postcss',
options: {
rule: {
test: /\.(scss|sass)$/i,
},
},
},
],
webpackFinal: async (config) => {
if (!config.resolve) {
Expand Down
2 changes: 2 additions & 0 deletions packages/boba/gateway/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import light from '../src/themes/light'
import dark from '../src/themes/dark'
import { GlobalStyle } from '../src/themes/globalStyle'

import '../src/index.scss'

import { Buffer } from 'buffer'

//@ts-ignore
Expand Down
4 changes: 3 additions & 1 deletion packages/boba/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"@types/redux-mock-store": "^1.0.3",
"@types/styled-components": "^5.1.26",
"@types/testing-library__jest-dom": "^5.14.6",
"@types/truncate-middle": "^1.0.1",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"audit-ci": "^3.1.1",
Expand All @@ -123,7 +124,8 @@
"prop-types": "^15.8.1",
"react-app-rewired": "^2.2.1",
"redux-mock-store": "^1.5.4",
"storybook": "^7.0.15"
"storybook": "^7.0.15",
"storybook-addon-sass-postcss": "^0.1.3"
},
"lint-staged": {
"*.{ts,tsx}": [
Expand Down
3 changes: 1 addition & 2 deletions packages/boba/gateway/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
/>
<meta name="theme-color" content="#000000" />
<meta name="description" content="BOBA"/>
<link rel="apple-touch-icon" href="omg_logo.svg" />
<link rel="apple-touch-icon" href="favicon.svg" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
Expand Down
27 changes: 0 additions & 27 deletions packages/boba/gateway/src/actions/notificationAction.js

This file was deleted.

76 changes: 0 additions & 76 deletions packages/boba/gateway/src/components/alert/Alert.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/boba/gateway/src/components/alert/Alert.module.scss

This file was deleted.

115 changes: 115 additions & 0 deletions packages/boba/gateway/src/components/alert/Alert.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/*
Copyright 2021-present Boba Network.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

import React, { ReactNode } from 'react'
import Snackbar from '@mui/material/Snackbar'
import MuiAlert, { AlertColor } from '@mui/material/Alert'
import CheckCircle from '@mui/icons-material/CheckCircle'
import Error from '@mui/icons-material/Error'
import { useDispatch, useSelector } from 'react-redux'
import { selectAlert, selectError } from 'selectors'
import { closeAlert, closeError } from 'actions/uiAction'

interface ToastProps {
children: ReactNode
open: boolean
onClose: () => void
type: AlertColor
duration: number
}

const Toast = ({
children,
open,
onClose,
type = 'success',
duration = 9000,
}: ToastProps) => {
let autohide = 0
if (type === 'success') {
autohide = 3000 // autohide all the green alerts
} else {
autohide = duration
}

return (
<Snackbar
open={open}
autoHideDuration={autohide ? autohide : undefined}
onClose={onClose}
anchorOrigin={{
vertical: 'top',
horizontal: 'center',
}}
style={{ marginTop: 50 }}
>
<MuiAlert
onClose={onClose}
severity={type}
variant="filled"
sx={{
wordWrap: 'break-word',
borderRadius: '10px',
}}
iconMapping={{
error: <Error sx={{ color: '#FFD88D' }} />,
success: <CheckCircle sx={{ color: '#FFD88D' }} />,
}}
>
{children}
</MuiAlert>
</Snackbar>
)
}

/**
*
* @NotificationAlert: component is used to show the success & error message.
*
*
*/

const NotificationAlert = () => {
const dispatch = useDispatch<any>()
const errorMessage = useSelector(selectError)
const alertMessage = useSelector(selectAlert)

const handleErrorClose = () => dispatch(closeError())
const handleAlertClose = () => dispatch(closeAlert())

return (
<>
<Toast
type="error"
duration={0}
open={!!errorMessage}
onClose={handleErrorClose}
>
{errorMessage}
</Toast>

<Toast
type="success"
duration={0}
open={!!alertMessage}
onClose={handleAlertClose}
>
{alertMessage}
</Toast>
</>
)
}

export default NotificationAlert
Original file line number Diff line number Diff line change
Expand Up @@ -2,97 +2,49 @@

exports[`Available Bridges should match snapshot connected on mainnet 1`] = `
<DocumentFragment>
.c1 {
padding: 0px;
margin: 0px;
font-weight: 400;
font-size: 0.9rem;
line-height: 1.25;
}

.c0 {
background: rgba(255,255,255,0.04);
-webkit-filter: drop-shadow(0px 4px 20px rgba(35,92,41,0.06));
filter: drop-shadow(0px 4px 20px rgba(35,92,41,0.06));
border-radius: 20px;
border: none;
-webkit-backdrop-filter: blur(50px);
backdrop-filter: blur(50px);
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
min-height: -webkit-fit-content;
min-height: -moz-fit-content;
min-height: fit-content;
padding: 20px 24px;
width: 100%;
max-width: 600px;
}

.c2 {
font-size: 1rem;
margin-bottom: 10px;
}

.c3 {
-webkit-text-decoration: none;
text-decoration: none;
color: inherit;
}

.c4 {
border-radius: 12px;
background: rgba(255,255,255,0.14);
border: solid 1px #2d2f3a;
line-height: 1.5;
padding: 10px;
margin-bottom: 5px;
font-size: 1rem;
}

<div
class="c0"
<div
class="sc-ewnqHT govArP"
>
<p
class="c1 c2"
class="sc-bgqQcB sc-fFGjHI llaVrj jrSeWS"
>
Third party bridges
</p>
<a
class="c3"
class="sc-dicizt dsNRSm"
data-testid="banxa"
href="https://boba.banxa.com/?coinType=ETH&fiatType=USD&blockchain=Boba Network&walletAddress=random-code"
rel="noopener noreferrer"
target="_blank"
>
<p
class="c1 c4"
class="sc-bgqQcB sc-iVCKna llaVrj bGQzVG"
>
Banxa
</p>
</a>
<a
class="c3"
class="sc-dicizt dsNRSm"
data-testid="bridge"
href="https://synapseprotocol.com/"
rel="noopener noreferrer"
target="_blank"
>
<p
class="c1 c4"
class="sc-bgqQcB sc-iVCKna llaVrj bGQzVG"
>
Synapse
</p>
</a>
<a
class="c3"
class="sc-dicizt dsNRSm"
data-testid="bridge"
href="https://cbridge.celer.network/#/transfer"
rel="noopener noreferrer"
target="_blank"
>
<p
class="c1 c4"
class="sc-bgqQcB sc-iVCKna llaVrj bGQzVG"
>
Celer
</p>
Expand Down
Loading