Skip to content

Commit 5872cc9

Browse files
authored
chore: more UI tweaks (#103)
* chore: animate the refresh button rendering * chore: fix double scroll bars * chore: fix typo * chore: adjust width of account activity tabs * chore: make table column headers more obvious * chore: use ipfs gateway for asset link href if applicable * chore: animation adjustments * chore: fix snapshots * chore: nav padding tweak * chore: override ws dependency * chore: more tweaks
1 parent 59dc025 commit 5872cc9

24 files changed

+70
-86
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,8 @@
158158
],
159159
"semantic-release-export-data"
160160
]
161+
},
162+
"overrides": {
163+
"ws@>7.0.0 <7.5.9": "7.5.10"
161164
}
162165
}

src/features/app-studio/pages/app-studio-page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function AppStudioPage() {
88
<PageTitle title={appStudioPageTitle} />
99
<div>
1010
<p>
11-
Comming soon!
11+
Coming soon!
1212
<br />
1313
In the meantime, we recommend{' '}
1414
<a href="https://app.dappflow.org/beaker-studio/" className="text-primary underline" rel="nofollow" target="_blank">

src/features/applications/components/application-details.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ export function ApplicationDetails({ application }: Props) {
140140
<h2>{applicationTransactionsLabel}</h2>
141141
<Tabs defaultValue={applicationLiveTransactionsTabId}>
142142
<TabsList aria-label={applicationTransactionsLabel}>
143-
<TabsTrigger className="w-48" value={applicationLiveTransactionsTabId}>
143+
<TabsTrigger className="w-56" value={applicationLiveTransactionsTabId}>
144144
{applicationLiveTransactionsTabLabel}
145145
</TabsTrigger>
146-
<TabsTrigger className="w-48" value={applicationHistoricalTransactionsTabId}>
146+
<TabsTrigger className="w-56" value={applicationHistoricalTransactionsTabId}>
147147
{applicationHistoricalTransactionsTabLabel}
148148
</TabsTrigger>
149149
</TabsList>

src/features/assets/components/asset-details.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { AssetTransactionHistory } from './asset-transaction-history'
3636
import { AssetLiveTransactions } from './asset-live-transactions'
3737
import { OverflowAutoTabsContent, Tabs, TabsList, TabsTrigger } from '@/features/common/components/tabs'
3838
import { OpenJsonViewDialogButton } from '@/features/common/components/json-view-dialog-button'
39+
import { replaceIpfsWithGatewayIfNeeded } from '../utils/replace-ipfs-with-gateway-if-needed'
3940

4041
type Props = {
4142
asset: Asset
@@ -90,7 +91,7 @@ export function AssetDetails({ asset }: Props) {
9091
? {
9192
dt: assetUrlLabel,
9293
dd: (
93-
<a href={asset.url} className={cn('text-primary underline')} rel="nofollow" target="_blank">
94+
<a href={replaceIpfsWithGatewayIfNeeded(asset.url)} className={cn('text-primary underline')} rel="nofollow" target="_blank">
9495
{asset.url}
9596
</a>
9697
),

src/features/blocks/components/latest-blocks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function LatestBlocks() {
1717
<ul>
1818
{latestBlocks.map((block) => (
1919
<li key={block.round} className="border-b last:border-0">
20-
<BlockLink round={block.round} className="flex p-3.5 text-sm animate-in fade-in-0 zoom-in-90 hover:bg-accent">
20+
<BlockLink round={block.round} className="flex p-3.5 text-sm animate-in fade-in-20 hover:bg-accent">
2121
<Box className="hidden text-primary sm:max-lg:block xl:block" />
2222
<div className={cn('mx-2')}>
2323
<h3 className={cn('leading-none mb-2')}>{block.round}</h3>

src/features/common/components/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { cva, type VariantProps } from 'class-variance-authority'
55
import { cn } from '@/features/common/utils'
66

77
const buttonVariants = cva(
8-
'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
8+
'relative inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
99
{
1010
variants: {
1111
variant: {

src/features/common/components/data-table.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ export function DataTable<TData, TValue>({ columns, data, getSubRows, subRowsExp
4040

4141
return (
4242
<div>
43-
<div className="grid border-y">
44-
<Table>
43+
<div className="grid">
44+
<Table className="border-b">
4545
<TableHeader>
4646
{table.getHeaderGroups().map((headerGroup) => (
47-
<TableRow key={headerGroup.id}>
47+
<TableRow key={headerGroup.id} className="border-t bg-muted/50">
4848
{headerGroup.headers.map((header) => {
4949
return (
5050
<TableHead key={header.id}>

src/features/common/components/lazy-load-data-table/lazy-load-data-table.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ export function LazyLoadDataTable<TData, TValue>({ columns, createLoadablePage,
5353

5454
return (
5555
<div>
56-
<div className="grid border-y">
57-
<Table>
56+
<div className="grid">
57+
<Table className="border-b">
5858
<TableHeader>
5959
{table.getHeaderGroups().map((headerGroup) => (
60-
<TableRow key={headerGroup.id}>
60+
<TableRow key={headerGroup.id} className="border-t bg-muted/50">
6161
{headerGroup.headers.map((header) => {
6262
return (
6363
<TableHead key={header.id}>

src/features/common/components/refresh-button.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ export const refreshButtonLabel = 'Refresh'
99

1010
export function RefreshButton({ onClick }: Props) {
1111
return (
12-
<Button onClick={onClick} variant="outline" size="icon" aria-label={refreshButtonLabel} className="ml-auto">
13-
<RefreshCw className="size-[1.2rem]" />
12+
<Button
13+
onClick={onClick}
14+
variant="outline"
15+
size="icon"
16+
aria-label={refreshButtonLabel}
17+
className="ml-auto animate-in fade-in-0 zoom-in-90"
18+
>
1419
<span className="sr-only">{refreshButtonLabel}</span>
20+
<RefreshCw className="size-[1.2rem]" />
1521
</Button>
1622
)
1723
}

0 commit comments

Comments
 (0)