[PR #1610] [MERGED] feat: add text align option to fields #1752

Closed
opened 2026-02-26 20:30:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1610
Author: @Mythie
Created: 1/28/2025
Status: Merged
Merged: 1/28/2025
Merged by: @Mythie

Base: mainHead: feat/field-text-alignment


📝 Commits (1)

  • d4955e8 feat: add text align option to fields

📊 Changes

14 files changed (+332 additions, -36 deletions)

View changed files

📝 apps/web/src/app/(signing)/sign/[token]/date-field.tsx (+20 -3)
📝 apps/web/src/app/(signing)/sign/[token]/email-field.tsx (+20 -3)
📝 apps/web/src/app/(signing)/sign/[token]/name-field.tsx (+20 -3)
📝 apps/web/src/app/(signing)/sign/[token]/number-field.tsx (+29 -16)
📝 apps/web/src/app/(signing)/sign/[token]/text-field.tsx (+23 -6)
📝 packages/lib/server-only/pdf/insert-field-in-pdf.ts (+45 -2)
📝 packages/lib/types/field-meta.ts (+10 -0)
📝 packages/ui/primitives/document-flow/field-item-advanced-settings.tsx (+6 -0)
📝 packages/ui/primitives/document-flow/field-items-advanced-settings/date-field.tsx (+28 -0)
📝 packages/ui/primitives/document-flow/field-items-advanced-settings/email-field.tsx (+28 -0)
📝 packages/ui/primitives/document-flow/field-items-advanced-settings/initials-field.tsx (+23 -0)
📝 packages/ui/primitives/document-flow/field-items-advanced-settings/name-field.tsx (+28 -0)
📝 packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx (+23 -2)
📝 packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx (+29 -1)

📄 Description

Description

Adds the ability to align text to the left, center or right for relevant fields.

Previously text was always centered which can be less desirable.

See attached debug document which has left, center and right text alignments set for fields.

image

N/A

Changes Made

  • Added text align option
  • Update the insert in pdf method to support different alignments
  • Added a debug mode to field insertion

Testing Performed

  • Ran manual tests using the debug mode

🔄 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/1610 **Author:** [@Mythie](https://github.com/Mythie) **Created:** 1/28/2025 **Status:** ✅ Merged **Merged:** 1/28/2025 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/field-text-alignment` --- ### 📝 Commits (1) - [`d4955e8`](https://github.com/documenso/documenso/commit/d4955e8a6946255af03606b7944c48fbe6fbf9df) feat: add text align option to fields ### 📊 Changes **14 files changed** (+332 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(signing)/sign/[token]/date-field.tsx` (+20 -3) 📝 `apps/web/src/app/(signing)/sign/[token]/email-field.tsx` (+20 -3) 📝 `apps/web/src/app/(signing)/sign/[token]/name-field.tsx` (+20 -3) 📝 `apps/web/src/app/(signing)/sign/[token]/number-field.tsx` (+29 -16) 📝 `apps/web/src/app/(signing)/sign/[token]/text-field.tsx` (+23 -6) 📝 `packages/lib/server-only/pdf/insert-field-in-pdf.ts` (+45 -2) 📝 `packages/lib/types/field-meta.ts` (+10 -0) 📝 `packages/ui/primitives/document-flow/field-item-advanced-settings.tsx` (+6 -0) 📝 `packages/ui/primitives/document-flow/field-items-advanced-settings/date-field.tsx` (+28 -0) 📝 `packages/ui/primitives/document-flow/field-items-advanced-settings/email-field.tsx` (+28 -0) 📝 `packages/ui/primitives/document-flow/field-items-advanced-settings/initials-field.tsx` (+23 -0) 📝 `packages/ui/primitives/document-flow/field-items-advanced-settings/name-field.tsx` (+28 -0) 📝 `packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx` (+23 -2) 📝 `packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx` (+29 -1) </details> ### 📄 Description ## Description Adds the ability to align text to the left, center or right for relevant fields. Previously text was always centered which can be less desirable. See attached debug document which has left, center and right text alignments set for fields. <img width="614" alt="image" src="https://github.com/user-attachments/assets/361a030e-813d-458b-9c7a-ff4c9fa5e33c" /> ## Related Issue N/A ## Changes Made - Added text align option - Update the insert in pdf method to support different alignments - Added a debug mode to field insertion ## Testing Performed - Ran manual tests using the debug mode --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:30:55 +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#1752
No description provided.