From 0ff3844f18a09c9a96267ca3040b2ffebeae0b49 Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Fri, 26 Jul 2024 17:47:13 +0200 Subject: [PATCH 1/3] chore: translation typo (#1255) chore: translation typo ## Summary by CodeRabbit - **New Features** - Enhanced the `Header` component for improved internationalization by enabling translation of the "Documentation" text. - **Documentation** - Added comments in translation files to link translation entries to the `Header` component, improving maintainability and traceability for future updates. --- apps/marketing/src/components/(marketing)/header.tsx | 2 +- packages/lib/translations/de/marketing.po | 1 + packages/lib/translations/en/marketing.po | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/marketing/src/components/(marketing)/header.tsx b/apps/marketing/src/components/(marketing)/header.tsx index 2dbe8f8f3..fa1ede8ef 100644 --- a/apps/marketing/src/components/(marketing)/header.tsx +++ b/apps/marketing/src/components/(marketing)/header.tsx @@ -47,7 +47,7 @@ export const Header = ({ className, ...props }: HeaderProps) => { className="text-muted-foreground hover:text-muted-foreground/80 text-sm font-semibold" target="_blank" > - Documentation + Documentation finally open source." msgstr "Unterschriften,<0/>endlich Open Source." #: apps/marketing/src/components/(marketing)/footer.tsx:33 +#: apps/marketing/src/components/(marketing)/header.tsx:50 #: apps/marketing/src/components/(marketing)/mobile-navigation.tsx:28 msgid "Documentation" msgstr "Dokumentation" diff --git a/packages/lib/translations/en/marketing.po b/packages/lib/translations/en/marketing.po index 499a72ccb..913242f11 100644 --- a/packages/lib/translations/en/marketing.po +++ b/packages/lib/translations/en/marketing.po @@ -142,6 +142,7 @@ msgid "Document signing,<0/>finally open source." msgstr "Document signing,<0/>finally open source." #: apps/marketing/src/components/(marketing)/footer.tsx:33 +#: apps/marketing/src/components/(marketing)/header.tsx:50 #: apps/marketing/src/components/(marketing)/mobile-navigation.tsx:28 msgid "Documentation" msgstr "Documentation" From 71a8a3eaa66d4b6796ad1f65e39deb1ea9aa6978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roni=20=C3=84ik=C3=A4s?= Date: Mon, 29 Jul 2024 05:40:36 +0300 Subject: [PATCH 2/3] chore: rename "none" document access to "no restrictions" (#1138) ## Description Renames the "None" document access option to "No restrictions". --- .../document/document-global-auth-access-select.tsx | 8 ++++---- .../document/document-global-auth-action-select.tsx | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/ui/components/document/document-global-auth-access-select.tsx b/packages/ui/components/document/document-global-auth-access-select.tsx index f660d7c10..4704f80eb 100644 --- a/packages/ui/components/document/document-global-auth-access-select.tsx +++ b/packages/ui/components/document/document-global-auth-access-select.tsx @@ -20,7 +20,7 @@ export const DocumentGlobalAuthAccessSelect = forwardRef ( ), @@ -57,8 +57,8 @@ export const DocumentGlobalAuthAccessTooltip = () => ( Require account - The recipient must be signed in to view the document
  • - None - The document can be accessed directly by the URL sent to the - recipient + No restrictions - The document can be accessed directly by the URL sent + to the recipient
  • diff --git a/packages/ui/components/document/document-global-auth-action-select.tsx b/packages/ui/components/document/document-global-auth-action-select.tsx index bb04f91fb..b341f459c 100644 --- a/packages/ui/components/document/document-global-auth-action-select.tsx +++ b/packages/ui/components/document/document-global-auth-action-select.tsx @@ -20,7 +20,7 @@ export const DocumentGlobalAuthActionSelect = forwardRef ( ), @@ -70,7 +70,7 @@ export const DocumentGlobalAuthActionTooltip = () => ( their settings
  • - None - No authentication required + No restrictions - No authentication required
  • From f31caaab0819967b33e97365e6bbec980320afe2 Mon Sep 17 00:00:00 2001 From: rhit-daviscl <73263545+rhit-daviscl@users.noreply.github.com> Date: Sun, 28 Jul 2024 23:13:35 -0400 Subject: [PATCH 3/3] fix: truncation of titles to fix UI breaks (#1162) Updates various areas of the application to handle longer titles and content more gracefully. --- .../document-page-view-recent-activity.tsx | 7 ++++++- .../documents/[id]/document-page-view.tsx | 2 +- .../[id]/logs/document-logs-page-view.tsx | 2 +- .../app/(signing)/sign/[token]/name-field.tsx | 2 +- .../sign/[token]/signature-field.tsx | 2 +- .../sign/[token]/signing-page-view.tsx | 21 +++++++++++-------- .../components/(dashboard)/layout/header.tsx | 18 +++++++++++++++- packages/ui/primitives/avatar.tsx | 4 +++- packages/ui/primitives/dialog.tsx | 2 +- 9 files changed, 43 insertions(+), 17 deletions(-) diff --git a/apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recent-activity.tsx b/apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recent-activity.tsx index 1c632355a..048f50c37 100644 --- a/apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recent-activity.tsx +++ b/apps/web/src/app/(dashboard)/documents/[id]/document-page-view-recent-activity.tsx @@ -133,7 +133,12 @@ export const DocumentPageViewRecentActivity = ({ ))} -

    +

    {formatDocumentAuditLogAction(auditLog, userId).prefix} {' '} diff --git a/apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx b/apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx index 643534a5b..049b0cfdf 100644 --- a/apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx +++ b/apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx @@ -110,7 +110,7 @@ export const DocumentPageView = async ({ params, team }: DocumentPageViewProps) Documents -

    +

    {document.title} diff --git a/apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx b/apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx index 0556fcd2d..cf68173dc 100644 --- a/apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx +++ b/apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-page-view.tsx @@ -117,7 +117,7 @@ export const DocumentLogsPageView = async ({ params, team }: DocumentLogsPageVie Document -
    +

    {document.title} diff --git a/apps/web/src/app/(signing)/sign/[token]/name-field.tsx b/apps/web/src/app/(signing)/sign/[token]/name-field.tsx index f9c1f8edc..e4d13a603 100644 --- a/apps/web/src/app/(signing)/sign/[token]/name-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/name-field.tsx @@ -178,7 +178,7 @@ export const NameField = ({ field, recipient, onSignField, onUnsignField }: Name Sign as {recipient.name}{' '} - ({recipient.email}) +
    ({recipient.email})
    diff --git a/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx b/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx index 348f1abf3..6c1ef2bd2 100644 --- a/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/signature-field.tsx @@ -214,7 +214,7 @@ export const SignatureField = ({ Sign as {recipient.name}{' '} - ({recipient.email}) +
    ({recipient.email})
    diff --git a/apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx b/apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx index 11cf1d64a..d1382a278 100644 --- a/apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx +++ b/apps/web/src/app/(signing)/sign/[token]/signing-page-view.tsx @@ -20,7 +20,6 @@ import { ElementVisible } from '@documenso/ui/primitives/element-visible'; import { LazyPDFViewer } from '@documenso/ui/primitives/lazy-pdf-viewer'; import { DocumentReadOnlyFields } from '~/components/document/document-read-only-fields'; -import { truncateTitle } from '~/helpers/truncate-title'; import { CheckboxField } from './checkbox-field'; import { DateField } from './date-field'; @@ -46,24 +45,28 @@ export const SigningPageView = ({ fields, completedFields, }: SigningPageViewProps) => { - const truncatedTitle = truncateTitle(document.title); - const { documentData, documentMeta } = document; return (

    - {truncatedTitle} + {document.title}

    -

    - {document.User.name} ({document.User.email}) has invited you to{' '} - {recipient.role === RecipientRole.VIEWER && 'view'} - {recipient.role === RecipientRole.SIGNER && 'sign'} - {recipient.role === RecipientRole.APPROVER && 'approve'} this document. +

    + {document.User.name}

    +

    + ({document.User.email}) has invited you to{' '} + {recipient.role === RecipientRole.VIEWER && 'view'} + {recipient.role === RecipientRole.SIGNER && 'sign'} + {recipient.role === RecipientRole.APPROVER && 'approve'} this document. +

    { return () => window.removeEventListener('scroll', onScroll); }, []); + const pathname = usePathname(); + + const isPathTeamUrl = (teamUrl: string) => { + if (!pathname || !pathname.startsWith(`/t/`)) { + return false; + } + + return pathname.split('/')[2] === teamUrl; + }; + + const selectedTeam = teams?.find((team) => isPathTeamUrl(team.url)); + return (
    { -
    +
    diff --git a/packages/ui/primitives/avatar.tsx b/packages/ui/primitives/avatar.tsx index 63f94dd85..f8a018a6b 100644 --- a/packages/ui/primitives/avatar.tsx +++ b/packages/ui/primitives/avatar.tsx @@ -78,7 +78,9 @@ const AvatarWithText = ({ {avatarFallback} -
    +
    {primaryText} {secondaryText}
    diff --git a/packages/ui/primitives/dialog.tsx b/packages/ui/primitives/dialog.tsx index 66c186773..0b607aaf8 100644 --- a/packages/ui/primitives/dialog.tsx +++ b/packages/ui/primitives/dialog.tsx @@ -113,7 +113,7 @@ const DialogTitle = React.forwardRef< >(({ className, ...props }, ref) => ( ));