The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
fix: delay field tooltip scroll on envelope item switch (#2246)
Ephraim Duncan5d8b14719989
diff --git a/apps/remix/app/components/general/document-signing/document-signing-form.tsx b/apps/remix/app/components/general/document-signing/document-signing-form.tsxindex dcc947645..ce9ed53ae 100644--- a/apps/remix/app/components/general/document-signing/document-signing-form.tsx+++ b/apps/remix/app/components/general/document-signing/document-signing-form.tsx@@ -135,7 +135,7 @@ export const DocumentSigningForm = ({<div className="flex flex-col gap-4 md:flex-row"><Buttontype="button"- className="dark:bg-muted dark:hover:bg-muted/80 w-full bg-black/5 hover:bg-black/10"+ className="w-full bg-black/5 hover:bg-black/10 dark:bg-muted dark:hover:bg-muted/80"variant="secondary"size="lg"disabled={typeof window !== 'undefined' && window.history.length <= 1}@@ -166,7 +166,7 @@ export const DocumentSigningForm = ({) : recipient.role === RecipientRole.ASSISTANT ? (<><form onSubmit={assistantForm.handleSubmit(onAssistantFormSubmit)}>- <fieldset className="dark:bg-background border-border rounded-2xl border bg-white p-3">+ <fieldset className="rounded-2xl border border-border bg-white p-3 dark:bg-background"><Controllername="selectedSignerId"control={assistantForm.control}@@ -185,7 +185,7 @@ export const DocumentSigningForm = ({.map((r) => (<divkey={`${assistantSignersId}-${r.id}`}- className="bg-widget border-border relative flex flex-col gap-4 rounded-lg border p-4"+ className="relative flex flex-col gap-4 rounded-lg border border-border bg-widget p-4"><div className="flex items-center justify-between"><div className="flex items-center gap-3">@@ -203,15 +203,15 @@ export const DocumentSigningForm = ({{r.name}{r.id === recipient.id && (- <span className="text-muted-foreground ml-2">+ <span className="ml-2 text-muted-foreground">{_(msg`(You)`)}</span>)}</Label>- <p className="text-muted-foreground text-xs">{r.email}</p>+ <p className="text-xs text-muted-foreground">{r.email}</p></div></div>- <div className="text-muted-foreground text-xs leading-[inherit]">+ <div className="text-xs leading-[inherit] text-muted-foreground">{r.fields.length} {r.fields.length === 1 ? 'field' : 'fields'}</div></div>@@ -265,7 +265,7 @@ export const DocumentSigningForm = ({<Inputtype="text"id="full-name"- className="bg-background mt-2"+ className="mt-2 bg-background"value={fullName}onChange={(e) => setFullName(e.target.value.trimStart())}/>@@ -294,7 +294,7 @@ export const DocumentSigningForm = ({<div className="mt-6 flex flex-col gap-4 md:flex-row"><Buttontype="button"- className="dark:bg-muted dark:hover:bg-muted/80 w-full bg-black/5 hover:bg-black/10"+ className="w-full bg-black/5 hover:bg-black/10 dark:bg-muted dark:hover:bg-muted/80"variant="secondary"size="lg"disabled={typeof window !== 'undefined' && window.history.length <= 1}diff --git a/apps/remix/app/components/general/envelope-signing/envelope-signing-complete-dialog.tsx b/apps/remix/app/components/general/envelope-signing/envelope-signing-complete-dialog.tsxindex 8635b5ee9..58f487a4f 100644--- a/apps/remix/app/components/general/envelope-signing/envelope-signing-complete-dialog.tsx+++ b/apps/remix/app/components/general/envelope-signing/envelope-signing-complete-dialog.tsx@@ -57,17 +57,24 @@ export const EnvelopeSignerCompleteDialog = () => {return;}- if (nextField.envelopeItemId !== currentEnvelopeItem?.id) {+ const isEnvelopeItemSwitch = nextField.envelopeItemId !== currentEnvelopeItem?.id;++ if (isEnvelopeItemSwitch) {setCurrentEnvelopeItem(nextField.envelopeItemId);}- const fieldTooltip = document.querySelector(`#field-tooltip`);+ setShowPendingFieldTooltip(true);- if (fieldTooltip) {- fieldTooltip.scrollIntoView({ behavior: 'smooth', block: 'center' });- }+ setTimeout(+ () => {+ const fieldTooltip = document.querySelector(`#field-tooltip`);- setShowPendingFieldTooltip(true);+ if (fieldTooltip) {+ fieldTooltip.scrollIntoView({ behavior: 'smooth', block: 'center' });+ }+ },+ isEnvelopeItemSwitch ? 150 : 50,+ );};const handleOnCompleteClick = async (