From 9d6c771525ac1a2e6e6268940a8c6539a264da96 Mon Sep 17 00:00:00 2001 From: evavirseda Date: Sat, 19 Aug 2023 18:29:24 +0200 Subject: [PATCH] refactor: cleanup `Pane` (#7153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: update Pane component and remove classes * fix: remove debris * fix: remove string concatenation * fix: add width * fix: remove unnecessary div * fix: remove debris export error * style: polish css to match production version --------- Co-authored-by: Jean Carlo Noguera Co-authored-by: Begoña Álvarez de la Cruz --- .../desktop/components/AccountActivity.svelte | 2 +- .../desktop/components/AccountSummary.svelte | 2 +- .../panes/ProposalInformationPane.svelte | 4 +- .../views/CollectiblesDetailsView.svelte | 164 +++++++++-------- .../dashboard/developer/Developer.svelte | 56 +++--- .../views/GovernanceDashboardView.svelte | 6 +- .../views/ProposalDetailsView.svelte | 170 +++++++++--------- .../views/dashboard/wallet/Wallet.svelte | 20 ++- packages/shared/components/AssetList.svelte | 2 +- packages/shared/components/Pane.svelte | 10 ++ packages/shared/components/atoms/Pane.svelte | 16 -- packages/shared/components/atoms/index.js | 1 - .../shared/components/enums/height.enum.ts | 5 + packages/shared/components/enums/index.ts | 16 +- .../shared/components/enums/overflow.enum.ts | 6 + packages/shared/components/index.js | 68 +++---- 16 files changed, 289 insertions(+), 259 deletions(-) create mode 100644 packages/shared/components/Pane.svelte delete mode 100644 packages/shared/components/atoms/Pane.svelte delete mode 100644 packages/shared/components/atoms/index.js create mode 100644 packages/shared/components/enums/height.enum.ts create mode 100644 packages/shared/components/enums/overflow.enum.ts diff --git a/packages/desktop/components/AccountActivity.svelte b/packages/desktop/components/AccountActivity.svelte index a5e294360c6..616dacc00b3 100644 --- a/packages/desktop/components/AccountActivity.svelte +++ b/packages/desktop/components/AccountActivity.svelte @@ -62,7 +62,7 @@ } -
+
{localize('general.activity')} diff --git a/packages/desktop/components/AccountSummary.svelte b/packages/desktop/components/AccountSummary.svelte index b8971690d2f..536a4b24c72 100644 --- a/packages/desktop/components/AccountSummary.svelte +++ b/packages/desktop/components/AccountSummary.svelte @@ -16,7 +16,7 @@ $: ({ baseCoin } = $selectedAccountAssets[$activeProfile?.network.id]) - +
{localize('general.balanceWithNetwork', { values: { network: fomattedNetworkName } })} diff --git a/packages/desktop/components/panes/ProposalInformationPane.svelte b/packages/desktop/components/panes/ProposalInformationPane.svelte index 6b950123f87..900dea47e49 100644 --- a/packages/desktop/components/panes/ProposalInformationPane.svelte +++ b/packages/desktop/components/panes/ProposalInformationPane.svelte @@ -1,5 +1,5 @@ - + {localize('views.governance.details.proposalInformation.title')} diff --git a/packages/desktop/views/dashboard/collectibles/views/CollectiblesDetailsView.svelte b/packages/desktop/views/dashboard/collectibles/views/CollectiblesDetailsView.svelte index 75d9befea42..2617a29d04f 100644 --- a/packages/desktop/views/dashboard/collectibles/views/CollectiblesDetailsView.svelte +++ b/packages/desktop/views/dashboard/collectibles/views/CollectiblesDetailsView.svelte @@ -38,7 +38,7 @@ Pane, Text, } from '@ui' - import { FontWeight, TextType } from '@ui/enums' + import { FontWeight, Height, TextType } from '@ui/enums' let modal: Modal @@ -154,88 +154,96 @@
- - - {name} - - - - {#if description} - - - {description} - - - {/if} -
- - - {localize('general.details')} - - - {#each Object.entries(detailsList) as [key, value]} - {#key value} - - {/key} - {/each} - - - {#if attributes?.length > 0} - - - {localize('general.attributes')} - -
- {#each Object.values(attributes) as attribute} - - {/each} -
-
- {:else} - {#if soonaverseAttributes?.props} - - - {localize('general.properties')} +
+ + + + {name} + + + + {#if description} + + + {description} -
- {#each Object.entries(soonaverseAttributes?.props) as [_key, { label, value }]} - - {/each} -
- +
{/if} - {#if soonaverseAttributes?.stats} - +
+ - {localize('general.statistics')} + {localize('general.details')} -
- {#each Object.entries(soonaverseAttributes?.stats) as [_key, { label, value }]} - + + {#each Object.entries(detailsList) as [key, value]} + {#key value} + + {/key} {/each} -
- - {/if} - {/if} -
- - - - -
+ + + {#if attributes?.length > 0} + + + {localize('general.attributes')} + +
+ {#each Object.values(attributes) as attribute} + + {/each} +
+
+ {:else} + {#if soonaverseAttributes?.props} + + + {localize('general.properties')} + +
+ {#each Object.entries(soonaverseAttributes?.props) as [_key, { label, value }]} + + {/each} +
+
+ {/if} + {#if soonaverseAttributes?.stats} + + + {localize('general.statistics')} + +
+ {#each Object.entries(soonaverseAttributes?.stats) as [_key, { label, value }]} + + {/each} +
+
+ {/if} + {/if} +
+ + + + + + +