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

Portal re-branding #1049

Merged
merged 87 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
f0931ef
most changes
danielisaacgeslin Sep 3, 2024
92b9fb7
mobile nav styling
danielisaacgeslin Sep 3, 2024
5fb055b
some cleanup
danielisaacgeslin Sep 3, 2024
dc99d42
some code styling
danielisaacgeslin Sep 3, 2024
5a31f80
connect widget rebranding
danielisaacgeslin Sep 5, 2024
c802460
rebranding rewards
danielisaacgeslin Sep 5, 2024
ca50f2e
prettier
danielisaacgeslin Sep 5, 2024
93a3a18
Merge branch 'feature/portal-re-branding' of https://github.com/XLabs…
yuli-ferna Sep 5, 2024
875781e
rebranding updates
danielisaacgeslin Sep 6, 2024
1ad9bb5
missing rewards vite config change
danielisaacgeslin Sep 6, 2024
d923da6
rewards header
danielisaacgeslin Sep 10, 2024
79164fb
Feature/include connect v2 and tbtc bridge (v1) (#1052)
yuli-ferna Sep 12, 2024
1832e98
rebranding update
danielisaacgeslin Sep 12, 2024
a1a8dfb
prettier
danielisaacgeslin Sep 12, 2024
983f423
lock fix
danielisaacgeslin Sep 12, 2024
3254d0d
lock fix attmpt 2
danielisaacgeslin Sep 12, 2024
7d8649d
Fix USDC.e config
yuli-ferna Sep 12, 2024
a1b7bd8
Fix #1062 bug usdc only manual
yuli-ferna Sep 12, 2024
0290b23
Merge branch 'main' into feature/portal-re-branding
yuli-ferna Sep 12, 2024
c255eb9
Update connect
yuli-ferna Sep 12, 2024
8c55424
Fix usdc.e config
yuli-ferna Sep 12, 2024
749edad
Remove Rewards Dashboard
yuli-ferna Sep 12, 2024
34203f0
partially reverted re-branding
danielisaacgeslin Sep 13, 2024
7dac2f0
prettier
danielisaacgeslin Sep 13, 2024
4add08a
partially reverted re-branding | left some styles
danielisaacgeslin Sep 13, 2024
84e67d5
prettier
danielisaacgeslin Sep 13, 2024
a7aca12
Fix chain badge style
yuli-ferna Sep 13, 2024
6e5206d
Include rewards link
yuli-ferna Sep 13, 2024
6287031
Include Rewards links
yuli-ferna Sep 13, 2024
0564f53
Merge branch 'main' into feature/portal-re-branding
yuli-ferna Sep 13, 2024
76a222a
Merge branch 'main' into feature/portal-re-branding
yuli-ferna Sep 13, 2024
a0b3c36
most changes
danielisaacgeslin Sep 3, 2024
e285f60
mobile nav styling
danielisaacgeslin Sep 3, 2024
2114313
some cleanup
danielisaacgeslin Sep 3, 2024
731784f
some code styling
danielisaacgeslin Sep 3, 2024
0c33a0d
connect widget rebranding
danielisaacgeslin Sep 5, 2024
0610fb1
rebranding rewards
danielisaacgeslin Sep 5, 2024
a26847b
prettier
danielisaacgeslin Sep 5, 2024
815a747
rebranding updates
danielisaacgeslin Sep 6, 2024
65f528d
missing rewards vite config change
danielisaacgeslin Sep 6, 2024
e876ba9
rewards header
danielisaacgeslin Sep 10, 2024
07a29b5
Feature/include connect v2 and tbtc bridge (v1) (#1052)
yuli-ferna Sep 12, 2024
f479d6e
rebranding update
danielisaacgeslin Sep 12, 2024
0a2298e
prettier
danielisaacgeslin Sep 12, 2024
07330ae
lock fix
danielisaacgeslin Sep 12, 2024
7d0446a
lock fix attmpt 2
danielisaacgeslin Sep 12, 2024
94a2832
Fix USDC.e config
yuli-ferna Sep 12, 2024
64be94a
Fix #1062 bug usdc only manual
yuli-ferna Sep 12, 2024
9182b7c
Update connect
yuli-ferna Sep 12, 2024
8ef52df
Fix usdc.e config
yuli-ferna Sep 12, 2024
18fac34
Remove Rewards Dashboard
yuli-ferna Sep 12, 2024
8e8260e
partially reverted re-branding
danielisaacgeslin Sep 13, 2024
d9c1433
prettier
danielisaacgeslin Sep 13, 2024
51dc351
partially reverted re-branding | left some styles
danielisaacgeslin Sep 13, 2024
a36a011
prettier
danielisaacgeslin Sep 13, 2024
3bf3f69
Fix chain badge style
yuli-ferna Sep 13, 2024
42b11b7
Include rewards link
yuli-ferna Sep 13, 2024
2e4c130
Include Rewards links
yuli-ferna Sep 13, 2024
e723d39
updated connect-v1 package
danielisaacgeslin Sep 16, 2024
a3c7177
Merge branch 'main' and Rewards update style
yuli-ferna Sep 16, 2024
aed948c
Rm version in footer (Rewards)
yuli-ferna Sep 16, 2024
385a4c5
Remove links, and change BRidge to Home
yuli-ferna Sep 16, 2024
ecb0a5f
Update conenct v2
yuli-ferna Sep 16, 2024
5c40e7f
Fix build
yuli-ferna Sep 16, 2024
ab173eb
re-added telemetry props & replaced tgz
danielisaacgeslin Sep 17, 2024
e764a6f
reset connect widget styles (#1085)
sebastianscatularo Sep 17, 2024
947bc63
Update connect v2
yuli-ferna Sep 17, 2024
8094254
Update connect v2
yuli-ferna Sep 17, 2024
3a5c9b5
Update connect v2
yuli-ferna Sep 17, 2024
b6745d4
connect new config update
danielisaacgeslin Sep 18, 2024
eb2c753
connect new config update | 2
danielisaacgeslin Sep 18, 2024
dd5bbbb
Merge branch 'main' into feature/portal-re-branding
yuli-ferna Sep 18, 2024
f6c8d22
Fix
yuli-ferna Sep 18, 2024
8f23557
New connect version cdd5802
yuli-ferna Sep 18, 2024
d276308
Fix scroll privacy policies
yuli-ferna Sep 18, 2024
8be1ac4
removed bridge assets title
danielisaacgeslin Sep 19, 2024
f25d227
Fix ntt manual route name
yuli-ferna Sep 19, 2024
e937e70
New version of connect 9276537
yuli-ferna Sep 19, 2024
96b7d49
Merge branch 'feature/portal-re-branding' of https://github.com/XLabs…
yuli-ferna Sep 19, 2024
82967d2
New version of connect 9276537 and update routes name
yuli-ferna Sep 19, 2024
2dd6bdd
updated wh
danielisaacgeslin Sep 19, 2024
821ddc0
merge
danielisaacgeslin Sep 19, 2024
719f353
New version of connect
yuli-ferna Sep 19, 2024
8d0d79e
Merge
yuli-ferna Sep 19, 2024
019e2f7
New connect version npm
yuli-ferna Sep 19, 2024
8d5e3c6
rm tgz
yuli-ferna Sep 19, 2024
bf3629d
New version
yuli-ferna Sep 19, 2024
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
79 changes: 75 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,78 @@ jobs:
name: build-token-bridge
path: connect-loader/apps/connect/dist

tbtc-bridge-v1:
name: "tBTC Bridge v1"
runs-on: "ubuntu-latest"
concurrency:
group: ${{ github.ref }}-${{inputs.name}}-tbtc-bridge-v1
cancel-in-progress: true
environment: ${{inputs.environment}}
outputs:
pkg-version: ${{ steps.set-version.outputs._PKG_VERSION }}
steps:
- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: v18.17.1
# - name: Checkout Wormhole Connect
# uses: actions/checkout@v3
# with:
# repository: wormhole-foundation/wormhole-connect
# ref: ${{inputs.connect-branch}}
# path: wormhole-connect
# - name: Build Wormhole Connect
# id: wormhole-connect
# run: |
# npm install -g husky
# pushd wormhole-connect
# npm ci --workspaces --if-present
# sed -i -e 's|vite build",|vite build --base=${{inputs.public-url}}/assets/wormhole-connect/",|g' wormhole-connect/package.json
# npm run build
# echo "_JS_SHA_384=$(shasum -b -a 384 wormhole-connect/dist/main.js | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
# echo "_CSS_SHA_384=$(shasum -b -a 384 wormhole-connect/dist/main.css | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
- name: Checkout Custom Wormhole Connect Loader
uses: actions/checkout@v3
with:
ref: ${{ inputs.project-branch }}
path: connect-loader
- name: Setup Git
run: |
pushd connect-loader
git config user.name "xLabs CI"
git config user.email "[email protected]"
- name: Set Portal Bridge Version
id: set-version
run: |
pushd connect-loader/apps/connect-v1
echo "_PKG_VERSION=$(node -p -e "require('./package.json').version")-${{inputs.separator}}$(echo ${{ github.sha }} | cut -c -10)" >> "${GITHUB_OUTPUT}"
- name: Build Custom Wormhole Connect Loader
env:
PUBLIC_URL: "${{ inputs.public-url }}"
VITE_PUBLIC_URL: ${{ inputs.public-url }}
VITE_APP_VERSION: ${{ steps.set-version.outputs._PKG_VERSION }}
VITE_APP_CLUSTER: ${{ vars.REACT_APP_CLUSTER }}
# VITE_APP_JS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._JS_SHA_384 }}
# VITE_APP_CSS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._CSS_SHA_384 }}
VITE_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID }}
run: |
pushd connect-loader/apps/connect-v1
npm ci
echo 'VITE_APP_VERSION=$npm_package_version' > .env
npm run build:tbtc-bridge
- name: Upload Portal Bridge Artifact
uses: actions/upload-artifact@v3
with:
name: build-tbtc-bridge-v1
path: connect-loader/apps/connect-v1/dist

publish:
name: "Publish"
needs:
- advanced-tools
- usdc-bridge
- token-bridge
- tbtc-bridge-v1
- rewards-dashboard
- redirects
- docs
Expand All @@ -324,6 +390,11 @@ jobs:
uses: actions/download-artifact@v3
with:
name: build-token-bridge
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: build-tbtc-bridge-v1
path: tbtc-bridge
- name: Download Artifact
uses: actions/download-artifact@v3
with:
Expand All @@ -337,13 +408,13 @@ jobs:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: build-docs
path: docs
name: build-rewards-dashboard
path: rewards-dashboard
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: build-rewards-dashboard
path: rewards-dashboard
name: build-docs
path: docs
- name: Download Artifact
uses: actions/download-artifact@v3
with:
Expand Down
19 changes: 19 additions & 0 deletions apps/connect-v1/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'@typescript-eslint/no-explicit-any': 0,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
36 changes: 36 additions & 0 deletions apps/connect-v1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

.idea/
# dependencies
/node_modules
/.pnp
.pnp.js
.vscode
.env

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# ethereum contracts
/contracts
/src/ethers-contracts

.yalc
yalc.lock
public/wormhole-connect/
wormhole-connect/node_modules/
dist/
13 changes: 13 additions & 0 deletions apps/connect-v1/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always"
}
69 changes: 69 additions & 0 deletions apps/connect-v1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list


## Create a new banner

Go to `apps/connect/public/data/banners.json` and add a new item with this format:

```
[
{
"id": "string",
"background": "red",
"content": {
"text": "Lorem ipsum",
"color": "papayawhip",
"size": "30px"
},
"button": {
"label": "Click here!",
"background": "red",
"href": "https://portalbridge.com"
},
"since": "2023-12-22T01:06:52.211Z",
"until": "2023-12-25T01:06:52.211Z"
},
{
"id": "string",
"background": "yellow",
"content": {
"text": "Lorem ipsum",
"color": "white",
"size": "15px"
},
"button": {
"label": "Click here!",
"background": "green",
"href": "https://portalbridge.com"
},
"since": "2023-12-22T01:06:52.211Z",
"until": "2023-12-25T01:06:52.211Z"
}
]
```
27 changes: 27 additions & 0 deletions apps/connect-v1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta property="og:type" content="website" />
<meta property="og:image" content="wormhole.png" />
<meta property="og:image:alt" content="Wormhole logo" />
<meta name="twitter:site" content="@portalbridge_" />
<meta name="twitter:creator" content="@portalbridge_" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="apple-touch-icon" href="logo192.png" />
<link rel="manifest" href="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=Poppins:wght@200;300;400;500;600;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
36 changes: 36 additions & 0 deletions apps/connect-v1/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import type { Config } from "jest";

export default {
coverageProvider: "v8",
verbose: true,
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "html"],
testMatch: ["<rootDir>/src/**/*.test.ts", "<rootDir>/src/**/*.test.tsx"],
maxWorkers: "50%",
setupFilesAfterEnv: ["<rootDir>/jest.setup.tsx"],
testEnvironment: "jsdom",
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest",
},
moduleNameMapper: {
"@env": "<rootDir>/src/env/index.ts",
uuid: require.resolve("uuid"),
},
collectCoverageFrom: [
"<rootDir>/src/**/*.{ts,tsx,js,jsx}",
"!<rootDir>/src/**/*.d.ts",
"!<rootDir>/src/main.tsx",
"!<rootDir>/src/utils/constants.ts",
"!<rootDir>/src/utils/styles.ts",
"!<rootDir>/src/env/**/*.*",
"!<rootDir>/src/theme/**/*.*",
],
coverageThreshold: {
global: {
// statements: 100,
// branches: 100,
// functions: 100,
// lines: 100
},
},
coverageReporters: ["lcov", "text", "text-summary"],
} as Config;
12 changes: 12 additions & 0 deletions apps/connect-v1/jest.setup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import "@testing-library/jest-dom";
import { TextEncoder, TextDecoder } from "util";
import React from "react";

window.React = global.React = React;

Object.assign(global, {
TextDecoder,
TextEncoder,
});

jest.mock("./src/env/env-vars.ts", () => ({ envVars: process.env }));
Loading
Loading