Skip to content

Commit

Permalink
feat: new design (#96)
Browse files Browse the repository at this point in the history
* chore: initial styling adjustments
* chore: dark mode
* chore: refactor the transaction component hierarchy
* chore: outline button base tweaks
* chore: style header, sidebar and make content scrollable
* chore: tweak description list spacing
* chore: responsive latest block and transactions
* chore: remove default badge margin
  • Loading branch information
neilcampbell authored Jun 15, 2024
1 parent 57efbe9 commit 9b97688
Show file tree
Hide file tree
Showing 193 changed files with 1,036 additions and 1,354 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Algorand Studio</title>
</head>
<body>
<div id="root" class="flex justify-center"></div>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"postinstall": "patch-package"
},
"dependencies": {
"@algorandfoundation/algokit-subscriber": "^1.3.0",
"@algorandfoundation/algokit-subscriber": "^1.3.1",
"@algorandfoundation/algokit-utils": "^6.0.4",
"@blockshake/defly-connect": "^1.1.6",
"@daffiwallet/connect": "^1.0.3",
Expand Down
Binary file not shown.
Binary file added public/fonts/RobotoMono-cyrillic-ext.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-cyrillic.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-greek.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-italic-cyrillic-ext.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-italic-cyrillic.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-italic-greek.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-italic-latin-ext.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-italic-vietnamese.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-latin-ext.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-latin.woff2
Binary file not shown.
Binary file added public/fonts/RobotoMono-vietnamese.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-100-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-100-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-100-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-100-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-100-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-100-normal-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-200-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-200-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-200-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-200-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-200-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-200-normal-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-300-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-300-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-300-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-300-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-300-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-300-normal-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-400-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-400-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-400-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-400-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-400-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-400-normal-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-500-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-500-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-500-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-500-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-500-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-500-normal-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-600-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-600-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-600-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-600-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-600-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-600-normal-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-700-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-700-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-700-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-700-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-700-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-700-normal-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-800-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-800-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-800-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-800-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-800-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-800-normal-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-900-italic-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-900-italic-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-900-italic-latin.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-900-normal-devanagari.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-900-normal-latin-ext.woff2
Binary file not shown.
Binary file removed public/fonts/poppins-900-normal-latin.woff2
Binary file not shown.
26 changes: 13 additions & 13 deletions src/App.routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,71 +32,71 @@ export const routes = evalTemplates([
errorElement: <ErrorPage title={explorePageTitle} />,
},
{
template: Urls.Network,
template: Urls.Explore,
element: (
<NetworkPage>
<Outlet />
</NetworkPage>
),
children: [
{
template: Urls.Network,
template: Urls.Explore,
element: <ExplorePage />,
errorElement: <ErrorPage title={explorePageTitle} />,
},
{
template: Urls.Network.Transaction.ById,
template: Urls.Explore.Transaction.ById,
errorElement: <ErrorPage title={transactionPageTitle} />,
children: [
{
template: Urls.Network.Transaction.ById,
template: Urls.Explore.Transaction.ById,
element: <TransactionPage />,
},
{
template: Urls.Network.Transaction.ById.Inner.ById,
template: Urls.Explore.Transaction.ById.Inner.ById,
element: <InnerTransactionPage />,
},
],
},
{
template: Urls.Network.Block.ByRound,
template: Urls.Explore.Block.ByRound,
children: [
{
template: Urls.Network.Block.ByRound,
template: Urls.Explore.Block.ByRound,
errorElement: <ErrorPage title={blockPageTitle} />,
element: <BlockPage />,
},
{
template: Urls.Network.Block.ByRound.Group.ById,
template: Urls.Explore.Block.ByRound.Group.ById,
errorElement: <ErrorPage title={groupPageTitle} />,
element: <GroupPage />,
},
],
},
{
template: Urls.Network.Account.ByAddress,
template: Urls.Explore.Account.ByAddress,
element: <AccountPage />,
errorElement: <ErrorPage title={accountPageTitle} />,
},
{
template: Urls.Network.Asset.ById,
template: Urls.Explore.Asset.ById,
element: <AssetPage />,
errorElement: <ErrorPage title={assetPageTitle} />,
},
{
template: Urls.Network.Application.ById,
template: Urls.Explore.Application.ById,
errorElement: <ErrorPage title={applicationPageTitle} />,
element: <ApplicationPage />,
},
{
template: Urls.Network.Tx,
template: Urls.Explore.Tx,
element: <TxPage />,
},
],
},
{
template: Urls.AppStudio,
element: <div>App Studio</div>,
element: <ErrorPage title="App Studio" />,
},
{
template: Urls.Settings,
Expand Down
6 changes: 0 additions & 6 deletions src/assets/icons/block.svg

This file was deleted.

6 changes: 0 additions & 6 deletions src/assets/icons/code-block.svg

This file was deleted.

11 changes: 0 additions & 11 deletions src/assets/icons/cog.svg

This file was deleted.

6 changes: 0 additions & 6 deletions src/assets/icons/home.svg

This file was deleted.

6 changes: 0 additions & 6 deletions src/assets/icons/transaction.svg

This file was deleted.

6 changes: 0 additions & 6 deletions src/assets/icons/wallet.svg

This file was deleted.

5 changes: 2 additions & 3 deletions src/features/accounts/components/account-activity-tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { OverflowAutoTabsContent, Tabs, TabsList, TabsTrigger } from '@/features/common/components/tabs'
import { cn } from '@/features/common/utils'
import { useMemo } from 'react'
import { Account } from '../models'
import { AccountTransactionHistory } from './account-transaction-history'
Expand Down Expand Up @@ -36,13 +35,13 @@ export function AccountActivityTabs({ account }: Props) {
<Tabs defaultValue={accountLiveTransactionsTabId}>
<TabsList aria-label={accountActivityLabel}>
{tabs.map((tab) => (
<TabsTrigger key={tab.id} className={cn('data-[state=active]:border-primary data-[state=active]:border-b-2 w-44')} value={tab.id}>
<TabsTrigger key={tab.id} className="w-56" value={tab.id}>
{tab.label}
</TabsTrigger>
))}
</TabsList>
{tabs.map((tab) => (
<OverflowAutoTabsContent key={tab.id} value={tab.id} className={cn('border-solid border-2 border-border')}>
<OverflowAutoTabsContent key={tab.id} value={tab.id}>
<div className="grid">
<div className="overflow-auto p-4">{tab.children}</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions src/features/accounts/components/account-application-tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { OverflowAutoTabsContent, Tabs, TabsList, TabsTrigger } from '@/features/common/components/tabs'
import { cn } from '@/features/common/utils'
import { Tabs, OverflowAutoTabsContent, TabsList, TabsTrigger } from '@/features/common/components/tabs'
import { useMemo } from 'react'
import { Account } from '../models'
import {
Expand Down Expand Up @@ -35,13 +34,13 @@ export function AccountApplicationTabs({ account }: Props) {
<Tabs defaultValue={accountCreatedApplicationsTabId}>
<TabsList aria-label={accountApplicationLabel}>
{tabs.map((tab) => (
<TabsTrigger key={tab.id} className={cn('data-[state=active]:border-primary data-[state=active]:border-b-2 w-36')} value={tab.id}>
<TabsTrigger key={tab.id} className="w-36" value={tab.id}>
{tab.label}
</TabsTrigger>
))}
</TabsList>
{tabs.map((tab) => (
<OverflowAutoTabsContent key={tab.id} value={tab.id} className={cn('border-solid border-2 border-border')}>
<OverflowAutoTabsContent key={tab.id} value={tab.id}>
<div className="grid">
<div className="overflow-auto p-4">{tab.children}</div>
</div>
Expand Down
7 changes: 3 additions & 4 deletions src/features/accounts/components/account-asset-tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { OverflowAutoTabsContent, Tabs, TabsList, TabsTrigger } from '@/features/common/components/tabs'
import { cn } from '@/features/common/utils'
import { Tabs, OverflowAutoTabsContent, TabsList, TabsTrigger } from '@/features/common/components/tabs'
import { useMemo } from 'react'
import { AccountAssetsHeld } from './account-assets-held'
import { Account } from '../models'
Expand Down Expand Up @@ -44,13 +43,13 @@ export function AccountAssetTabs({ account }: Props) {
<Tabs defaultValue={accountHeldAssetsTabId}>
<TabsList aria-label={accountAssetLabel}>
{tabs.map((tab) => (
<TabsTrigger key={tab.id} className={cn('data-[state=active]:border-primary data-[state=active]:border-b-2 w-36')} value={tab.id}>
<TabsTrigger key={tab.id} className="w-36" value={tab.id}>
{tab.label}
</TabsTrigger>
))}
</TabsList>
{tabs.map((tab) => (
<OverflowAutoTabsContent key={tab.id} value={tab.id} className={cn('border-solid border-2 border-border')}>
<OverflowAutoTabsContent key={tab.id} value={tab.id}>
<div className="grid">
<div className="overflow-auto p-4">{tab.children}</div>
</div>
Expand Down
20 changes: 7 additions & 13 deletions src/features/accounts/components/account-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,25 @@ type Props = {

export function AccountDetails({ account }: Props) {
return (
<div className={cn('space-y-6 pt-7')}>
<div className={cn('space-y-4')}>
<AccountInfo account={account} />
<Card className={cn('p-4')}>
<CardContent className={cn('text-sm space-y-2')}>
<h1 className={cn('text-2xl text-primary font-bold')}>{accountActivityLabel}</h1>
<div className={cn('border-solid border-2 border-border grid grid-cols-[1fr_max-content]')}>
<AccountActivityTabs account={account} />
</div>
<h2>{accountActivityLabel}</h2>
<AccountActivityTabs account={account} />
</CardContent>
</Card>

<Card className={cn('p-4')}>
<CardContent className={cn('text-sm space-y-2')}>
<h1 className={cn('text-2xl text-primary font-bold')}>{accountAssetLabel}</h1>
<div className={cn('border-solid border-2 border-border grid')}>
<AccountAssetTabs account={account} />
</div>
<h2>{accountAssetLabel}</h2>
<AccountAssetTabs account={account} />
</CardContent>
</Card>
<Card className={cn('p-4')}>
<CardContent className={cn('text-sm space-y-2')}>
<h1 className={cn('text-2xl text-primary font-bold')}>{accountApplicationLabel}</h1>
<div className={cn('border-solid border-2 border-border grid')}>
<AccountApplicationTabs account={account} />
</div>
<h2>{accountApplicationLabel}</h2>
<AccountApplicationTabs account={account} />
</CardContent>
</Card>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/features/accounts/components/account-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const AccountLink = fixedForwardRef(
<>
<TemplatedNavLink
className={cn(!children && 'text-primary underline', className)}
urlTemplate={Urls.Network.Account.ByAddress}
urlTemplate={Urls.Explore.Account.ByAddress}
urlParams={{ address, networkId: selectedNetwork }}
ref={ref}
{...rest}
Expand Down
Loading

0 comments on commit 9b97688

Please sign in to comment.