-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [M3-7008] - Invoice and Payment id
wrapping in generated PDFs
#9702
fix: [M3-7008] - Invoice and Payment id
wrapping in generated PDFs
#9702
Conversation
}); | ||
const titlePosition = addTitle( | ||
doc, | ||
Math.max(leftHeaderYPosition, rightHeaderYPosition) + 12, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed 4
to 12
to match the payment PDFs. It helps make the PDF a bit more readable (see before and after photos above).
@@ -63,7 +64,7 @@ export const createPaymentsTable = ( | |||
headStyles: { | |||
fillColor: '#444444', | |||
}, | |||
startY: 165, | |||
startY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
startY
is now dynamic instead of hard-coded. This allows the table to be dynamically positioned so that the header text will not overlap with the table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good choice, the dynamic value definitely improves the table's aesthetic.
Looks good to me 👀 👍. I was able to download and inspect both the Invoice and the Receipt PDFs. The long numbers do not overlap or cause any visual regressions and are positioned correctly within the PDF. I did observe a discrepancy if I clicked the link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed no wrapping or obscured confirmation numbers on the invoices and payments that I clicked through. Thanks for fixing! 🚢
Description 📝
Important
I recommend checking the internal ticket to see context of this 🪲
Fixes unnecessary wrap in invoice and payment PDFs that caused some
id
numbers to be partially cut off and improves general positioningMajor Changes 🔄
addTitle
functionPreview 📷
How to test 🧪
http://localhost:3000/account/billing
Invoice with Large ID
and verify the textInvoice: #123456789123456
is positioned correctly and is not overlapping anythingPayment #123456789123456
and verify the textReceipt for Payment #123456789123456
is positioned correctly and is not overlapping anything