From ae37f76b1c63293747bcdcbc7143f268ebdce36f Mon Sep 17 00:00:00 2001 From: Dexter Edwards Date: Wed, 23 Mar 2022 09:57:51 +0000 Subject: [PATCH] Search implementation (#97) * make titles look prettier * link to parties from transactions table * render what data is found conditionally * more syntax highlighting * re-jig file orders * remove footer component for now * add subheading component * adjust column layout * Style up header * enable ligatures * change env files * fix error if data is null * show governance header even if there is no data * remove dead css * add dark theme for block explorer * use memo on parties submit * remove some css from header * basic search implementation * allow passing classNames to form group * add tests for form group * add form-grpup stories * bad rebase fixes * add link * tidy up tests * fix tests * tidy up env files * final test fixes * switch order of classes * fix test id * force build for testing * rename file for linting * add tests for header component * rename export * input error tests * use descriptive function names as per PR comment * fix casing issue for CI * handle empty state * make query easier to understand --- apps/explorer-e2e/.env.devent | 20 --- apps/explorer-e2e/.env.mainnet | 21 --- apps/explorer-e2e/.env.stagnet1 | 21 --- apps/explorer-e2e/.env.stagnet2 | 20 --- apps/explorer-e2e/.env.testnet | 20 --- .../src/support/pages/network-page.js | 2 +- .../src/support/pages/transactions-page.js | 2 +- apps/explorer/.env | 7 - apps/explorer/.env.devent | 29 ---- apps/explorer/.env.local | 14 ++ apps/explorer/.env.mainnet | 29 ---- apps/explorer/.env.stagnet1 | 30 ---- apps/explorer/.env.stagnet2 | 29 ---- apps/explorer/.env.testnet | 29 ---- apps/explorer/jest.config.js | 2 +- apps/explorer/src/app/App.scss | 14 +- apps/explorer/src/app/app.spec.tsx | 2 +- apps/explorer/src/app/app.tsx | 2 - .../src/app/components/footer/index.tsx | 15 -- .../src/app/components/header/header.spec.tsx | 28 ++++ .../src/app/components/header/header.tsx | 12 ++ .../src/app/components/header/index.tsx | 10 +- .../app/components/jump-to-block/index.tsx | 13 +- .../src/app/components/route-title/index.tsx | 16 +- .../src/app/components/search/index.tsx | 109 +------------- .../src/app/components/search/search.spec.tsx | 140 ++++++++++++++++++ .../src/app/components/search/search.tsx | 84 +++++++++++ .../src/app/components/sub-heading/index.tsx | 27 ++++ .../txs/{home => }/block-txs-data.tsx | 6 +- .../explorer/src/app/components/txs/index.tsx | 7 +- .../components/txs/{pending => }/tx-list.tsx | 2 +- .../index.tsx => tx-order-type.tsx} | 0 .../index.tsx => txs-per-block.tsx} | 65 ++++---- apps/explorer/src/app/hooks/use-fetch.tsx | 2 +- apps/explorer/src/app/routes/assets/index.tsx | 8 +- .../src/app/routes/blocks/id/index.tsx | 2 +- .../explorer/src/app/routes/genesis/index.tsx | 3 +- .../src/app/routes/governance/index.tsx | 11 +- .../explorer/src/app/routes/markets/index.tsx | 21 ++- .../app/routes/network-parameters/index.tsx | 8 +- .../src/app/routes/parties/home/index.tsx | 56 ++++++- .../src/app/routes/parties/id/index.tsx | 27 +++- .../explorer/src/app/routes/pending/index.tsx | 5 +- apps/explorer/src/app/routes/txs/id/index.tsx | 3 +- .../txs/id/tx-content.tsx | 13 +- .../txs/id/tx-details.tsx | 9 +- .../src/app/routes/validators/index.tsx | 25 +++- .../src/app/{setupTests.ts => setup-tests.ts} | 0 apps/explorer/src/app/styles/_reset.scss | 6 - apps/explorer/src/index.html | 2 +- apps/explorer/tsconfig.spec.json | 2 +- libs/ui-toolkit/jest.config.js | 1 + .../components/callout/callout.stories.tsx | 5 + .../src/components/callout/callout.test.tsx | 1 - .../etherscan-link/etherscan-link.test.tsx | 1 - .../components/form-group/form-group.spec.tsx | 32 ++++ .../src/components/form-group/form-group.tsx | 32 ++++ .../form-group/from-group.stories.tsx | 30 ++++ .../src/components/form-group/index.tsx | 31 +--- .../components/input-error/input-error.tsx | 6 +- libs/ui-toolkit/src/setup-tests.ts | 5 + 61 files changed, 639 insertions(+), 535 deletions(-) create mode 100644 apps/explorer/.env.local delete mode 100644 apps/explorer/src/app/components/footer/index.tsx create mode 100644 apps/explorer/src/app/components/header/header.spec.tsx create mode 100644 apps/explorer/src/app/components/header/header.tsx create mode 100644 apps/explorer/src/app/components/search/search.spec.tsx create mode 100644 apps/explorer/src/app/components/search/search.tsx create mode 100644 apps/explorer/src/app/components/sub-heading/index.tsx rename apps/explorer/src/app/components/txs/{home => }/block-txs-data.tsx (83%) rename apps/explorer/src/app/components/txs/{pending => }/tx-list.tsx (83%) rename apps/explorer/src/app/components/txs/{tx-order-type/index.tsx => tx-order-type.tsx} (100%) rename apps/explorer/src/app/components/txs/{txs-per-block/index.tsx => txs-per-block.tsx} (50%) rename apps/explorer/src/app/{components => routes}/txs/id/tx-content.tsx (73%) rename apps/explorer/src/app/{components => routes}/txs/id/tx-details.tsx (91%) rename apps/explorer/src/app/{setupTests.ts => setup-tests.ts} (100%) delete mode 100644 apps/explorer/src/app/styles/_reset.scss create mode 100644 libs/ui-toolkit/src/components/form-group/form-group.spec.tsx create mode 100644 libs/ui-toolkit/src/components/form-group/form-group.tsx create mode 100644 libs/ui-toolkit/src/components/form-group/from-group.stories.tsx create mode 100644 libs/ui-toolkit/src/setup-tests.ts diff --git a/apps/explorer-e2e/.env.devent b/apps/explorer-e2e/.env.devent index a852aa565..996011a8e 100644 --- a/apps/explorer-e2e/.env.devent +++ b/apps/explorer-e2e/.env.devent @@ -1,23 +1,3 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://n04.d.vega.xyz/tm" diff --git a/apps/explorer-e2e/.env.mainnet b/apps/explorer-e2e/.env.mainnet index 9fedccbba..13b74ef15 100644 --- a/apps/explorer-e2e/.env.mainnet +++ b/apps/explorer-e2e/.env.mainnet @@ -1,23 +1,3 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://mainnet-observer-proxy01.ops.vega.xyz/" @@ -28,7 +8,6 @@ NX_VEGA_URL = "https://api.token.vega.xyz/query" NX_EXPLORER_ASSETS = 1 NX_EXPLORER_GENESIS = 1 NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 NX_EXPLORER_NETWORK_PARAMETERS = 1 NX_EXPLORER_PARTIES = 1 NX_EXPLORER_VALIDATORS = 1 diff --git a/apps/explorer-e2e/.env.stagnet1 b/apps/explorer-e2e/.env.stagnet1 index 3abca14e7..871afdc6d 100644 --- a/apps/explorer-e2e/.env.stagnet1 +++ b/apps/explorer-e2e/.env.stagnet1 @@ -1,30 +1,9 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://n03.s.vega.xyz/tm" NX_TENDERMINT_WEBSOCKET_URL = "wss://n03.s.vega.xyz/tm/websocket" NX_VEGA_URL = "https://n03.s.vega.xyz/query" - # App flags NX_EXPLORER_ASSETS = 1 NX_EXPLORER_GENESIS = 1 diff --git a/apps/explorer-e2e/.env.stagnet2 b/apps/explorer-e2e/.env.stagnet2 index 5499a2a6b..e4cbaab0d 100644 --- a/apps/explorer-e2e/.env.stagnet2 +++ b/apps/explorer-e2e/.env.stagnet2 @@ -1,23 +1,3 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://n03.stagnet2.vega.xyz/tm" diff --git a/apps/explorer-e2e/.env.testnet b/apps/explorer-e2e/.env.testnet index 56370f422..5b296d196 100644 --- a/apps/explorer-e2e/.env.testnet +++ b/apps/explorer-e2e/.env.testnet @@ -1,23 +1,3 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://lb.testnet.vega.xyz/tm" diff --git a/apps/explorer-e2e/src/support/pages/network-page.js b/apps/explorer-e2e/src/support/pages/network-page.js index faa2b0d32..963e0e1ad 100644 --- a/apps/explorer-e2e/src/support/pages/network-page.js +++ b/apps/explorer-e2e/src/support/pages/network-page.js @@ -7,7 +7,7 @@ export default class NetworkParametersPage extends BasePage { verifyNetworkParametersDisplayed() { cy.getByTestId(this.networkParametersHeader).should( 'have.text', - 'NetworkParameters' + 'Network Parameters' ); cy.getByTestId(this.parameters).should('not.be.empty'); } diff --git a/apps/explorer-e2e/src/support/pages/transactions-page.js b/apps/explorer-e2e/src/support/pages/transactions-page.js index c7187c364..da8d4e47f 100644 --- a/apps/explorer-e2e/src/support/pages/transactions-page.js +++ b/apps/explorer-e2e/src/support/pages/transactions-page.js @@ -77,6 +77,6 @@ export default class TransactionsPage extends BasePage { } clickOnTopTransaction() { - cy.getByTestId(this.transactionRow).first().find('a').click(); + cy.getByTestId(this.transactionRow).first().find('a').first().click(); } } diff --git a/apps/explorer/.env b/apps/explorer/.env index 56370f422..123a0c798 100644 --- a/apps/explorer/.env +++ b/apps/explorer/.env @@ -18,17 +18,10 @@ NX_URL=$URL NX_DEPLOY_URL=$DEPLOY_URL NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL -# App configuration variables -NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" -NX_TENDERMINT_URL = "https://lb.testnet.vega.xyz/tm" -NX_TENDERMINT_WEBSOCKET_URL = "wss://lb.testnet.vega.xyz/tm/websocket" -NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" - # App flags NX_EXPLORER_ASSETS = 1 NX_EXPLORER_GENESIS = 1 NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 NX_EXPLORER_NETWORK_PARAMETERS = 1 NX_EXPLORER_PARTIES = 1 NX_EXPLORER_VALIDATORS = 1 diff --git a/apps/explorer/.env.devent b/apps/explorer/.env.devent index a852aa565..3af139aa8 100644 --- a/apps/explorer/.env.devent +++ b/apps/explorer/.env.devent @@ -1,34 +1,5 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://n04.d.vega.xyz/tm" NX_TENDERMINT_WEBSOCKET_URL = "wss://n04.d.vega.xyz/tm/websocket" NX_VEGA_URL = "https://n04.d.vega.xyz/query" - -# App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 diff --git a/apps/explorer/.env.local b/apps/explorer/.env.local new file mode 100644 index 000000000..5b296d196 --- /dev/null +++ b/apps/explorer/.env.local @@ -0,0 +1,14 @@ +# App configuration variables +NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" +NX_TENDERMINT_URL = "https://lb.testnet.vega.xyz/tm" +NX_TENDERMINT_WEBSOCKET_URL = "wss://lb.testnet.vega.xyz/tm/websocket" +NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" + +# App flags +NX_EXPLORER_ASSETS = 1 +NX_EXPLORER_GENESIS = 1 +NX_EXPLORER_GOVERNANCE = 1 +NX_EXPLORER_MARKETS = 1 +NX_EXPLORER_NETWORK_PARAMETERS = 1 +NX_EXPLORER_PARTIES = 1 +NX_EXPLORER_VALIDATORS = 1 diff --git a/apps/explorer/.env.mainnet b/apps/explorer/.env.mainnet index 9fedccbba..ad8c0ef9d 100644 --- a/apps/explorer/.env.mainnet +++ b/apps/explorer/.env.mainnet @@ -1,34 +1,5 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://mainnet-observer-proxy01.ops.vega.xyz/" NX_TENDERMINT_WEBSOCKET_URL = "wss://mainnet-observer-proxy01.ops.vega.xyz/websocket" NX_VEGA_URL = "https://api.token.vega.xyz/query" - -# App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 diff --git a/apps/explorer/.env.stagnet1 b/apps/explorer/.env.stagnet1 index 3abca14e7..83cda47ac 100644 --- a/apps/explorer/.env.stagnet1 +++ b/apps/explorer/.env.stagnet1 @@ -1,35 +1,5 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://n03.s.vega.xyz/tm" NX_TENDERMINT_WEBSOCKET_URL = "wss://n03.s.vega.xyz/tm/websocket" NX_VEGA_URL = "https://n03.s.vega.xyz/query" - - -# App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 diff --git a/apps/explorer/.env.stagnet2 b/apps/explorer/.env.stagnet2 index 5499a2a6b..05b15b546 100644 --- a/apps/explorer/.env.stagnet2 +++ b/apps/explorer/.env.stagnet2 @@ -1,34 +1,5 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://n03.stagnet2.vega.xyz/tm" NX_TENDERMINT_WEBSOCKET_URL = "wss://n03.stagnet2.vega.xyz/tm/websocket" NX_VEGA_URL = "https://n03.stagnet2.vega.xyz/query" - -# App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 diff --git a/apps/explorer/.env.testnet b/apps/explorer/.env.testnet index 56370f422..5218200b8 100644 --- a/apps/explorer/.env.testnet +++ b/apps/explorer/.env.testnet @@ -1,34 +1,5 @@ -# React Environment Variables -# https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables#expanding-environment-variables-in-env - -# Netlify Environment Variables -# https://www.netlify.com/docs/continuous-deployment/#environment-variables -NX_VERSION=$npm_package_version -NX_REPOSITORY_URL=$REPOSITORY_URL -NX_BRANCH=$BRANCH -NX_PULL_REQUEST=$PULL_REQUEST -NX_HEAD=$HEAD -NX_COMMIT_REF=$COMMIT_REF -NX_CONTEXT=$CONTEXT -NX_REVIEW_ID=$REVIEW_ID -NX_INCOMING_HOOK_TITLE=$INCOMING_HOOK_TITLE -NX_INCOMING_HOOK_URL=$INCOMING_HOOK_URL -NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY -NX_URL=$URL -NX_DEPLOY_URL=$DEPLOY_URL -NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL - # App configuration variables NX_CHAIN_EXPLORER_URL = "https://explorer.vega.trading/.netlify/functions/chain-explorer-api" NX_TENDERMINT_URL = "https://lb.testnet.vega.xyz/tm" NX_TENDERMINT_WEBSOCKET_URL = "wss://lb.testnet.vega.xyz/tm/websocket" NX_VEGA_URL = "https://lb.testnet.vega.xyz/query" - -# App flags -NX_EXPLORER_ASSETS = 1 -NX_EXPLORER_GENESIS = 1 -NX_EXPLORER_GOVERNANCE = 1 -NX_EXPLORER_MARKETS = 1 -NX_EXPLORER_NETWORK_PARAMETERS = 1 -NX_EXPLORER_PARTIES = 1 -NX_EXPLORER_VALIDATORS = 1 diff --git a/apps/explorer/jest.config.js b/apps/explorer/jest.config.js index fcdba1f33..21c4b37c8 100644 --- a/apps/explorer/jest.config.js +++ b/apps/explorer/jest.config.js @@ -7,5 +7,5 @@ module.exports = { }, moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], coverageDirectory: '../../coverage/apps/explorer', - setupFilesAfterEnv: ['./src/app/setupTests.ts'], + setupFilesAfterEnv: ['./src/app/setup-tests.ts'], }; diff --git a/apps/explorer/src/app/App.scss b/apps/explorer/src/app/App.scss index 5f7344309..bc35c4932 100644 --- a/apps/explorer/src/app/App.scss +++ b/apps/explorer/src/app/App.scss @@ -1,6 +1,5 @@ @import './styles/colors'; @import './styles/fonts'; -@import './styles/reset'; html, body, @@ -39,18 +38,23 @@ body, padding: 20px; grid-column-start: 1; grid-column-end: 1; - grid-row-start: 1; + grid-row-start: 2; grid-row-end: 3; overflow: hidden; } header { - padding: 20px; border-bottom: 1px solid $white; - grid-column-start: 2; - grid-column-end: 2; + grid-column-start: 1; + grid-column-end: 3; grid-row-start: 1; grid-row-end: 2; + + h1 { + font-family: $font-alpa-lyrae; + font-feature-settings: 'calt'; + text-transform: uppercase; + } } main { diff --git a/apps/explorer/src/app/app.spec.tsx b/apps/explorer/src/app/app.spec.tsx index 680a016a5..6bccbf1c8 100644 --- a/apps/explorer/src/app/app.spec.tsx +++ b/apps/explorer/src/app/app.spec.tsx @@ -1,4 +1,4 @@ -import App from './App'; +import App from './app'; describe('App', () => { it('should exist', () => { diff --git a/apps/explorer/src/app/app.tsx b/apps/explorer/src/app/app.tsx index 770f5752a..c23ed5385 100644 --- a/apps/explorer/src/app/app.tsx +++ b/apps/explorer/src/app/app.tsx @@ -4,7 +4,6 @@ import { ApolloProvider } from '@apollo/client'; import { createClient } from './lib/apollo-client'; import { Nav } from './components/nav'; -import { Footer } from './components/footer'; import { Header } from './components/header'; import { Main } from './components/main'; import React from 'react'; @@ -24,7 +23,6 @@ function App() {