From 0297ebb0298d59799852d51d9089cfcc09f37296 Mon Sep 17 00:00:00 2001 From: Kat Leight <33187102+leightkt@users.noreply.github.com> Date: Thu, 18 May 2023 11:37:21 -0600 Subject: [PATCH] Enhancement: Account Center Updates (#1723) --- .../docs/[...3]modules/[...1]core/+page.md | 16 + packages/core/README.md | 14 + packages/core/package.json | 2 +- packages/core/src/constants.ts | 2 +- packages/core/src/views/Index.svelte | 1 - ...mized.svelte => AccountCenterPanel.svelte} | 389 +++++++++--------- ...d.svelte => AcctCenterTriggerLarge.svelte} | 12 +- ...o.svelte => AcctCenterTriggerSmall.svelte} | 61 ++- .../src/views/account-center/Index.svelte | 40 +- packages/demo/package.json | 2 +- packages/demo/src/App.svelte | 4 +- packages/react/package.json | 4 +- packages/vue/package.json | 4 +- 13 files changed, 308 insertions(+), 243 deletions(-) rename packages/core/src/views/account-center/{Maximized.svelte => AccountCenterPanel.svelte} (50%) rename packages/core/src/views/account-center/{Minimized.svelte => AcctCenterTriggerLarge.svelte} (95%) rename packages/core/src/views/account-center/{Micro.svelte => AcctCenterTriggerSmall.svelte} (66%) diff --git a/docs/src/routes/docs/[...3]modules/[...1]core/+page.md b/docs/src/routes/docs/[...3]modules/[...1]core/+page.md index dcd637d50..a2cf00779 100644 --- a/docs/src/routes/docs/[...3]modules/[...1]core/+page.md +++ b/docs/src/routes/docs/[...3]modules/[...1]core/+page.md @@ -17,6 +17,22 @@ title: Core This is the core package that contains all of the UI and logic to be able to seamlessly connect user's wallets to your app and track the state of those wallets. Onboard no longer contains any wallet specific code, so wallets need to be passed in upon initialization. +:::admonition type="tip" +_note: Release 2.23.0 moves the default position of the account center from topRight to bottomRight. To reset your application to topRight, include the following when initializing onboard:_ +```typescript + accountCenter: { + desktop: { + enabled: true, + position: 'topRight' + }, + mobile: { + enabled: true, + position: 'topRight' + } + } +``` +::: + ## Install Install the core module: diff --git a/packages/core/README.md b/packages/core/README.md index c641a8431..952822193 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -6,6 +6,20 @@ This is the core package that contains all of the UI and logic to be able to seamlessly connect user's wallets to your app and track the state of those wallets. Onboard no longer contains any wallet specific code, so wallets need to be passed in upon initialization. +_Tip: Release 2.23.0 moves the default position of the account center from topRight to bottomRight. To reset your application to topRight, include the following when initializing onboard:_ +```typescript + accountCenter: { + desktop: { + enabled: true, + position: 'topRight' + }, + mobile: { + enabled: true, + position: 'topRight' + } + } +``` + ## Quick start Checkout our full library of quick start examples for connecting and interacting with EVM based wallets diff --git a/packages/core/package.json b/packages/core/package.json index 8966e3930..b20388dd9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/core", - "version": "2.18.1-alpha.2", + "version": "2.18.1-alpha.3", "description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", diff --git a/packages/core/src/constants.ts b/packages/core/src/constants.ts index 7fdc27265..e226d7833 100644 --- a/packages/core/src/constants.ts +++ b/packages/core/src/constants.ts @@ -7,7 +7,7 @@ export const APP_INITIAL_STATE: AppState = { chains: [], accountCenter: { enabled: true, - position: 'topRight', + position: 'bottomRight', expanded: false, minimal: configuration.device.type === 'mobile' }, diff --git a/packages/core/src/views/Index.svelte b/packages/core/src/views/Index.svelte index 57e612a54..798e5fdd5 100644 --- a/packages/core/src/views/Index.svelte +++ b/packages/core/src/views/Index.svelte @@ -378,7 +378,6 @@ .container { padding: 16px; font-family: var(--onboard-font-family-normal, var(--font-family-normal)); - width: 100%; pointer-events: none; touch-action: none; } diff --git a/packages/core/src/views/account-center/Maximized.svelte b/packages/core/src/views/account-center/AccountCenterPanel.svelte similarity index 50% rename from packages/core/src/views/account-center/Maximized.svelte rename to packages/core/src/views/account-center/AccountCenterPanel.svelte index f31a3823b..86fe175dd 100644 --- a/packages/core/src/views/account-center/Maximized.svelte +++ b/packages/core/src/views/account-center/AccountCenterPanel.svelte @@ -1,4 +1,5 @@ -