Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wallet-dashboard): polish homepage scroll #4502

Merged
merged 43 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
aeb1e12
feat: add supply increase vesting overview to homepage
cpl121 Dec 10, 2024
f000422
Merge branches 'tooling-dashboard/feat-add-supply-increase-vesting-ov…
cpl121 Dec 10, 2024
719e94c
fix: linter
cpl121 Dec 10, 2024
6ed7173
fix(dashboard): remove isHoverable prop
cpl121 Dec 12, 2024
c8a80e5
fix(dashboard): use showDays in formatCountdown
cpl121 Dec 12, 2024
2499a57
fix(dashboard): rename vesting by supplyIncreaseVesting
cpl121 Dec 12, 2024
d462085
Merge branches 'tooling-dashboard/feat-add-supply-increase-vesting-ov…
cpl121 Dec 12, 2024
4c9131b
fix: format
cpl121 Dec 12, 2024
49f7d0d
fix(dashboard): build
cpl121 Dec 12, 2024
e242925
fix(dashboard): format
cpl121 Dec 12, 2024
4329b2c
Merge branch 'develop' into tooling-dashboard/feat-add-supply-increas…
evavirseda Dec 13, 2024
a30e75b
fix(dashboard): styles
cpl121 Dec 13, 2024
5c3b9b3
fix(dashboard): isTimelockedStakedObjectsLoading name and join 2 inva…
cpl121 Dec 13, 2024
d7d2f1c
feat: polish homepage scroll
evavirseda Dec 16, 2024
61e24fd
Merge branches 'tooling-dashboard/feat-add-supply-increase-vesting-ov…
cpl121 Dec 16, 2024
bfd9bf8
fix(dashboard): format
cpl121 Dec 16, 2024
6f389ed
Merge branch 'tooling-dashboard/feat-add-supply-increase-vesting-over…
evavirseda Dec 16, 2024
59efdc7
feat: update styles and add missing dependency
evavirseda Dec 16, 2024
9848b71
Merge branches 'tooling-dashboard/feat-add-supply-increase-vesting-ov…
cpl121 Dec 16, 2024
cf67de8
Merge branch 'tooling-dashboard/feat-add-supply-increase-vesting-over…
evavirseda Dec 17, 2024
d477224
feat: add min height
evavirseda Dec 17, 2024
9bc8af9
feat. add padding
evavirseda Dec 17, 2024
22fac05
Merge branches 'tooling-dashboard/feat-add-supply-increase-vesting-ov…
cpl121 Dec 17, 2024
7abc237
fix(dasboard): undo the split of the query invalidation
cpl121 Dec 17, 2024
9c0ab6e
Merge branch 'tooling-dashboard/feat-add-supply-increase-vesting-over…
evavirseda Dec 17, 2024
2eb5095
Merge branches 'tooling-dashboard/feat-add-supply-increase-vesting-ov…
cpl121 Dec 17, 2024
dd7569b
fix(dashboard): rename unlockAllsupplyIncreaseVesting and disable new…
cpl121 Dec 17, 2024
96b4dd3
Merge branch 'develop' into tooling-dashboard/feat-add-supply-increas…
evavirseda Dec 17, 2024
b46a664
Merge branch 'tooling-dashboard/feat-add-supply-increase-vesting-over…
evavirseda Dec 17, 2024
6ada5aa
fix grid
evavirseda Dec 17, 2024
8332343
Merge branches 'tooling-dashboard/feat-add-supply-increase-vesting-ov…
cpl121 Dec 17, 2024
2024575
feat(dashboard): add object for the options in useCountdownByTimestamp
cpl121 Dec 17, 2024
4b268f8
fix: linter
cpl121 Dec 17, 2024
184923e
fix: linter
cpl121 Dec 17, 2024
71ca4ef
fix(core): improve naming
cpl121 Dec 18, 2024
20a1cc4
fix(core): linter
cpl121 Dec 18, 2024
c30635b
Merge branch 'tooling-dashboard/feat-add-supply-increase-vesting-over…
evavirseda Dec 18, 2024
05b6da6
Merge branch 'develop' into tooling-dashboard/feat-add-supply-increas…
brancoder Dec 18, 2024
e48eec4
Merge branch 'tooling-dashboard/feat-add-supply-increase-vesting-over…
evavirseda Dec 18, 2024
eb9facb
Merge branch 'develop' into tooling-dashboard/feat-add-supply-increas…
cpl121 Dec 18, 2024
40b68e7
Merge branch 'develop' into tooling-dashboard/feat-add-supply-increas…
brancoder Dec 18, 2024
e7aded9
Merge branch 'tooling-dashboard/feat-add-supply-increase-vesting-over…
evavirseda Dec 18, 2024
12eb0dd
Merge branch 'develop' into tooling-dashboard/polish-homepage-scroll
evavirseda Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/wallet-dashboard/app/(protected)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ function HomeDashboardPage(): JSX.Element {
<main className="flex flex-1 flex-col items-center space-y-8 py-md">
{connectionStatus === 'connected' && account && (
<>
<div className="home-page-grid-container h-full w-full">
<div className="home-page-grid-container w-full content-start">
<div style={{ gridArea: 'balance' }} className="flex grow overflow-hidden">
<AccountBalance />
</div>
<div style={{ gridArea: 'staking' }} className="flex grow overflow-hidden">
<StakingOverview />
</div>
{stardustMigrationEnabled && <MigrationOverview />}
<div style={{ gridArea: 'coins' }}>
<div style={{ gridArea: 'coins' }} className="flex grow overflow-hidden">
<MyCoins />
</div>
{supplyIncreaseVestingEnabled && <SupplyIncreaseVestingOverview />}
Expand Down
37 changes: 13 additions & 24 deletions apps/wallet-dashboard/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,23 @@ body {
height: 200px;
}
}
.home-page-grid-container:has(.with-vesting) {
@apply grid grid-cols-1 gap-lg;
.home-page-grid-container:has(.with-vesting):not(:has(.with-migration)) {
grid-template-areas:
'balance'
'staking'
'vesting'
'coins'
'activity';

&
> *:where(
[style*='grid-area: balance'],
[style*='grid-area: staking'],
[style*='grid-area: migration']
) {
height: 200px;
}
}
.home-page-grid-container:has(.with-migration) {
.home-page-grid-container:has(.with-migration):not(:has(.with-vesting)) {
grid-template-areas:
'balance'
'staking'
'migration'
'coins'
'activity';
}
.home-page-grid-container:has(.with-migration),
.home-page-grid-container:has(.with-vesting) {
.home-page-grid-container:has(.with-migration):has(.with-vesting) {
grid-template-areas:
'balance'
'staking'
Expand All @@ -81,24 +70,22 @@ body {
'coins coins'
'activity activity';
}
.home-page-grid-container:has(.with-vesting) {
@apply grid-cols-2;
.home-page-grid-container:has(.with-vesting):not(:has(.with-migration)) {
grid-template-areas:
'balance balance'
'staking staking'
'vesting vesting'
'coins coins'
'activity activity';
}
.home-page-grid-container:has(.with-migration) {
.home-page-grid-container:has(.with-migration):not(:has(.with-vesting)) {
grid-template-areas:
'balance balance'
'staking migration'
'coins coins'
'activity activity';
}
.home-page-grid-container:has(.with-migration),
.home-page-grid-container:has(.with-vesting) {
.home-page-grid-container:has(.with-migration):has(.with-vesting) {
grid-template-areas:
'balance balance'
'staking migration'
Expand All @@ -110,25 +97,27 @@ body {

@screen md {
.home-page-grid-container {
min-height: 700px;
height: calc(100vh - 140px);
begonaalvarezd marked this conversation as resolved.
Show resolved Hide resolved
@apply grid-cols-3;
grid-template-areas:
'balance staking staking'
'coins activity activity';
}
.home-page-grid-container:has(.with-vesting) {
.home-page-grid-container:has(.with-vesting):not(:has(.with-migration)) {
grid-template-areas:
'balance staking staking'
'coins vesting vesting'
'coins activity activity';
}
.home-page-grid-container:has(.with-migration) {
@apply grid-cols-3;

.home-page-grid-container:has(.with-migration):not(:has(.with-vesting)) {
grid-template-areas:
'balance staking migration'
'coins activity activity';
}
.home-page-grid-container:has(.with-migration),
.home-page-grid-container:has(.with-vesting) {

.home-page-grid-container:has(.with-migration):has(.with-vesting) {
grid-template-areas:
'balance staking migration'
'coins vesting vesting'
Expand Down
64 changes: 31 additions & 33 deletions apps/wallet-dashboard/components/coins/MyCoins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ function MyCoins(): React.JSX.Element {

return (
<Panel>
<div className="flex w-full flex-col">
<div className="flex h-full w-full flex-col">
<Title title="My Coins" />
<div className="px-sm pb-md pt-sm">
<div className="px-sm py-sm">
<div className="inline-flex">
<SegmentedButton type={SegmentedButtonType.Filled}>
{TOKEN_CATEGORIES.map(({ label, value }) => {
Expand All @@ -96,37 +96,35 @@ function MyCoins(): React.JSX.Element {
})}
</SegmentedButton>
</div>
<div className="pb-md pt-sm">
{[TokenCategory.All, TokenCategory.Recognized].includes(
selectedTokenCategory,
) &&
recognized?.map((coin, index) => {
return (
<CoinItem
key={index}
coinType={coin.coinType}
balance={BigInt(coin.totalBalance)}
onClick={() => openSendTokenDialog(coin)}
icon={
<RecognizedBadge className="h-4 w-4 text-primary-40" />
}
/>
);
})}
{[TokenCategory.All, TokenCategory.Unrecognized].includes(
selectedTokenCategory,
) &&
unrecognized?.map((coin, index) => {
return (
<CoinItem
key={index}
coinType={coin.coinType}
balance={BigInt(coin.totalBalance)}
onClick={() => openSendTokenDialog(coin)}
/>
);
})}
</div>
</div>
<div className="h-full overflow-y-auto px-sm pb-md pt-sm">
{[TokenCategory.All, TokenCategory.Recognized].includes(
selectedTokenCategory,
) &&
recognized?.map((coin, index) => {
return (
<CoinItem
key={index}
coinType={coin.coinType}
balance={BigInt(coin.totalBalance)}
onClick={() => openSendTokenDialog(coin)}
icon={<RecognizedBadge className="h-4 w-4 text-primary-40" />}
/>
);
})}
{[TokenCategory.All, TokenCategory.Unrecognized].includes(
selectedTokenCategory,
) &&
unrecognized?.map((coin, index) => {
return (
<CoinItem
key={index}
coinType={coin.coinType}
balance={BigInt(coin.totalBalance)}
onClick={() => openSendTokenDialog(coin)}
/>
);
})}
</div>
</div>
{selectedCoin && activeAccountAddress && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function TransactionsOverview() {
return (
<Panel>
<Title title="Activity" />
<div className="px-sm pb-md pt-sm">
<div className="h-full overflow-y-auto px-sm pb-md pt-sm">
<TransactionsList />
</div>
</Panel>
Expand Down
Loading