diff --git a/apps/renterd/contexts/contracts/columns.tsx b/apps/renterd/contexts/contracts/columns.tsx
index a25820b26..ed567e982 100644
--- a/apps/renterd/contexts/contracts/columns.tsx
+++ b/apps/renterd/contexts/contracts/columns.tsx
@@ -192,37 +192,37 @@ export const columns: ContractsTableColumn[] = [
content={
-
+
pending
-
+
Contract has been added.
-
+
active
-
+
Contract has appeared on chain.
-
+
complete
-
+
Storage proof has appeared on chain.
-
+
failed
-
+
Storage proof was not submitted before the end of proof
window.
diff --git a/apps/renterd/contexts/uploads/index.tsx b/apps/renterd/contexts/uploads/index.tsx
index 3a4068300..73466f877 100644
--- a/apps/renterd/contexts/uploads/index.tsx
+++ b/apps/renterd/contexts/uploads/index.tsx
@@ -40,6 +40,11 @@ function useUploadsMain() {
const response = useMultipartUploadListUploads({
disabled: !activeBucket,
payload: payload as MultipartUploadListUploadsPayload,
+ config: {
+ swr: {
+ keepPreviousData: true,
+ },
+ },
})
const abortAll = useCallback(async () => {
@@ -64,9 +69,9 @@ function useUploadsMain() {
)
}, [response.data, apiBusUploadAbort, activeBucket, uploadsMap])
- const dataset: ObjectUploadData[] | undefined = useMemo(() => {
+ const dataset: ObjectUploadData[] = useMemo(() => {
if (!response.data?.uploads || !activeBucket?.name) {
- return undefined
+ return []
}
return response.data.uploads.map((upload) => {
const id = upload.uploadID
diff --git a/apps/renterd/dialogs/FilesBucketCreateDialog.tsx b/apps/renterd/dialogs/FilesBucketCreateDialog.tsx
index fd10907af..951adb080 100644
--- a/apps/renterd/dialogs/FilesBucketCreateDialog.tsx
+++ b/apps/renterd/dialogs/FilesBucketCreateDialog.tsx
@@ -1,5 +1,4 @@
import {
- Paragraph,
Dialog,
triggerErrorToast,
triggerSuccessToast,
@@ -77,6 +76,7 @@ export function FilesBucketCreateDialog({
return (
diff --git a/apps/website/components/Map/Globe.tsx b/apps/website/components/Map/Globe.tsx
index d2504e1d9..c90d42479 100644
--- a/apps/website/components/Map/Globe.tsx
+++ b/apps/website/components/Map/Globe.tsx
@@ -149,7 +149,9 @@ export function Globe({
pointAltitude={(h: SiaCentralPartialHost) => {
let radius = 0
radius = h.settings.total_storage / 1e15
- return Math.max(radius, 0.005)
+ const minSize = 0.005
+ const maxSize = 0.1
+ return Math.min(Math.max(radius, minSize), maxSize)
}}
pointsTransitionDuration={0}
pointColor={(h: SiaCentralPartialHost) =>
@@ -160,7 +162,9 @@ export function Globe({
pointRadius={(h: SiaCentralPartialHost) => {
let radius = 0
radius = h.settings.total_storage / 1e13 / 3
- return Math.max(radius, 0.2)
+ const minSize = 0.2
+ const maxSize = 2
+ return Math.min(Math.max(radius, minSize), maxSize)
}}
onPointHover={(h: SiaCentralPartialHost) => {
if (!h) {
diff --git a/libs/design-system/package.json b/libs/design-system/package.json
index f4f3e6041..b2deff040 100644
--- a/libs/design-system/package.json
+++ b/libs/design-system/package.json
@@ -12,6 +12,7 @@
"@siafoundation/units": "^3.2.0",
"@siafoundation/types": "^0.6.0",
"@siafoundation/next": "^0.1.3",
+ "@radix-ui/react-visually-hidden": "^1.1.0",
"swr": "^2.1.1",
"class-variance-authority": "^0.7.0",
"bignumber.js": "^9.0.2",
diff --git a/libs/design-system/src/app/SyncerConnectPeerDialog.tsx b/libs/design-system/src/app/SyncerConnectPeerDialog.tsx
index 057ff5c37..544414703 100644
--- a/libs/design-system/src/app/SyncerConnectPeerDialog.tsx
+++ b/libs/design-system/src/app/SyncerConnectPeerDialog.tsx
@@ -1,6 +1,5 @@
'use client'
-import { Paragraph } from '../core/Paragraph'
import { triggerErrorToast, triggerSuccessToast } from '../lib/toast'
import { Response } from '@siafoundation/react-core'
import { Dialog } from '../core/Dialog'
@@ -80,6 +79,7 @@ export function SyncerConnectPeerDialog({
diff --git a/libs/design-system/src/app/WalletBalanceTip.tsx b/libs/design-system/src/app/WalletBalanceTip.tsx
index 03b5af568..bda24841b 100644
--- a/libs/design-system/src/app/WalletBalanceTip.tsx
+++ b/libs/design-system/src/app/WalletBalanceTip.tsx
@@ -29,8 +29,10 @@ export function WalletBalanceTip({
- spendable
- All confirmed outputs not in-use.
+ spendable
+
+ All confirmed outputs not in-use.
+
- immature
-
+ immature
+
All confirmed but still locked outputs.
@@ -63,8 +65,10 @@ export function WalletBalanceTip({
- confirmed
- All confirmed outputs.
+ confirmed
+
+ All confirmed outputs.
+
- unconfirmed
- All unconfirmed outputs not in-use.
+ unconfirmed
+
+ All unconfirmed outputs not in-use.
+
({
id,
width,
height,
accessors,
+ useAnimatedComponents,
animationTrajectory,
curve,
data,
@@ -104,11 +106,15 @@ export function ChartXYGraph({
)
})}
{renderBarStack && (
@@ -190,10 +196,14 @@ export function ChartXYGraph({
>
)}
humanDate(d)}
tickLength={12}
tickLabelProps={(p) => ({
@@ -206,7 +216,12 @@ export function ChartXYGraph({
})}
/>
({
numTicks={numTicks}
tickLength={12}
// rangePadding={0}
- animationTrajectory={animationTrajectory}
// values don't make sense in stream graph
// tickFormat={stackOffset === 'wiggle' ? () => '' : undefined}
tickFormat={config.formatTickY}
@@ -402,3 +416,22 @@ export function getColor(
? `url(#pattern-${idKey})`
: `url(#gradient-${idKey})`
}
+
+function getAnimationProps({
+ key,
+ useAnimatedComponents,
+ animationTrajectory,
+}: {
+ key: string
+ useAnimatedComponents: boolean
+ animationTrajectory?: AnimationTrajectory
+}) {
+ return useAnimatedComponents && animationTrajectory
+ ? {
+ key: `${key}-${animationTrajectory}`,
+ animationTrajectory,
+ }
+ : {
+ key,
+ }
+}
diff --git a/libs/design-system/src/components/ChartXY/useChartXY.tsx b/libs/design-system/src/components/ChartXY/useChartXY.tsx
index 9d926783f..0ccb1e87c 100644
--- a/libs/design-system/src/components/ChartXY/useChartXY.tsx
+++ b/libs/design-system/src/components/ChartXY/useChartXY.tsx
@@ -250,6 +250,7 @@ export function useChartXY(
return {
id,
accessors,
+ useAnimatedComponents,
animationTrajectory,
config,
scales,
diff --git a/libs/design-system/src/components/Table/index.tsx b/libs/design-system/src/components/Table/index.tsx
index c79ace26e..3af57d12c 100644
--- a/libs/design-system/src/components/Table/index.tsx
+++ b/libs/design-system/src/components/Table/index.tsx
@@ -201,7 +201,7 @@ export function Table<
>
diff --git a/libs/design-system/src/core/Dialog.tsx b/libs/design-system/src/core/Dialog.tsx
index c9070500d..d604e48b1 100644
--- a/libs/design-system/src/core/Dialog.tsx
+++ b/libs/design-system/src/core/Dialog.tsx
@@ -5,6 +5,7 @@ import { cva, cx } from 'class-variance-authority'
import { panelStyles } from './Panel'
import { useOpen } from '../hooks/useOpen'
import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'
+import * as VisuallyHidden from '@radix-ui/react-visually-hidden'
import * as DialogPrimitive from '@radix-ui/react-dialog'
import { Close24 } from '@siafoundation/react-icons'
import { Button } from './Button'
@@ -54,7 +55,9 @@ export const Dialog = React.forwardRef<
onOpenChange: _onOpenChange,
onSubmit,
title,
+ titleVisuallyHidden,
description,
+ descriptionVisuallyHidden,
containerVariants,
contentVariants,
controls,
@@ -90,7 +93,16 @@ export const Dialog = React.forwardRef<
{open ? (
-
+
onOpenChange(false)}
@@ -155,6 +167,8 @@ type ContentProps = {
onSubmit?: React.FormEventHandler
title?: React.ReactNode
description?: React.ReactNode
+ titleVisuallyHidden?: boolean
+ descriptionVisuallyHidden?: boolean
controls?: React.ReactNode
children?: React.ReactNode
contentVariants?: VariantProps
@@ -170,6 +184,8 @@ const Content = React.forwardRef(
onSubmit,
title,
description,
+ titleVisuallyHidden,
+ descriptionVisuallyHidden,
controls,
contentVariants,
closeClassName,
@@ -195,13 +211,19 @@ const Content = React.forwardRef(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
className={contentStyles(contentVariants as any)}
>
- {title && (
-
- {title}
-
- )}
+ {title ? (
+ titleVisuallyHidden ? (
+
+ {title}
+
+ ) : (
+
+ {title}
+
+ )
+ ) : null}
(
}}
>
- {description && (
-
- {description}
-
- )}
+ {description ? (
+ descriptionVisuallyHidden ? (
+
+
+ {description}
+
+
+ ) : (
+
+ {description}
+
+ )
+ ) : null}
{children}
diff --git a/libs/design-system/src/core/Tooltip.tsx b/libs/design-system/src/core/Tooltip.tsx
index e6d7e102f..d8e9d47b3 100644
--- a/libs/design-system/src/core/Tooltip.tsx
+++ b/libs/design-system/src/core/Tooltip.tsx
@@ -14,6 +14,8 @@ type TooltipProps = Omit<
'content'
> & {
children: React.ReactElement
+ /** The content to display in the tooltip.
+ * If a string or React.Fragment is passed the content will be wrapped in a Paragraph. */
content: React.ReactNode
}
@@ -44,6 +46,7 @@ export function Tooltip({
open: _open,
onOpenChange: _onOpenChange,
})
+
return (
- {content}
+ {typeof content === 'string' || Array.isArray(content) ? (
+ {content}
+ ) : (
+ content
+ )}
diff --git a/package-lock.json b/package-lock.json
index a6a59c544..34e4b5b6b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -37,6 +37,7 @@
"@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-tooltip": "1.0.0",
+ "@radix-ui/react-visually-hidden": "^1.1.0",
"@react-spring/web": "^9.7.3",
"@siacentral/ledgerjs-sia": "^1.1.0",
"@tailwindcss/container-queries": "^0.1.1",
diff --git a/package.json b/package.json
index 8e189face..9fdbf3e88 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,7 @@
"@radix-ui/react-switch": "^1.1.1",
"@radix-ui/react-tabs": "^1.1.1",
"@radix-ui/react-tooltip": "1.0.0",
+ "@radix-ui/react-visually-hidden": "^1.1.0",
"@react-spring/web": "^9.7.3",
"@siacentral/ledgerjs-sia": "^1.1.0",
"@tailwindcss/container-queries": "^0.1.1",