From 77555617fa24a424ff7730e8ef7c4b3d912610af Mon Sep 17 00:00:00 2001 From: Norton Andreev Date: Wed, 22 May 2024 17:58:45 +0300 Subject: [PATCH] explorer: Fix Links low contrast Resolves #1764 --- .../__snapshots__/Alert.spec.js.snap | 76 ------------------- .../__snapshots__/AppAnchor.spec.js.snap | 2 +- .../__snapshots__/BlockDetails.spec.js.snap | 4 +- .../__snapshots__/BlocksCard.spec.js.snap | 20 ++--- .../__snapshots__/BlocksList.spec.js.snap | 2 +- .../__snapshots__/BlocksTable.spec.js.snap | 20 ++--- .../__snapshots__/Footer.spec.js.snap | 6 +- .../__snapshots__/Navbar.spec.js.snap | 8 +- .../TransactionDetails.spec.js.snap | 4 +- .../TransactionsCard.spec.js.snap | 20 ++--- .../TransactionsList.spec.js.snap | 2 +- .../TransactionsTable.spec.js.snap | 20 ++--- .../components/app-anchor/AppAnchor.svelte | 5 +- .../lib/components/blocks-list/BlocksList.css | 4 - .../components/blocks-table/BlocksTable.css | 4 - explorer/src/lib/components/footer/Footer.css | 1 + .../src/lib/components/footer/Footer.svelte | 2 + .../TransactionDetails.css | 4 - .../transactions-list/TransactionsList.css | 1 - .../transactions-table/TransactionsTable.css | 4 - .../__snapshots__/Anchor.spec.js.snap | 4 +- .../__snapshots__/NavList.spec.js.snap | 8 +- .../src/lib/dusk/components/anchor/Anchor.css | 22 ++++-- .../lib/dusk/components/anchor/Anchor.svelte | 9 ++- .../lib/dusk/components/nav-list/NavList.css | 1 - .../dusk/components/nav-list/NavList.svelte | 6 +- explorer/src/style/dusk/colors.css | 3 + explorer/src/style/dusk/language.css | 4 + 28 files changed, 103 insertions(+), 163 deletions(-) delete mode 100644 explorer/src/lib/components/__tests__/__snapshots__/Alert.spec.js.snap diff --git a/explorer/src/lib/components/__tests__/__snapshots__/Alert.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/Alert.spec.js.snap deleted file mode 100644 index 7fc84e474e..0000000000 --- a/explorer/src/lib/components/__tests__/__snapshots__/Alert.spec.js.snap +++ /dev/null @@ -1,76 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Alert > should render the \`Alert\` in the error state 1`] = ` -
- - - - - - -
-

- There was an error fetching the data. -

- -

- error -

-
- - - -
-`; - -exports[`Alert > should render the \`Alert\` in the no data state 1`] = ` -
- - - - - - -
-

- No data to display -

-
- -
-`; diff --git a/explorer/src/lib/components/__tests__/__snapshots__/AppAnchor.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/AppAnchor.spec.js.snap index 7831817d37..9aab49960c 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/AppAnchor.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/AppAnchor.spec.js.snap @@ -2,7 +2,7 @@ exports[`AppAnchor > should render an \`Anchor\` with the base path prepended to the \`href\` attribute, if the \`href\` represents an absolute URL 1`] = ` diff --git a/explorer/src/lib/components/__tests__/__snapshots__/BlockDetails.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/BlockDetails.spec.js.snap index 65fd87bc42..a2d10610e5 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/BlockDetails.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/BlockDetails.spec.js.snap @@ -85,7 +85,7 @@ exports[`Block Details > renders the Block Details component 1`] = ` class="details-list__definition" > renders the Block Details component 1`] = ` 495,868 should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,491 @@ -158,7 +158,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,490 @@ -229,7 +229,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,489 @@ -300,7 +300,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,488 @@ -371,7 +371,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,487 @@ -442,7 +442,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,486 @@ -513,7 +513,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,485 @@ -584,7 +584,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,484 @@ -655,7 +655,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,483 @@ -726,7 +726,7 @@ exports[`Blocks Card > should disable the \`Show More\` button if there is no mo class="table__data-cell" > 487,482 diff --git a/explorer/src/lib/components/__tests__/__snapshots__/BlocksList.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/BlocksList.spec.js.snap index 617350d8f0..589eab0364 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/BlocksList.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/BlocksList.spec.js.snap @@ -31,7 +31,7 @@ exports[`Blocks List > renders the Blocks List component 1`] = ` class="details-list__definition details-list__definition--table" > 495,868 diff --git a/explorer/src/lib/components/__tests__/__snapshots__/BlocksTable.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/BlocksTable.spec.js.snap index 8125f41345..c606a62e90 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/BlocksTable.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/BlocksTable.spec.js.snap @@ -60,7 +60,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,491 @@ -131,7 +131,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,490 @@ -202,7 +202,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,489 @@ -273,7 +273,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,488 @@ -344,7 +344,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,487 @@ -415,7 +415,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,486 @@ -486,7 +486,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,485 @@ -557,7 +557,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,484 @@ -628,7 +628,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,483 @@ -699,7 +699,7 @@ exports[`Blocks Table > should render the \`BlocksTable\` component 1`] = ` class="table__data-cell" > 487,482 diff --git a/explorer/src/lib/components/__tests__/__snapshots__/Footer.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/Footer.spec.js.snap index d88edae5bf..bc3a24f846 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/Footer.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/Footer.spec.js.snap @@ -17,7 +17,7 @@ exports[`Footer > renders the Footer component 1`] = ` class="footer__links" > Privacy policy @@ -25,7 +25,7 @@ exports[`Footer > renders the Footer component 1`] = ` Terms of use @@ -34,7 +34,7 @@ exports[`Footer > renders the Footer component 1`] = ` renders the Navbar component 1`] = ` > Chain Info @@ -80,7 +80,7 @@ exports[`Navbar > renders the Navbar component 1`] = ` Blocks @@ -89,7 +89,7 @@ exports[`Navbar > renders the Navbar component 1`] = ` Transactions diff --git a/explorer/src/lib/components/__tests__/__snapshots__/TransactionDetails.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/TransactionDetails.spec.js.snap index d32685288f..0e184f9299 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/TransactionDetails.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/TransactionDetails.spec.js.snap @@ -85,7 +85,7 @@ exports[`Transaction Details > renders the Transaction Details component 1`] = ` class="details-list__definition" > 487,166 @@ -449,7 +449,7 @@ exports[`Transaction Details > renders the Transaction Details component with th class="details-list__definition" > 487,166 diff --git a/explorer/src/lib/components/__tests__/__snapshots__/TransactionsCard.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/TransactionsCard.spec.js.snap index 6ce260e6e7..2dd8f69e1c 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/TransactionsCard.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/TransactionsCard.spec.js.snap @@ -133,7 +133,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > 3c6e4018cf...308e07bd2d @@ -222,7 +222,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > 40d3e59a9b...5e8ade4d3b @@ -311,7 +311,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > ea86c56ffa...8914074fe3 @@ -400,7 +400,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > ea86c56ffa...8914074fe3 @@ -489,7 +489,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > a85a0f5cc2...f0bb827312 @@ -578,7 +578,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > 646bd535ae...67c1cb0906 @@ -667,7 +667,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > fbcda951c6...4bec844f78 @@ -756,7 +756,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > a90821aca4...11467eb9c6 @@ -845,7 +845,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > 4db9e793b1...e2ab163e74 @@ -934,7 +934,7 @@ exports[`Transactions Card > should disable the \`Show More\` button if there is class="table__data-cell" > 47c9f1349f...e7ce5103db diff --git a/explorer/src/lib/components/__tests__/__snapshots__/TransactionsList.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/TransactionsList.spec.js.snap index 3310293366..13b1dcf972 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/TransactionsList.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/TransactionsList.spec.js.snap @@ -31,7 +31,7 @@ exports[`Transactions List > renders the Transactions List component 1`] = ` class="details-list__definition details-list__definition--table" > 4877687c2dbf154248d3ddee9ba0d8...31f39056f82a46819da041d4ac0e04 diff --git a/explorer/src/lib/components/__tests__/__snapshots__/TransactionsTable.spec.js.snap b/explorer/src/lib/components/__tests__/__snapshots__/TransactionsTable.spec.js.snap index 3375b4f776..641d54ece2 100644 --- a/explorer/src/lib/components/__tests__/__snapshots__/TransactionsTable.spec.js.snap +++ b/explorer/src/lib/components/__tests__/__snapshots__/TransactionsTable.spec.js.snap @@ -68,7 +68,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > 3c6e4018cf...308e07bd2d @@ -157,7 +157,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > 40d3e59a9b...5e8ade4d3b @@ -246,7 +246,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > ea86c56ffa...8914074fe3 @@ -335,7 +335,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > ea86c56ffa...8914074fe3 @@ -424,7 +424,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > a85a0f5cc2...f0bb827312 @@ -513,7 +513,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > 646bd535ae...67c1cb0906 @@ -602,7 +602,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > fbcda951c6...4bec844f78 @@ -691,7 +691,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > a90821aca4...11467eb9c6 @@ -780,7 +780,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > 4db9e793b1...e2ab163e74 @@ -869,7 +869,7 @@ exports[`Transactions Table > should render the \`TransactionsTable\` component class="table__data-cell" > 47c9f1349f...e7ce5103db diff --git a/explorer/src/lib/components/app-anchor/AppAnchor.svelte b/explorer/src/lib/components/app-anchor/AppAnchor.svelte index 776a37eafe..66e2bd8055 100644 --- a/explorer/src/lib/components/app-anchor/AppAnchor.svelte +++ b/explorer/src/lib/components/app-anchor/AppAnchor.svelte @@ -6,8 +6,11 @@ /** @type {string} */ export let href; + + /** @type {boolean} */ + export let onSurface = true; - + diff --git a/explorer/src/lib/components/blocks-list/BlocksList.css b/explorer/src/lib/components/blocks-list/BlocksList.css index c515eebdb0..51ca382cdb 100644 --- a/explorer/src/lib/components/blocks-list/BlocksList.css +++ b/explorer/src/lib/components/blocks-list/BlocksList.css @@ -1,7 +1,3 @@ -.block-details__list-link { - text-decoration: none; -} - .dusk-progress-bar.blocks-list__gas-used { width: 60%; } diff --git a/explorer/src/lib/components/blocks-table/BlocksTable.css b/explorer/src/lib/components/blocks-table/BlocksTable.css index 933ed06418..f7dadede1e 100644 --- a/explorer/src/lib/components/blocks-table/BlocksTable.css +++ b/explorer/src/lib/components/blocks-table/BlocksTable.css @@ -1,7 +1,3 @@ -.block__link { - text-decoration: none; -} - .block__fee-avg-label, .block__fee-total-label { font-weight: 500; diff --git a/explorer/src/lib/components/footer/Footer.css b/explorer/src/lib/components/footer/Footer.css index 7cd163eec9..0a595a2d04 100644 --- a/explorer/src/lib/components/footer/Footer.css +++ b/explorer/src/lib/components/footer/Footer.css @@ -19,6 +19,7 @@ } .footer__links-link { + text-decoration: underline; color: var(--primary-color); } diff --git a/explorer/src/lib/components/footer/Footer.svelte b/explorer/src/lib/components/footer/Footer.svelte index f49e247556..d7a13c1420 100644 --- a/explorer/src/lib/components/footer/Footer.svelte +++ b/explorer/src/lib/components/footer/Footer.svelte @@ -12,10 +12,12 @@