From 278dfa3d77563bebc4eaec9beadf03503ce236ad Mon Sep 17 00:00:00 2001 From: ephraimduncan Date: Mon, 20 Apr 2026 18:57:43 +0000 Subject: [PATCH] chore: deslop bulk download dialog and action bar Merge duplicate lingui imports, drop redundant state-reset comment, simplify Select onValueChange to match codebase style, and remove broken tap-target span with invalid Tailwind 3.4 classes (pointer-fine:, -translate-1/2). --- .../envelopes-bulk-download-dialog.tsx | 24 +++++++------------ .../envelopes-table-bulk-action-bar.tsx | 6 +---- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/apps/remix/app/components/dialogs/envelopes-bulk-download-dialog.tsx b/apps/remix/app/components/dialogs/envelopes-bulk-download-dialog.tsx index 44f8ad02b..efe5cc55e 100644 --- a/apps/remix/app/components/dialogs/envelopes-bulk-download-dialog.tsx +++ b/apps/remix/app/components/dialogs/envelopes-bulk-download-dialog.tsx @@ -1,8 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { plural } from '@lingui/core/macro'; -import { Plural, useLingui } from '@lingui/react/macro'; -import { Trans } from '@lingui/react/macro'; +import { Plural, Trans, useLingui } from '@lingui/react/macro'; import { DocumentStatus } from '@prisma/client'; import type * as DialogPrimitive from '@radix-ui/react-dialog'; import { match } from 'ts-pattern'; @@ -40,8 +39,6 @@ export type EnvelopesBulkDownloadDialogProps = { onSuccess?: (successfulEnvelopeIds: string[]) => void; } & Omit; -type DownloadVersion = 'signed' | 'original'; - export const EnvelopesBulkDownloadDialog = ({ envelopes, open, @@ -52,7 +49,7 @@ export const EnvelopesBulkDownloadDialog = ({ const { t } = useLingui(); const { toast } = useToast(); - const [versionMap, setVersionMap] = useState>({}); + const [versionMap, setVersionMap] = useState>({}); const [progress, setProgress] = useState(0); const [isDownloading, setIsDownloading] = useState(false); @@ -74,7 +71,6 @@ export const EnvelopesBulkDownloadDialog = ({ ), ); setProgress(0); - // Only reset selections/progress when the dialog transitions to open. // eslint-disable-next-line react-hooks/exhaustive-deps }, [open]); @@ -105,10 +101,7 @@ export const EnvelopesBulkDownloadDialog = ({ } try { - const downloadVersion: DownloadVersion = - versionMap[envelope.id] === 'signed' && envelope.status === DocumentStatus.COMPLETED - ? 'signed' - : 'original'; + const downloadVersion = versionMap[envelope.id] ?? 'original'; const { data: envelopeItems } = await trpcUtils.envelope.item.getManyByToken.fetch({ envelopeId: envelope.id, @@ -225,11 +218,12 @@ export const EnvelopesBulkDownloadDialog = ({ {isCompleted && (