From ab73a5b5d931a6a249f7a0098e60bad38d129a64 Mon Sep 17 00:00:00 2001 From: EnzoVezzaro Date: Thu, 17 Feb 2022 17:03:27 +0100 Subject: [PATCH] Mobile publish fixes (#1076) * aligned inputs for mobile * correction for mobile first approch * change nft layout on publish mobile (metadata section) * align datatokens view on publish widzard for mobile * remove unnecessary margin around nft, datatoken UI * reduce min-width for xs viewports * fix mobile layout for pricing tab / submit tab on publish --- .../FormFields/Datatoken/index.module.css | 10 +++++++- .../@shared/FormFields/Nft/index.module.css | 10 +++++++- src/components/@shared/atoms/Tabs.module.css | 4 +++- .../Publish/Pricing/Coin.module.css | 15 +++++++++--- .../Publish/Pricing/Fees.module.css | 13 ++++++++--- .../Publish/Submission/Feedback.module.css | 23 +++++++++++++++++++ .../Publish/Submission/Feedback.tsx | 6 ++--- .../Submission/TransactionCount.module.css | 3 +-- 8 files changed, 70 insertions(+), 14 deletions(-) diff --git a/src/components/@shared/FormFields/Datatoken/index.module.css b/src/components/@shared/FormFields/Datatoken/index.module.css index 50dc11e18..55712779e 100644 --- a/src/components/@shared/FormFields/Datatoken/index.module.css +++ b/src/components/@shared/FormFields/Datatoken/index.module.css @@ -1,7 +1,8 @@ .datatoken { display: grid; gap: var(--spacer); - grid-template-columns: 1fr 11fr; + grid-template-columns: none; + margin-top: calc(var(--spacer) / 2); margin-bottom: var(--spacer); align-items: center; } @@ -20,9 +21,16 @@ border: 1px solid var(--border-color); fill: var(--brand-violet); border-radius: 50%; + margin: 0; } .image svg { width: 100%; height: 100%; } + +@media (min-width: 40rem) { + .datatoken { + grid-template-columns: 1fr 11fr; + } +} diff --git a/src/components/@shared/FormFields/Nft/index.module.css b/src/components/@shared/FormFields/Nft/index.module.css index 01ad64eda..4a0fcb633 100644 --- a/src/components/@shared/FormFields/Nft/index.module.css +++ b/src/components/@shared/FormFields/Nft/index.module.css @@ -1,7 +1,8 @@ .nft { display: grid; gap: var(--spacer); - grid-template-columns: 1fr 11fr; + grid-template-columns: none; + margin-top: calc(var(--spacer) / 2); margin-bottom: var(--spacer); align-items: center; } @@ -19,6 +20,7 @@ border-radius: var(--border-radius); border: 1px solid var(--border-color); position: relative; + margin: 0; } .actions { @@ -41,3 +43,9 @@ transform: scale(0.9); transform-origin: center; } + +@media (min-width: 40rem) { + .nft { + grid-template-columns: 1fr 11fr; + } +} diff --git a/src/components/@shared/atoms/Tabs.module.css b/src/components/@shared/atoms/Tabs.module.css index 0050b54e4..2a2fe41bb 100644 --- a/src/components/@shared/atoms/Tabs.module.css +++ b/src/components/@shared/atoms/Tabs.module.css @@ -2,6 +2,8 @@ text-align: center; border-bottom: 1px solid var(--border-color); padding: calc(var(--spacer) / 2); + display: flex; + justify-content: center; } .tab { @@ -15,7 +17,7 @@ background-color: var(--background-body); border: 1px solid var(--border-color); margin-right: -1px; - min-width: 100px; + min-width: 90px; } .tab:first-child { diff --git a/src/components/Publish/Pricing/Coin.module.css b/src/components/Publish/Pricing/Coin.module.css index a3d704d8f..d844ebb61 100644 --- a/src/components/Publish/Pricing/Coin.module.css +++ b/src/components/Publish/Pricing/Coin.module.css @@ -10,7 +10,7 @@ .token { display: flex; align-items: center; - justify-content: center; + justify-content: flex-start; margin-bottom: calc(var(--spacer) / 2); } @@ -60,8 +60,7 @@ flex-wrap: wrap; justify-content: center; text-align: center; - max-width: 12rem; - margin: auto; + margin: auto 0; } .max { @@ -73,3 +72,13 @@ .weight strong { color: var(--font-color-text); } + +@media screen and (min-width: 41rem) { + .token { + justify-content: center; + } + .data { + margin: auto; + max-width: 12rem; + } +} diff --git a/src/components/Publish/Pricing/Fees.module.css b/src/components/Publish/Pricing/Fees.module.css index 1b5b555c8..ade929ea9 100644 --- a/src/components/Publish/Pricing/Fees.module.css +++ b/src/components/Publish/Pricing/Fees.module.css @@ -1,14 +1,14 @@ .fees { display: grid; gap: var(--spacer); - grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); - padding: var(--spacer); + grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); + padding: var(--spacer) 0; text-align: center; } .fees > div { margin-bottom: 0; - justify-self: center; + justify-self: start; } .fees label { @@ -18,3 +18,10 @@ .fees input { max-width: 5rem; } + +@media screen and (min-width: 25rem) { + .fees { + grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); + padding: var(--spacer); + } +} diff --git a/src/components/Publish/Submission/Feedback.module.css b/src/components/Publish/Submission/Feedback.module.css index b07bb459b..b6c8537ed 100644 --- a/src/components/Publish/Submission/Feedback.module.css +++ b/src/components/Publish/Submission/Feedback.module.css @@ -58,7 +58,15 @@ .title { font-size: var(--font-size-large); display: inline-block; + margin-bottom: 0; +} + +.txs { + display: block; + margin-left: 1.5rem; margin-bottom: calc(var(--spacer) / 4); + white-space: nowrap; + width: 100%; } .description { @@ -78,3 +86,18 @@ transform: rotate(360deg); } } + +@media screen and (min-width: 30rem) { + .txs { + display: inline; + } +} + +@media screen and (min-width: 40rem) { + .title { + margin-bottom: calc(var(--spacer) / 2); + } + .txs { + margin-left: calc(var(--spacer) / 4); + } +} diff --git a/src/components/Publish/Submission/Feedback.tsx b/src/components/Publish/Submission/Feedback.tsx index 965320202..d1e542366 100644 --- a/src/components/Publish/Submission/Feedback.tsx +++ b/src/components/Publish/Submission/Feedback.tsx @@ -9,8 +9,8 @@ export function Feedback(): ReactElement { const items = Object.entries(values.feedback).map(([key, value], index) => (
  • -

    - {value.name} +

    {value.name}

    +
    {value.txCount > 0 && ( )} - +

    {value.description}

    {value.errorMessage && ( {value.errorMessage} diff --git a/src/components/Publish/Submission/TransactionCount.module.css b/src/components/Publish/Submission/TransactionCount.module.css index 0f6ead7c8..56d07dd19 100644 --- a/src/components/Publish/Submission/TransactionCount.module.css +++ b/src/components/Publish/Submission/TransactionCount.module.css @@ -1,7 +1,6 @@ .txHash { display: inline-block; - margin-left: calc(var(--spacer) / 2); - margin-top: calc(var(--spacer) / 2); + margin: calc(var(--spacer) / 4) calc(var(--spacer) / 4); font-size: var(--font-size-small); font-family: var(--font-family-base); font-weight: var(--font-weight-base);