Commit graph

4 commits

Author SHA1 Message Date
Vlad Sazonau
cb1045c75b
feat: expand TODO list with discounts feature and improve e2e workflow (#186)
* Added detailed requirements for implementing a per-item discount feature in the TODO list, including design considerations and examples.
* Updated e2e workflow to ensure concurrency management, allowing only one Playwright test workflow to run per branch or pull request at a time.
* Simplified Playwright test execution steps by removing unnecessary duration calculations, enhancing clarity and efficiency.
* Improved test reliability by adjusting URL handling in e2e tests.
2026-03-09 00:05:50 +01:00
Vlad Sazonau
5ffef43756
refactor: currency searchable combobox (#183)
* refactor: remove redundant toast dismissal in invoice form PDF regeneration logic

* test: enhance invoice item deletion confirmation flow in e2e tests

* Updated e2e tests to verify the visibility of the delete confirmation dialog and its cancel flow.
* Improved checks for item presence after cancellation and confirmed deletion scenarios.
* Added data-testid to the confirmation dialog for better test targeting and reliability.

* feat: enhance invoice item deletion handling in InvoiceForm

* Introduced a ref to manage the deletion state of invoice items, preventing toast notifications from closing during item removal.
* Updated the PDF regeneration logic to conditionally dismiss toasts based on the deletion state, improving user experience during invoice updates.

* feat: implement currency combobox for improved currency selection in invoice form

* Replaced the native currency select with a searchable combobox component, enhancing user experience.
* Updated related tests to verify the functionality of the new combobox, including currency selection and visibility of options.
* Organized currencies into groups for better accessibility and usability in the combobox.

* test: enhance currency selection validation in invoice form tests

* Updated e2e tests for the Invoice Generator and Default Invoice Template to verify that the selected currency is correctly saved in the hidden input field.
* Added checks to ensure the currency value is accurately reflected after selection in both the main and mobile currency comboboxes.
* Marked test suites as focused to streamline testing during development.

* feat: enhance QR code generation and mobile handling in invoice components

* Updated QR code generation logic to dynamically adjust error correction level and pixel width based on input length, improving scannability.
* Added  prop to various components to optimize UI behavior for mobile devices, including toast message positioning.
* Increased timeout for expect assertions in Playwright configuration from 25,000ms to 35,000ms for improved test reliability.
* Updated snapshot images for invoice templates to reflect recent changes in QR code rendering.

* feat: add validation for currency groups in schema

* Implemented checks to ensure all supported currencies are unique and correctly grouped.
* Added error handling for duplicate currencies within groups and for missing currencies in the supported list.
* Enhanced overall currency validation logic to improve data integrity in the application.
2026-03-08 17:36:02 +01:00
Vlad Sazonau
6192cca49d
feat: add QR code functionality to invoice templates and other improvements + bug fixes (#165)
* feat: add QR code functionality to invoice templates and enhance user experience

* Introduced QR code generation for invoices, allowing users to include a QR code with customizable descriptions.
* Updated invoice templates to display QR codes in both default and Stripe formats.
* Enhanced form components to support QR code data input and visibility toggles.
* Added utility functions for generating QR code data URLs.
* Updated tests and snapshots to cover new QR code features and ensure visual consistency across templates.
* Introduced a Code of Conduct document to promote a respectful community environment.

* feat: enhance error handling and metadata management in invoice application

* Updated error handling to reset invoice metadata to default upon error occurrence.
* Refactored invoice client page to utilize a constant for default mobile tab value.
* Improved metadata structure by including last visited mobile tab in the default metadata.
* Adjusted schema to allow optional item name field for better flexibility in invoice items.

* fix: downgrade react-pdf version and update mobile tab handling

* Downgraded react-pdf from version 10.1.0 to 9.2.1 for compatibility.
* Updated mobile tab handling to utilize the last visited tab from app metadata.
* Refactored invoice client page to improve metadata management and ensure proper tab state persistence.

* fix: remove redundant validation message for item name in invoice form

* chore: update TODO list and comment out scroll to top effect in AppPageClient

* Added a new issue link to the TODO.md for tracking.
* Commented out the scroll to top effect in page.client.tsx for potential future use.

* refactor: streamline viewport settings and restore scroll to top effect in AppPageClient

* Simplified viewport configuration by removing unnecessary properties.
* Restored the scroll to top effect in AppPageClient for improved user experience on initial render.

* revert viewport

* fix: prevent jumping on iOS when typing in textarea component

* Added resize-none class to the textarea to improve user experience on iOS devices by preventing layout shifts while typing.

* feat: reworked app logic, improved multi-page pdf layout, add/update e2e tests, improvements and bug fixes

* Enhanced README.md with new features, including multi-page PDF support, QR code functionality, and live preview demos.
* Added demo GIFs to showcase new features and improve user understanding.
* Updated key features section for clarity and added a news & updates section for version tracking.

* feat: add debounced error handling in invoice form component

* Introduced a debounced callback for showing form errors to improve user experience by preventing rapid toast notifications.
* Updated validation logic to utilize the new debounced error handling mechanism.

* chore: update e2e snapshots and improved form errors toast

* fix: improve PDF viewer and QR code layout in invoice templates

* Added state management for page numbers in the mobile PDF viewer to handle multi-page documents.
* Adjusted QR code positioning and size to prevent overlap with the fixed footer.
* Updated padding in the Stripe template styles to resolve overlapping issues with the footer.
* Updated TODO.md with additional context on preventing layout issues in PDF rendering.

* feat: enhance invoice sharing logic with validation error handling

* Added a new test to verify error toast visibility when the invoice form has validation errors.
* Implemented state management for form validation errors in the AppPageClient.
* Updated the InvoiceForm component to manage error states and trigger appropriate toasts for user feedback.
* Ensured that the share button behavior reflects the form's validation state, improving user experience.

* feat: enhance invoice template with authorized person fields

* Added fields for Person Authorized to Receive and Person Authorized to Issue in the default invoice template.
* Implemented visibility toggles for these fields in the invoice form.
* Updated tests to verify the correct behavior of these fields in both default and Stripe invoice templates.
* Enhanced PDF rendering to include names of authorized persons when applicable.

* feat: implement cooldown for CTA toasts and update UI elements

* Introduced a 5-minute cooldown for showing CTA toasts to enhance user experience.
* Updated toast management logic in various components to respect the new cooldown.
* Adjusted text color in the InvoiceClientPage for better visibility.
* Refined tooltip content in the invoice form to clarify functionality.
* Updated TODO.md to reflect changes in toast behavior.

* feat: add unit column switch to stripe invoice template

* Changed toggle labels from Show/hide to Show for various fields in the invoice forms and dialogs to enhance clarity.
* Updated related test cases to reflect the new label changes across buyer, seller, and invoice templates.
* Ensured consistency in user interface elements for better user experience.

* chore: adjust text size

* feat: update README and improve CTA toast logic

* Replaced the EasyInvoicePDF logo with a new design and adjusted its size for better visibility.
* Enhanced the call-to-action (CTA) toast functionality by refining the logic for showing toasts based on user interactions and session activity.
* Updated text in the invoice form to clarify user actions and improve overall user experience.
* Added a new logo image to the project assets.

* update readme

* refactor: improved mobile PDF viewer by importing the PDF worker directl, improve CTA toast logic, update readme

* Renamed sections in README for clarity, including Live Preview to Invoice PDF Live Preview and Instant Download to Instant PDF Download.
* Adjusted text in CTA toasts for better engagement.
* Updated minimum time on page and interactions required for showing CTA toasts to enhance user experience.
* Improved mobile PDF viewer by importing the PDF worker directly and addressing related issues in TODO.md.

* fix: adjust CTA toast display timing for improved user experience

* Updated the timeout for showing the CTA toast to 6 seconds after the invoice link notification, enhancing the visibility and timing of user prompts.

* feat: Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.

* Added a new command in package.json for running cloudflared tunnel.
* Updated tests to verify the visibility of the share invoice link description toast.
* Refined toast notifications in the AppPageClient to include new IDs for better tracking and user feedback.
* Improved handling of invoice sharing logic to differentiate between mobile and desktop sharing methods, enhancing user experience.

* feat: enhance toast notifications with unique IDs for better ux

* fix: adjust invoice item limit in tests and update translations for total excluding tax

* Reduced the maximum number of invoice items in the test from 20 to 15 to better align with URL limits.
* Updated translations in the PDF i18n schema and related files to include total excluding tax in multiple languages.
* Modified the invoice PDF template to display the total excluding tax using localized text.
* fix qr code race condition

* fix: update URL variable names and enhance sharing logic for better clarity

* Renamed variables for generated URLs to improve code readability.
* Updated sharing logic to ensure consistent use of the new variable names across mobile and desktop sharing methods.
* Enhanced toast notifications to dismiss previous messages and track share events more effectively.

* fix: update tax label helper message for clarity in invoice items

* readme upd

* fix: adjust idle time and minimum interactions for CTA toast display

* Increased idle time from 3 seconds to 5 seconds to improve user engagement.
* Updated minimum interactions required for showing the CTA toast from 2 to 3 to enhance user experience.

* feat: implement cooldown logic for CTA toast display

* Added functionality to track the last shown timestamp of the CTA toast using localStorage.
* Introduced a 7-day cooldown period to prevent the toast from being shown multiple times within a week.
* Updated context to reflect whether the CTA toast was shown recently, enhancing user experience.

* chore: update dependencies and add GitHub workflows for linting and type checking

* Updated package versions in package.json and pnpm-lock.yaml for better compatibility and performance.
* Added GitHub Actions workflows for ESLint and TypeScript type checking to ensure code quality and consistency.
* Enhanced buyer and seller management components with improved state management and type safety.

* feat: enhance invoice sharing and download tracking

* Added functionality to track the number of times invoices are shared via link and downloaded as PDF.
* Updated the app metadata structure to include  and .
* Implemented logic to increment these counts upon sharing and downloading invoices, improving analytics and user engagement.

* refactor: update README and TODO for clarity and consistency
2026-02-24 19:53:24 +01:00
Vlad Sazonau
af2b1d5f56
feat: customizable tax/VAT label text + a lot of other improvements and bug fixes (#163)
* feat: add customizable VAT label

* Introduced a new feature allowing users to customize the VAT label text in the invoice form.
* Updated the invoice form, PDF templates, and related components to utilize the customizable VAT label.
* Enhanced validation for VAT input to accept both numeric values and specific strings.
* Improved user interface messages for clarity regarding VAT input requirements.

* chore: update README and .env.example for clarity and new features

* Revised README.md to enhance project description, add links, and improve feature presentation.
* Updated .env.example comments for better understanding of invoice generation functionality.
* Added new screenshots for default and Stripe templates, while removing outdated images.
* Enhanced localization files with HTML span tags for better styling in descriptions across multiple languages.

* refactor: rename VAT label to Tax label and update related components

* Changed all instances of VAT to Tax in the invoice form, PDF templates, and related components for consistency.
* Updated validation and schema to reflect the new tax label terminology.
* Removed the dynamic local storage view component as it was no longer needed.
* Cleaned up unused imports and components to streamline the codebase.

* chore: update .env.example and package.json for dotenv integration

* Removed the local storage debug variable from .env.example for clarity.
* Added dotenv package to package.json to manage environment variables more effectively.
* Updated Playwright configuration to load environment variables from .env.local for improved testing setup.
* Enhanced VSCode settings for better TypeScript development experience.
* Cleaned up and organized various components and localization files for consistency.

* feat: implement customizable Tax Number label in invoice forms

* Added support for a customizable Tax Number label in the buyer and seller information sections.
* Updated related components, forms, and validation schemas to accommodate the new label functionality.
* Refactored existing tests to ensure proper handling of the Tax Number label in various scenarios.
* Enhanced user interface to allow users to set and display custom labels for Tax Number in the invoice PDF templates.

* feat: enhance Playwright testing and update project metadata

* Added a new e2e test for the About page to ensure content visibility and proper screenshot generation.
* Introduced a new command in package.json for non-flaky end-to-end tests.
* Updated Playwright configuration to improve timeout settings and worker management.
* Revised README to clarify key features and project details.
* Added a TODO file for future enhancements and refinements.
* Updated various localization files and metadata for consistency across languages.
* Refactored components for better organization and improved user experience.

* refactor: update Playwright tests and improve screenshot handling

* Changed import of 'path' to 'node:path' in Playwright configuration for better compatibility.
* Updated GitHub Actions workflow to run e2e tests on macOS for consistent snapshot generation.
* Simplified screenshot assertions in various test files by removing unnecessary path joins.
* Added new snapshot images for various invoice and template tests to ensure visual consistency.
* Removed commented-out code related to tax field visibility in invoice items for cleaner codebase.
* Introduced new type for mobile tab values in schema to enhance type safety.

* minor fix

* chore: update Playwright configuration and GitHub Actions workflow

* Modified dotenv configuration to load environment variables quietly.
* Updated GitHub Actions workflow to use macOS 14 for improved compatibility with Playwright snapshot generation.

* chore: update e2e tests and GitHub Actions workflow

* Changed the GitHub Actions workflow to use macOS-latest for improved compatibility with Playwright.
* Updated screenshot assertions in various test files to include maxDiffPixelRatio for better visual comparison.
* Enhanced screenshot handling in tests for the About page and Default Invoice Template to ensure consistency.

* update gh runner to macos-14

* chore: update e2e tests and GitHub Actions workflow

* Updated GitHub Actions workflow to specify macOS 14 for consistency with local environment.
* Modified e2e tests to check total value after invoice generation and adjusted wait times for better stability.
* Changed URL assertions in Not Found page tests to include template parameter for accurate routing.
* Added comments to clarify updates in seller and buyer information sections in the Default Invoice Template tests.

* chore: update e2e tests and Playwright configuration

* Updated Playwright configuration to use iPhone 13 Pro for mobile testing.
* Removed outdated About page snapshot tests and their associated images.
* Enhanced PDF rendering in invoice tests by implementing a new utility function for canvas rendering.
* Adjusted screenshot assertions to ensure consistency across different templates and locales.
* Updated GitHub Actions workflow to run tests on Ubuntu for improved compatibility.

* chore: update e2e workflow and PDF rendering imports

* Changed GitHub Actions workflow to run on macOS-latest for consistency with local environment.
* Updated PDF.js imports to use a specific version from CDN for improved stability and reliability in rendering.

* chore: update Playwright configuration and enhance e2e tests

* Renamed the Chromium project to Desktop Chrome for clarity in Playwright configuration.
* Updated GitHub Actions workflow to use macOS 14 for consistency with local environment.
* Adjusted retention days for Playwright reports from 3 to 1 day.
* Enhanced PDF download tests by adding new scenarios for Stripe template and improved screenshot assertions for better visual consistency across different templates and languages.

* chore: enhance Playwright configuration and update e2e tests

* Added launch options to disable GPU rendering in headless mode for improved stability in Playwright tests.
* Updated GitHub Actions workflow to use macOS-latest for consistency with local development.
* Increased wait time in PDF tests to ensure proper rendering after data changes.
* Downgraded PDF.js imports to a stable version for better compatibility and performance.
* Adjusted canvas rendering settings to enhance PDF display quality.

* chore: enhance PDF rendering utility with documentation and font face option

* Added documentation link for PDF.js API to improve developer reference.
* Updated PDF rendering function to disable font face for better compatibility during rendering.

* chore: update PDF snapshots for invoice and template tests

* chore: increase timeout for visibility checks in Stripe invoice sharing tests

* Updated timeout for Unable to Share Invoice visibility checks from 3000ms to 6000ms in mobile and desktop scenarios to improve test reliability.

* chore: increase timeout for PDF download visibility checks in invoice tests

* Updated timeout for visibility checks of download buttons in various language templates from 600ms to 700ms to improve test reliability and ensure proper rendering after data changes.

* chore: enhance PDF screenshot assertions in invoice tests

* Added maxDiffPixels option to screenshot assertions in both Default and Stripe invoice template tests to improve visual comparison accuracy and reduce false positives in test results.

* chore: update PDF snapshots for invoice and template tests

* Updated various PDF snapshots for both Default and Stripe invoice templates to reflect recent changes in rendering and layout across different browsers and devices.

* chore: configure tests to run in serial mode for invoice templates

* Updated both Default and Stripe invoice template tests to run in serial mode, preventing race conditions and ensuring consistent test execution. Removed maxDiffPixels option from screenshot assertions to streamline the comparison process.

* chore: adjust Playwright configuration and refine invoice template tests

* Changed the number of workers in Playwright configuration for CI from 2 to 1 to enhance stability during test execution.
* Removed serial mode configuration from Default and Stripe invoice template tests to allow parallel execution, improving test efficiency.
* Updated assertions in the Default invoice template tests to ensure proper visibility and value persistence after page reloads.

* fix tests

* refactor: streamline Stripe invoice sharing tests

* Removed unnecessary localStorage clearing after each test to improve test performance.
* Simplified share button click actions by removing force option.
* Consolidated logo upload logic for clarity and consistency across tests.
* Increased debounce timeout for localStorage updates to enhance reliability of test assertions.

* test: enhance logo upload assertions in Stripe invoice template tests

* Added visibility checks for logo upload success messages and previews to ensure proper feedback during testing.
* Increased debounce timeout for localStorage updates to improve reliability of test assertions.

* chore: update timeout and enhance tax label handling in invoice templates

* Increased timeout for local testing from 35 seconds to 40 seconds to improve reliability.
* Added functionality to dynamically update tax label text based on selected language in invoice templates.
* Updated various invoice item and VAT summary table labels to support custom tax labels for better localization.

* chore: update PDF font handling and app redirects

* Added new PDF font files for Inter and Open Sans to improve document rendering.
* Updated font source paths in invoice templates to reference the new PDF fonts.
* Configured caching headers for PDF fonts to enhance loading performance.
* Adjusted app redirects to accommodate the new structure of the application.

* style: enhance FeaturesSection layout and styling

* Updated the FeaturesSection component to include a subtle border and shadow for improved visual separation.
* Adjusted padding and margin for better alignment and spacing of content within the section.

* chore: update PDF snapshots

* chore: update package dependencies and CI configuration

* Upgraded package manager from pnpm@10.26.2 to pnpm@10.27.0.
* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Changed CI runner from macos-latest to macos-14 in e2e workflow for consistency with local environment.

* chore: downgrade @playwright/test dependency to version 1.56.1

* Updated package.json and pnpm-lock.yaml to revert @playwright/test from version 1.57.0 to 1.56.1 for compatibility reasons.
* Adjusted related dependencies in pnpm-lock.yaml to reflect the downgrade.

* chore: restore dotenv dependency and update CI runner

* Re-added dotenv dependency in package.json and pnpm-lock.yaml to ensure environment variable management.
* Updated CI runner from macos-14 to macos-15 in e2e workflow for consistency with local development environment.

* chore: update PDF test snapshots and remove obsolete images

* Updated PDF test snapshots for various invoice templates to reflect recent changes.
* Removed outdated snapshot images related to the Stripe template for mobile and desktop environments.
* Ensured consistency in snapshot naming and organization for better maintainability.

* chore: refactor PDF font handling and update asset URLs

* Commented out the headers function in next.config.mjs for future reference.
* Updated font source paths in invoice templates to use STATIC_ASSETS_URL for better asset management.
* Added documentation comments in config.ts to clarify the purpose of STATIC_ASSETS_URL and IMAGEKIT_CDN_URL.

* fix pdf screenshot tests and cleanup

* feat: cleanup files and i18n translations

* chore: update e2e tests and CI configuration

* Changed CI runner from macos-15 to macos-latest for consistency with GitHub Actions.
* Renamed e2e test files

* style: update README header and logo size

* chore: upgrade @playwright/test to version 1.57.0 and adjust CI worker settings

* Updated @playwright/test dependency from version 1.56.1 to 1.57.0 in package.json and pnpm-lock.yaml.
* Increased CI worker count from 1 to 2 for improved test execution.
* Updated README header size and adjusted link text for clarity.

* chore: adjust CI worker settings for improved test stability

* Changed the number of CI workers from 2 to 1 to address flaky tests during execution.

* chore: downgrade @playwright/test to version 1.56.1 for compatibility

* style: enhance README layout and content for clarity and engagement

* docs: update README to enhance user engagement and provide additional resources

* refactor: update asset URLs and improve footer links for consistency

* Changed the video demo URL to use IMAGEKIT_CDN_URL for better asset management.
* Updated fallback image URL in the about page to reflect the new video demo structure.
* Replaced hardcoded links to the author's website with a dynamic TWITTER_URL in multiple components for consistency.

* remove commented out code

* refactor: update video demo URLs and fallback image for consistency

* Changed the video demo URL to a new format for better asset management.
* Updated the fallback image used in the about page video component to align with the new demo structure.
* Removed the static assets URL import as it is no longer needed.

* fix: append version query to video demo URL for cache busting

* chore: add test for static assets

* refactor: reorganize static asset tests and update asset URLs

* Moved static asset tests from the about page to a dedicated static-assets.test.ts file for better organization.
* Updated asset URLs in the config to use STATIC_ASSETS_URL for consistency.
* Registered fonts in invoice templates using the new INVOICE_PDF_FONTS structure for improved maintainability.

* refactor: update video source and fallback image URLs for consistency

* Revised video source and fallback image URLs in the config to include versioning for better asset management.
* Ensured all demo video links follow the new naming convention for improved organization.

* refactor: enhance invoice item tax label helper text

* fix: update error message for invoice link generation to include refresh suggestion
2026-01-11 22:23:04 +01:00