[PR #780] [MERGED] feat: improve the UX for password protected documents #1175

Closed
opened 2026-02-26 19:32:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/780
Author: @harkiratsm
Created: 12/22/2023
Status: Merged
Merged: 1/17/2024
Merged by: @Mythie

Base: mainHead: harkirat/Protect


📝 Commits (8)

  • 2ae9e29 feat: improve the ux for password protected documents
  • 72a7dc6 fix the console error
  • 53c5701 fix lint, description of dialog
  • d8cbe1d Merge branch 'main' into harkirat/Protect
  • eeb6a07 Merge branch 'main' into harkirat/Protect
  • 68953d1 feat add documentPassword to documenet meta and improve the ux
  • a94b829 fix: tidy code
  • 91dd10e fix: add symmetric encryption to document passwords

📊 Changes

13 files changed (+316 additions, -58 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/[id]/edit-document.tsx (+19 -2)
📝 apps/web/src/app/(dashboard)/documents/[id]/page.tsx (+27 -2)
📝 apps/web/src/app/(signing)/sign/[token]/page.tsx (+25 -1)
📝 package-lock.json (+2 -1)
📝 packages/lib/server-only/document-meta/upsert-document-meta.ts (+8 -4)
📝 packages/lib/server-only/document/duplicate-document-by-id.ts (+1 -0)
packages/prisma/migrations/20240115031508_add_password_to_document_meta/migration.sql (+2 -0)
📝 packages/prisma/schema.prisma (+1 -0)
📝 packages/trpc/server/document-router/router.ts (+35 -0)
📝 packages/trpc/server/document-router/schema.ts (+9 -0)
📝 packages/ui/package.json (+2 -1)
packages/ui/primitives/document-password-dialog.tsx (+96 -0)
📝 packages/ui/primitives/pdf-viewer.tsx (+89 -47)

📄 Description

Current Behaviour -
Presently, the behavior is quite default, which does not align with the theme. Additionally, the alert box appears to be somewhat stubborn.

https://github.com/documenso/documenso/assets/71957674/d681bef6-7ee3-4f27-b6db-34c6aaec6139

This PR fixes -
I am overriding the default behavior by adding a password dialog component, which will only appear for password-protected documents.

https://github.com/documenso/documenso/assets/71957674/b1d05968-3c15-4abe-810f-e4186cfd1fcb


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/780 **Author:** [@harkiratsm](https://github.com/harkiratsm) **Created:** 12/22/2023 **Status:** ✅ Merged **Merged:** 1/17/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `harkirat/Protect` --- ### 📝 Commits (8) - [`2ae9e29`](https://github.com/documenso/documenso/commit/2ae9e2990320b6b7ed008923d59978826a3ce25c) feat: improve the ux for password protected documents - [`72a7dc6`](https://github.com/documenso/documenso/commit/72a7dc6c051f06323484accff15707eab13abe0d) fix the console error - [`53c5701`](https://github.com/documenso/documenso/commit/53c570151f43918452c7923a92caef114bde288c) fix lint, description of dialog - [`d8cbe1d`](https://github.com/documenso/documenso/commit/d8cbe1d5ba5ae4641d1c3da3ff731d5149bce201) Merge branch 'main' into harkirat/Protect - [`eeb6a07`](https://github.com/documenso/documenso/commit/eeb6a072aae48e6ee4023cc75b07ee7baf001374) Merge branch 'main' into harkirat/Protect - [`68953d1`](https://github.com/documenso/documenso/commit/68953d1253b8c688988bbef0d6e256b3d01dee47) feat add documentPassword to documenet meta and improve the ux - [`a94b829`](https://github.com/documenso/documenso/commit/a94b829ee06e2759051376e7e4d2230af4968925) fix: tidy code - [`91dd10e`](https://github.com/documenso/documenso/commit/91dd10ec9b5f47b11c47da1d1a81258a9529c8b3) fix: add symmetric encryption to document passwords ### 📊 Changes **13 files changed** (+316 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/[id]/edit-document.tsx` (+19 -2) 📝 `apps/web/src/app/(dashboard)/documents/[id]/page.tsx` (+27 -2) 📝 `apps/web/src/app/(signing)/sign/[token]/page.tsx` (+25 -1) 📝 `package-lock.json` (+2 -1) 📝 `packages/lib/server-only/document-meta/upsert-document-meta.ts` (+8 -4) 📝 `packages/lib/server-only/document/duplicate-document-by-id.ts` (+1 -0) ➕ `packages/prisma/migrations/20240115031508_add_password_to_document_meta/migration.sql` (+2 -0) 📝 `packages/prisma/schema.prisma` (+1 -0) 📝 `packages/trpc/server/document-router/router.ts` (+35 -0) 📝 `packages/trpc/server/document-router/schema.ts` (+9 -0) 📝 `packages/ui/package.json` (+2 -1) ➕ `packages/ui/primitives/document-password-dialog.tsx` (+96 -0) 📝 `packages/ui/primitives/pdf-viewer.tsx` (+89 -47) </details> ### 📄 Description Current Behaviour - Presently, the behavior is quite default, which does not align with the theme. Additionally, the alert box appears to be somewhat stubborn. https://github.com/documenso/documenso/assets/71957674/d681bef6-7ee3-4f27-b6db-34c6aaec6139 This PR fixes - I am overriding the default behavior by adding a password dialog component, which will only appear for password-protected documents. https://github.com/documenso/documenso/assets/71957674/b1d05968-3c15-4abe-810f-e4186cfd1fcb --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:32:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1175
No description provided.