Commit graph

40 commits

Author SHA1 Message Date
Vlad Sazonau
fcda659229
feat: reworked seller/buyer sections, email visibility switch field, shared invoice indicator, improved Out-of-Date helper + minor things (#197)
* feat: add OutOfDateDatesHelper, Shared invoice badge, etc
* Introduced new markdown files for skills, covering typography, surfaces, animations, and performance to enhance interface design consistency.

* feat: add isSharedInvoice prop to InvoiceForm for shared invoice indication

* Introduced isSharedInvoice prop in InvoiceForm component to manage shared invoice state.
* Updated UI to display tooltips for shared seller and buyer information, enhancing user awareness of shared invoices.

* test: enhance invoice form tests with detailed validation for date fields and invoice number

* fix: update label styling in UI component for improved visual consistency

* Changed text class from text-balance to text-pretty in Label component to enhance design consistency across the application.

* feat: enhance email visibility functionality in buyer and seller dialogs

* Added email visibility toggle in BuyerDialog and SellerDialog components, allowing users to show or hide the email field in PDF outputs.
* Updated related tests to ensure proper functionality of the email visibility feature.
* Improved UI labels for required fields to enhance user experience and clarity.

* feat: implement email visibility toggle in PDF for invoice templates

* Added tests to verify email visibility toggles for both seller and buyer sections in the default and stripe invoice templates.
* Included functionality to capture screenshots of PDFs with emails hidden and visible based on user selections.
* Created new snapshot images for both email visibility states across different devices and browsers.

* formatting

* chore: update CI workflows to handle linting, type checking, and unit tests failures

* Added  to linting, type checking, and unit tests steps to prevent workflow failure on errors.
* Modified email notification conditions to trigger only on failure of respective steps, improving error handling and notification accuracy.

* refactor: update email visibility toggle tests to use role-based queries

* refactor: simplify buyer and seller information forms by removing tooltip components and enhancing locked state visibility

* Removed tooltip components from Buyer and Seller information sections, replacing them with a locked banner for better user guidance.
* Updated input fields to reflect required status and improved accessibility by removing unnecessary aria attributes.
* Enhanced the content of shared seller and buyer tooltips in the InvoiceForm for clarity.

* refactor: remove isSharedInvoice prop and associated tooltips from Invoice components

* Eliminated the isSharedInvoice prop from InvoiceForm and its usage in InvoiceClientPage.
* Simplified the InvoicePageHeader content for shared invoices by replacing detailed tooltips with a concise message.
* Streamlined the code for better readability and maintainability.

* refactor: update locked banner visibility and improve invoice management UI

* Enhanced visibility of locked banners in Buyer and Seller management forms, providing clearer guidance for modifying details.
* Updated tests to verify the visibility and content of locked banners based on buyer and seller selection states.
* Simplified the Invoice components by removing unnecessary props and improving layout consistency across the application.

* refactor: improve error message layout and content in error handling components

* Updated the Error component to separate error messages for better clarity and user guidance.
* Enhanced the styling of the ErrorMessage component for improved readability and layout consistency.
2026-03-23 22:19:23 +01:00
Vlad Sazonau
ebdb888d2b
feat: auto-scroll form on mobile when switching between tabs, fix loading placeholder (#191)
* chore: update package version and add new agent skills for changelog maintenance and frontend design

* Bump package version from 1.0.1 to 1.0.2 in package.json.
* Introduce new skills:
  - changelog-maintenance for managing software release documentation.
  - frontend-design for creating high-quality frontend interfaces.
* Add detailed documentation for each skill, including usage instructions and best practices.

* feat: add MobileFormScrollContainer for preserving scroll position in mobile invoice forms

* Introduced MobileFormScrollContainer component to maintain and restore scroll position for mobile forms, enhancing user experience during navigation.
* Updated InvoiceClientPage to utilize MobileFormScrollContainer, replacing the previous div wrapper for the invoice form.

* feat: adjust layout in invoice form and loading components

* Changed the lint-staged command in package.json to use pnpm for better consistency.
* Adjusted margin styles in the invoice form component to improve layout.
* Enhanced the loading component by refining the structure and adding placeholders for better user experience during loading states.

* refactor: update visibility checks for header links in About page tests

* Replaced text-based visibility checks for the 'EasyInvoicePDF' link with role-based checks using getByRole for improved accessibility and consistency in e2e tests across different languages.
2026-03-11 02:57:49 +01:00
Vlad Sazonau
b407d39731
fix: fix i18n issue with generating pdf via api + other improvements (#181)
* fix: fix i18n issue with generating pdf via api + other improvements

* Updated e2e tests to enhance navigation reliability by simplifying URL wait strategy.
* Added a new test to verify permanent redirect behavior for invoice generation.
* Adjusted default visibility settings for unit fields in the general information component to align with Stripe template behavior.
* Enhanced error logging in the generate-invoice API route for better debugging and clarity.

* chore: update Node.js engine requirement in package.json from >=20.0.0 to >=22.0.0

* chore: remove Node.js engine requirement from package.json

* chore: remove branch and commit information from failure notifications in workflow files

* Updated lint.yml, type-check.yml, and unit-tests.yml to remove branch and commit details from failure notification messages, streamlining the output for better clarity.

* feat: add Polish VAT label for buyer and seller in invoice data

* Updated the invoice data structure to include the Polish-specific VAT label  for both buyer and seller fields, ensuring compliance with local invoicing standards.
2026-03-03 22:58:45 +01:00
Vlad Sazonau
88860d0e40
fix: delete invoice item flow (#180)
* chore: fixed invoice item deletion flow

* Removed deprecated dependency @microlink/react-json-view from package.json.
* Upgraded knip dependency from version 5.55.1 to 5.85.0 for better performance.
* Increased timeout for expect assertions in Playwright configuration from 10,000ms to 15,000ms for improved test reliability.
* Enhanced invoice item deletion process by implementing a confirmation dialog, ensuring user clarity before item removal.

* fix: enhance invoice item deletion confirmation and update e2e tests for accuracy

* Improved the confirmation dialog for deleting invoice items to display the correct item name.
* Updated e2e tests to ensure accurate calculations of totals for multiple invoice items, including adjustments for quantity, price, and VAT rates.
* Enhanced visibility checks for calculated values in the invoice form tests to ensure reliability.

* chore: update dependencies and refactor code for improved clarity

* Added shadcn to the ignoreDependencies list in knip configuration.
* Removed deprecated @react-email/components and @react-email/tailwind from package.json and pnpm-lock.yaml.
* Refactored several exported functions to internal functions in various components for better encapsulation.
* Deleted unused confirm-subscription email component to streamline the codebase.
* Updated rate-limit.ts by removing unused email limiter logic and related types.
2026-03-02 01:47:41 +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
VladSez
b88ae5309c chore: update package version to 1.0.1 in package.json 2026-01-12 01:04:23 +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
Vlad Sazonau
d2178fafa1
chore: update Playwright test version and refactor CTA toast logic (#151)
* chore: update Playwright test version and refactor CTA toast logic

* upgrade @playwright/test from 1.52.0 to 1.56.1 in package.json and pnpm-lock.yaml
* refactor CTA toast logic by renaming hook to useShowRandomCTAToast for clarity
* update e2e workflow to change condition for uploading Playwright report

* fix: correct cooldown period for CTA toast display logic

* update cooldown duration from minutes to days to ensure the CTA toast is shown correctly after the specified period

* refactor: update project structure guidelines and improve CTA toast timing

* enhance project structure documentation with clearer organization and additional guidelines
* adjust timer durations for displaying the CTA toast in InvoicePDFDownloadLink and useShowRandomCTAToast for better user experience
* update footer link to point to the correct URL
2025-11-16 00:49:19 +01:00
Vlad Sazonau
b0f9f841c0
feat: expand supported currencies + minor fixes (#150)
* feat: expand supported currencies and their symbols in schema

* add new currencies to SUPPORTED_CURRENCIES, including those from Southeast Asia, Eastern Europe, Latin America, South Asia, and Africa
* update CURRENCY_SYMBOLS and CURRENCY_TO_LABEL to include new currency symbols and labels
* reorganize currency lists for better clarity and categorization

* feat: update package manager and enhance CTA toast functionality

* upgrade package manager to pnpm@10.22.0
* refactor CTA toast logic to use showRandomCTAToast for better engagement
* implement useShowRandomCTAToastOnEngagement hook to display toast after user interactions
* clean up unused code and improve toast button styling

* add minor comment

* refactor: clean up CTA toast logic and adjust timing

* remove unused showRandomCTAToast import from AppPageClient
* eliminate the fixed timeout for showing the CTA toast in AppPageClient
* increase timer duration for displaying the CTA toast in InvoicePDFDownloadLink from 2.5 seconds to 4 seconds
* enhance cleanup logic in useShowRandomCTAToastOnEngagement hook to prevent memory leaks

* increase playwright test timeout

* fix: increase expect timeout for assertions to improve test reliability
2025-11-15 02:11:52 +01:00
Vlad Sazonau
f744cf9087
feat: add typescript-plugin-directives and update configurations (#148)
* feat: add typescript-plugin-directives and update configurations

* add typescript-plugin-directives to package.json
* include typescript-plugin-directives in tsconfig.json plugins
* update README.md to reference typescript-plugin-directives
* enhance VSCode settings for TypeScript inlay hints

* increase e2e gh job timeout and reduce revalidate timeout in fetch github stars
2025-11-10 03:01:56 +03:00
Vlad Sazonau
28449242e2
feat: integrate GitHub stars feature and update configuration (#145)
* feat: integrate GitHub stars feature and update configuration

* add fetchGithubStars function to retrieve star count from GitHub API
* modify AppPageClient to accept githubStarsCount as a prop
* enhance GitHubStarCTA component to display star count with animation
* replace Disclosure component with native HTML details for FAQ section
* add CountUpNumber component for animated number display

* minor ui tweak

* feat: add BlackAnimatedGoToAppBtn component and update About page

* introduce BlackAnimatedGoToAppBtn for enhanced call-to-action with animation
* replace deprecated BlackGoToAppButton in About page with the new component
* update GitHubStarCTA animation duration for improved visual effect

* minor tweaks

* refactor arrow pulse animation

* update i18 texts

* refactor: update button props from _variant and _size to variant and size

* change button prop names for consistency across components
* update all instances of _variant and _size to variant and size in button components
* ensure uniformity in button styling and functionality

* clarify text message

* polish gh star cta hover styles

* improve gh cta star btn styles
2025-10-27 01:01:34 +01:00
Vlad Sazonau
6ecf46a7d1
chore: styles fixes, pin pnpm in pkg.json, minor improvements (#140)
* upgrade pnpm to version 10.17.0 and adjust package manager string in package.json
* add minimum release age setting in .npmrc to enhance security
* modify update-deps script to include minimum release age configuration
* update Tailwind CSS heartbeat animation delay for improved UX
* add CSS validation setting in VSCode configuration
* enhance local storage view button accessibility with screen reader text
* adjust layout and styling in about page for better responsiveness
* refactor project logo description component to use semantic HTML elements
2025-09-22 15:26:17 +02:00
Vlad Sazonau
a77b0ac033
feat: update sitemap, JSON-LD, added shadcn mcp (#139)
* feat: update sitemap, JSON-LD, added shadcn mcp

* minor text updates
2025-09-07 00:03:39 +02:00
Vlad Sazonau
2b4a87badc
fix: invoice preview and functionality in in-app browsers (#133)
* feat: enhance device detection to include WebView support and update context usage in components

* chore: adjust Playwright worker count for CI and refine PDF download link error handling

* chore: update Playwright configuration for CI worker count and timeout, enhance error handling in PDF download link component

* go

* go

* go

* go

* fix: update device context usage in PdfViewer to include in-app detection and simplify conditional logic

* go

* go

* go

* feat: enhance device context to include xRequestedWith and improve in-app browser detection in PdfViewer

* refactor: remove xRequestedWith and isWebView from device context and simplify PdfViewer in-app detection logic

* refactor: extract isTelegramInAppBrowser utility and simplify PdfViewer in-app detection logic

* refactor: enhance in-app browser detection logic for Facebook Messenger in check-device.server.ts

* chore: update react-pdf to version 10.1.0 and adjust import paths in components

* feat: in-app browser toast notification

* refactor: improve in-app browser detection and toast notification for Telegram users

* fix: update in-app browser toast notification description for improved clarity

* Update invoice-pdf-download-link.tsx

* refactor: update toast notification functions to include unique IDs and improve type definitions

* rename and cleanup files

* refactor: replace PDFDownloadLink with BlobProvider in MobileInvoicePDFViewer and adjust loading styles for consistency

* minor change in text

* fix: add optional chaining for inAppInfo in InvoicePDFDownloadLink and enhance in-app browser detection with new entries for Chrome Custom Tab and LinkedIn
2025-08-25 13:33:36 +02:00
Vlad Sazonau
5a4e9debc1
feat: add /?template=stripe|default to url, implement URL compression logic (#130)
* feat: add debug local storage UI and update README; include new template parameter handling in invoice form

* feat: add URL compression logic when generating link to invoice to reduce url length + add unit tests + improved existing e2e tests

* ci: remove type check step from unit tests workflow to streamline CI process

* test: update e2e tests for Stripe invoice sharing logic and template; increase timeout for visibility checks

* test: refactor e2e tests for invoice generation and sharing; update element selectors and enhance URL disallow rules in robots.txt

* chore: enhance README with detailed features and update about page references; add GitHub star CTA component

* chore: update configuration files for Prettier, run prettify across the project

* chore: run dedupe

* test: add e2e tests for Open Graph meta tags in invoice templates; verify correct rendering for default and Stripe templates

* chore: remove @stagewise/toolbar-next package and related development toolbar component from the project
2025-08-20 01:15:48 +02:00
Vlad Sazonau
205f9bc234
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
* feat: enhance Android PDF viewer with error handling and memoization

- Added error handling for PDF loading failures in AndroidPdfViewer, utilizing Sentry for logging and user-friendly toast notifications.
- Implemented memoization for the InvoicePdfTemplate to optimize rendering performance.
- Updated layout.tsx to include necessary CSS for PDF rendering.
- Adjusted index.tsx comments for clarity on viewer types.

* feat: add new toasts, cleanup landing page, add stripe template

* feat: enhance PDF footer and update tests for dynamic content

- Introduced a new InvoiceFooter component to modularize footer rendering in PDF templates, improving code organization and reusability.
- Updated PDF tests to verify dynamic content in footers, including current month/year and payment due date, ensuring accurate invoice representation.
- Added PROD_WEBSITE_URL to config for consistent URL usage across components.
- Improved Telegram message handling with cache control headers for better performance.

* feat: implement invoice sharing logic and logo handling for stripe template

- Added state management for sharing invoices, including validation for logos that exceed URL length limits.
- Updated the share invoice button to reflect sharing capabilities based on logo presence.
- Introduced logo upload functionality with validation for file type and size, enhancing user experience.
- Refactored invoice form to disable sharing when a logo is present in Stripe templates, ensuring compliance with URL constraints.
- Improved toast notifications for user feedback on sharing and logo upload actions.

* feat: update invoice descriptions and enhance date handling in PDF templates

- Updated invoice descriptions in multiple languages to clarify that the tool runs entirely in the browser.
- Refactored date handling in the Stripe template components to ensure accurate formatting based on the invoice's language settings.
- Introduced a new InvoiceBody component to modularize the PDF rendering process, improving code organization and reusability.
- Enhanced the StripeDueAmount and StripeFooter components to reflect the updated date logic and improve overall clarity in the invoice presentation.
- Added localization support for date formatting using dayjs across various components.
- Added new currencies

* chore: remove unused vercel.json and add new e2e tests for invoice sharing and PDF generation

- Deleted the unused vercel.json configuration file.
- Updated the about page test to reflect changes in the description for clarity.
- Removed redundant error message checks in the invoice form tests.
- Added new e2e tests for PDF generation and sharing logic specific to the Stripe template, ensuring comprehensive coverage of invoice functionalities.

* feat: enhance umami tracking with invoice template data and improve error handling

* refactor: improve tooltips text and design, improve error handling and test assertions in invoice form and logo upload utilities

- Enhanced error handling in the logo upload function to ensure input elements are present and base64 data is provided.
- Updated e2e tests for the invoice generator page to use more reliable URL assertions.
- Refactored invoice form logic to simplify sharing validation based on template and logo presence.
- Improved button accessibility and user experience by clarifying aria-disabled attributes in various components.

* refactor: update CTA toast logic and improve button components

- Changed the timer for showing the CTA toast from 30 seconds to 40 seconds.

* fix tests

* fix: update date formatting in general information section to respect locale settings

* feat: add changelog page with mdx support

- Added support for MDX files in the Next.js configuration, allowing for rich content in the changelog.
- Introduced a new changelog layout and page structure to display updates effectively.
- Implemented dynamic routing for individual changelog entries, improving navigation and user experience.
- Enhanced the footer component with subscription functionality and improved styling.
- Updated translations to include changelog links across multiple languages.
- Added new components for date formatting and project logo descriptions to enhance the changelog presentation.

* feat: add environment configuration and update social links in tests

- Created a new .env.example file to define environment variables for server and client configurations, including Sentry, Resend, Redis, and personal information for invoices.
- Updated e2e tests to utilize GITHUB_URL and TWITTER_URL from the config for social media links, enhancing maintainability and consistency across the application.
- Refactored footer and about page components to use dynamic URLs for GitHub and Twitter, improving code clarity and reducing hardcoded values.

* chore: update environment configuration and README for clarity

- Updated .env.example to set default values for Sentry and Google Drive API configurations, enhancing clarity for new developers.
- Modified env.ts to remove minimum length validation for environment variables, simplifying the setup process.
- Enhanced README with quick start instructions and service links for Resend, Upstash, Google Drive API, and Telegram Bot API, improving onboarding experience.

* chore: add localtunnel script to package.json and adjust input component styles

- Added a new script expose-to-internet in package.json for localtunnel to facilitate external access during development.
- Updated the Input component to conditionally adjust width for date type inputs, enhancing responsiveness and usability.

* fix: update tagline in various components for consistency

* refactor: enhance loading component layout and styling

* refactor: improve invoice form validation and template handling

- Enhanced the InvoiceForm component to validate data before saving to local storage using Zod.
- Updated GeneralInformation component to handle template-specific updates for date format and clear fields based on the selected template.
- Adjusted StripeSellerBuyerInfo component styles for better spacing and consistency.
- Improved InvoiceBody component to handle invoice total formatting more robustly.
- Updated translations for 'billTo' in multiple languages for better accuracy.

* footer fix

* refactor: standardize date formatting in invoice templates

- Introduced STRIPE_DEFAULT_DATE_FORMAT constant for consistent date formatting across invoice-related components.
- Updated template tests to utilize the new date format for improved maintainability.
- Adjusted GeneralInformation component to set date format based on the selected template, enhancing clarity and consistency.
2025-07-09 01:39:21 +02:00
Vlad Sazonau
d3f2bdc497
chore: add tsgo, some dev libs and file structure improvements (#116)
* chore: update package.json and pnpm-lock.yaml for improved diagnostics and new dependencies

- Enhanced type-check command in package.json to include diagnostics for better TypeScript error reporting.
- Added new command type-check:go for running tsgo with diagnostics.
- Updated pnpm-lock.yaml to reflect changes in package versions and ensure consistent dependency management.
- Updated README.md to improve project description and support message.
- Refactored layout.tsx to include performance monitoring and development tools.
- Improved generate-invoice API route for better notification handling and error logging.

* move component folder

* chore: update package.json and pnpm-lock.yaml to include react-scan for performance monitoring

- Added react-scan dependency to package.json for enhanced React component diagnostics.
- Updated pnpm-lock.yaml to reflect the new dependency and ensure consistent package management.
- Modified layout.tsx to conditionally render ReactScan only in development mode, improving performance in production.

* fix: enhance initialization of react-scan component

- Added a useRef hook to prevent multiple initializations of the react-scan tool.
- Implemented error handling during initialization to log failures gracefully.
- Updated useEffect to ensure react-scan is only initialized once, improving performance and reliability.

* chore: update Playwright test commands and improve dialog handling in tests

- Modified test commands in package.json and GitHub Actions to use the 'list' reporter for better output readability.
- Enhanced invoice form tests to interact with the dialog component more effectively, ensuring visibility checks are performed on the dialog rather than the page.
- Adjusted layout.tsx to comment out development tools for cleaner production builds.
2025-05-26 02:24:53 +02:00
Vlad Sazonau
d8099a9eb9
attempt to fix android pdf preview (#115)
* attempt to fix android

* attempt to fix android

* attempt to fix android

* refactor: enhance PDF preview error handling in PdfViewer component

- Improved error handling in the BlobProvider for mobile PDF previews, providing user-friendly messages for loading and generation errors.
- Removed unused code and imports to streamline the PdfViewer component.
- Ensured consistent loading indicators and error messages for a better user experience.

* feat: implement Android PDF viewer and enhance device detection

- Added AndroidPdfViewer component to handle PDF previews specifically for Android devices, utilizing BlobProvider for compatibility.
- Updated device context to include Android detection, improving user experience on mobile platforms.
- Enhanced RootLayout to pass Android detection state to DeviceContextProvider.
- Refactored PdfViewer to conditionally render AndroidPdfViewer based on device type, ensuring seamless PDF viewing experience across devices.

* fix pdf worker

* refactor: improve Android PDF viewer loading and error handling

- Updated loading indicators in AndroidPdfViewer for better user experience, ensuring consistent styling and responsiveness.
- Simplified error messages for PDF generation failures, enhancing clarity for users.
- Refactored loading components in index.tsx to differentiate between desktop and Android viewers, improving modularity and readability.

* remove log
2025-05-20 23:20:31 +02:00
Vlad Sazonau
d6a8e5cafb
feat: save invoice to google drive and tg notification (#113)
* feat: enhance invoice generation with Telegram notifications and data compression

- Integrated Telegram messaging functionality to notify users about generated invoices, including attachments.
- Validated and compressed invoice data before generating the invoice URL for improved performance.
- Updated email content to include a link to view the invoice online, enhancing user experience.
- Added a new Telegram service for sending messages and files, ensuring robust communication.

* fix: enhance currency display in invoice form

- Updated the invoice form to include full currency names alongside symbols in the currency selection options.
- Introduced a new constant, CURRENCY_TO_LABEL, to map currency codes to their respective full names, improving clarity for users.
- Adjusted E2E tests to verify the correct display of currency options with full names.

* feat: integrate Google Drive functionality for invoice storage and enhance Telegram notifications

- Added Google Drive integration to create or find invoice folders and upload generated invoices.
- Enhanced the generate-invoice API route to include links to the uploaded invoices in Google Drive within email and Telegram notifications.
- Updated notification messages to provide clearer information about invoice details and access links.
- Introduced a new Google Drive service for managing folder creation and file uploads, improving invoice management.

* refactor: update Google Drive integration for invoice management

- Refactored the generate-invoice API route to improve clarity in folder path handling by renaming variables for better understanding.
- Enhanced the Google Drive service to streamline folder creation and retrieval, ensuring consistent naming conventions.
- Updated the bufferToStream function to utilize Node's Readable.from() for improved efficiency in streaming file uploads.
- Removed unnecessary error handling for existing folders, simplifying the logic for folder management.

* add zod schema to route.tsx

* feat: add email recipient validation to invoice generation API

* refactor: integrate environment variables using @t3-oss/env-nextjs

- Introduced a new env.ts file to centralize environment variable management with Zod validation.
- Updated various components and services to utilize the new env module for accessing environment variables, enhancing code clarity and maintainability.
- Removed direct process.env access in favor of the env object, ensuring consistent error handling and validation across the application.

* env fix

* refactor: update API route

- Ensured dynamic rendering is enforced for the invoice generation process.
2025-05-17 15:11:07 +02:00
Vlad Sazonau
6d347fc6cd
metadata updates (#110)
* chore: update asset URLs to use STATIC_ASSETS_URL for improved resource management

- Updated Open Graph image URLs in layout and About page metadata to utilize STATIC_ASSETS_URL for better asset delivery and cache management.
- Ensured consistency in asset references across the application by replacing hardcoded URLs with dynamic constructs.

* minor change

* fix: update metadata titles for consistency across application

- Revised the title in the main layout and About page metadata to include EasyInvoicePDF.com for improved branding and consistency.
- Adjusted Open Graph and Twitter card titles to reflect the new format, enhancing SEO and user experience.

* fix: update metadata and titles for improved branding consistency

- Revised titles and descriptions across multiple languages to include EasyInvoicePDF.com, enhancing brand visibility and consistency.
- Updated the E2E test title to reflect the new branding.
- Adjusted Open Graph metadata to ensure cohesive representation of the application.

* fix title

* fix: enhance metadata for improved branding consistency across multiple languages

- Updated titles, descriptions, and keywords in various language files to include the site name, enhancing brand visibility.
- Adjusted the layout file to utilize the new siteName property for Open Graph metadata, ensuring cohesive representation across the application.

* meta upd

* fix: update siteName in metadata for improved branding consistency across multiple languages

- Revised siteName entries in various language files to remove with Live Preview for a cleaner presentation.
- Adjusted the main layout metadata to reflect the updated siteName, ensuring cohesive branding across the application.

* fix: update page titles and metadata for improved branding consistency

- Revised the title in the About page and Invoice Generator page to reflect the new branding format.
- Updated layout metadata to ensure cohesive representation across the application.
- Enhanced E2E tests to verify the updated titles for better coverage and consistency.

* meta text upd
2025-05-12 13:28:33 +02:00
Vlad Sazonau
87534e4f17
chore: update routing and configuration for improved SEO and user exp… (#102)
* chore: update routing and configuration for improved SEO and user experience

- Refactored middleware to handle redirection from root to the homepage, enhancing navigation consistency.
- Updated Next.js configuration to include a redirects function for better routing management.
- Enhanced robots.txt to allow indexing of the root page while disallowing app-related paths.
- Improved sitemap generation to reflect the new routing structure.
- Removed deprecated patterns from ESLint configuration for cleaner code.
- Updated NotFound and Error components to provide user-friendly messages and links to the homepage.
- Added loading and error handling components to enhance user experience during data fetching.

* chore: update Playwright configuration and E2E tests for improved routing and timeout settings

- Reduced Playwright retries from 2 to 1 for CI environments to streamline test execution.
- Increased timeout for expect assertions from 25 seconds to 30 seconds to enhance reliability.
- Updated E2E tests to reflect new routing structure, changing expected URLs from /en/app to / for better consistency across tests.
- Modified video source URLs in tests to point to the new CDN for improved asset management.

* chore: update README and enhance PDF download link notifications

- Added new features section to README.md, highlighting live preview, shareable links, instant download, multi-language support, and European VAT calculation.
- Updated toast notification title and description in the PDF download link component to reflect user-friendly messaging about supporting the project.

* chore: update i18n schema and enhance E2E tests for routing validation

- Renamed i18n messages schema file for clarity and consistency.
- Added a new test to validate redirection from /:locale/app to / for improved routing accuracy.
- Enhanced Not Found page tests to verify correct URL handling for non-existent pages across multiple locales.
- Updated package.json to include a test script for Playwright, streamlining test execution.

* style upd

* chore: simplify middleware configuration for i18n routing

- Updated middleware to match only "/:locale/about" paths for internationalization.
- Removed unnecessary comments and streamlined the matcher configuration for clarity.

* chore: update ESLint configuration and add project description

- Removed deprecated patterns from ESLint configuration for cleaner code.
- Added a new file  with a detailed description of the EasyInvoicePDF project, highlighting its features and main pages.
- Simplified the NotFound and Error components by removing unnecessary comments and imports.

* fix: implement smooth scrolling behavior on mount in AppPageClient

- Restored the smooth scrolling effect to the top of the App page on component mount for improved user experience during navigation.
2025-05-05 21:18:29 +02:00
Vlad Sazonau
8ba995d276
chore: refactor middleware for root redirection and update configuration (#100)
* chore: refactor middleware for root redirection and update configuration

- Removed the redirects function from next.config.mjs and implemented custom middleware to handle redirection from the root path to /en/app.
- Updated robots.txt to disallow root indexing due to redirection.
- Enhanced sitemap generation by removing the root URL entry.
- Added JSON-LD schema for FAQ section in the About page to improve SEO.
- Updated package.json to include schema-dts for structured data handling.

* fix: update URL construction in AppPageClient to use window.location.origin for better compatibility

* fix: update About page content and JSON-LD schema for improved clarity and SEO

- Revised the description in the About page to enhance clarity regarding the tool's functionality.
- Updated the JSON-LD schema to include detailed information about the About page and its features, improving SEO and structured data representation.
- Adjusted the layout and styling of the About page for better responsiveness and user experience.

* fix: enhance scrolling behavior in About and App pages

- Updated the GoToAppButton component to disable default scrolling behavior on link click, ensuring consistent navigation experience.
- Implemented smooth scrolling to the top of the App page on mount, improving user experience during page transitions.

* fix: enhance JSON-LD schema in layout for improved SEO and clarity

* remove unused code

* fix: update middleware redirection status code from 301 to 308 for method preservation

* fix: update styling and accessibility in About page HeroSection

- Replaced checkmark icon with an emoji for improved accessibility.
- Updated gradient background for the browser chrome bar to enhance visual appeal.
- Adjusted color codes for the status indicators to maintain consistency and improve aesthetics.
2025-04-28 01:14:17 +02:00
VladSez
549fed296c chore: update package manager and Playwright timeout settings; enhance Sentry configuration for better environment checks
- Updated package manager version from pnpm@10.6.5 to pnpm@10.9.0 in package.json.
- Increased Playwright expect assertion timeout from 15 seconds to 25 seconds for improved test reliability.
- Refactored Sentry configuration in client, edge, and server files to utilize environment checks for enabling Sentry and DSN management, ensuring better performance and clarity in production environments.
2025-04-23 23:42:07 +02:00
Vlad Sazonau
f86dabee91
feat: i18n /about page, new translations and currencies and other improvements (#84)
* i18n init

* chore: update README and refactor localization messages

- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.

* chore: update README and refactor localization messages

- Updated the analytics link in README.md to point to the new Umami dashboard.
- Refactored localization messages in en.d.json.ts to use consistent JSON formatting.
- Introduced a new config.ts file to manage application URL and port settings.
- Updated layout components to utilize APP_URL for metadata base URL.
- Added support for additional languages in the language switcher component.

* chore: change redirect to permanent: false in next.config.mjs

* feat: localize not-found page

* fix: languages

* refactor: update language handling and improve invoice form components

- Renamed MAP_LOCALE_TO_LABEL to MAP_LOCALE_TO_LANGUAGE for clarity in language switcher.
- Enhanced language selection logic in GeneralInformation component to handle unsupported languages gracefully.
- Adjusted invoice PDF download link styling for Portuguese language support.
- Updated translations to include additional languages (German, Spanish, Portuguese, Russian, Ukrainian) with proper formatting for invoice items table.

* chore: update .gitignore and .prettierignore for i18n files

- Added messages/en.d.json.ts to .gitignore to exclude localization files from version control.
- Created .prettierignore to prevent formatting of messages/en.d.json.ts for consistent localization handling.
- Updated INITIAL_INVOICE_DATA to set typeOfGTUFieldIsVisible to false for improved invoice form logic.

* fix

* chore: update Playwright configuration and improve invoice form tests

- Changed Playwright trace option from on-first-retry to retain-on-failure for better debugging.
- Updated invoice form test to ensure the PDF visibility toggle is unchecked by default.
- Removed redundant tooltip handling logic in seller test for cleaner code.
- Added new hero and project logos as SVG components for better asset management.
- Implemented smooth scrolling in global CSS for improved user experience.

* feat: enhance localization for About page and add new features

- Added comprehensive localization support for the About page in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian).
- Introduced new features in the About section, including live preview, shareable links, instant download, multi-language support, VAT support, and open-source information.
- Updated the UI components to utilize localized strings for titles, descriptions, and buttons, improving user experience and accessibility.
- Refactored the About page to streamline the rendering of features and call-to-action sections with dynamic translations.

* feat: implement translation validation and enhance localization structure

- Added translation validation logic in next.config.mjs to ensure integrity of localization files.
- Introduced new schemas for i18n messages and translations using Zod for better type safety and validation.
- Updated invoice PDF template components to utilize the new TRANSLATIONS structure for improved localization handling.
- Enhanced Russian localization for the About page, updating titles and descriptions for consistency.
- Added jiti as a dependency for dynamic module loading in the validation process.

* refactor: enhance button components and improve layout responsiveness

- Refactored button components in the About and App pages to utilize the  prop for better integration with links.
- Updated layout classes for responsive design, ensuring proper alignment and spacing across different screen sizes.
- Adjusted the height of the language selector for improved usability.
- Optimized image attributes for better performance and accessibility.

* fix: e2e test

* minor fixes

* feat: add error handling component and enhance localization for error messages

- Introduced a new Error component for handling errors in the application, featuring user-friendly messages and Sentry integration for error tracking.
- Added comprehensive localization support for error messages in multiple languages (German, Spanish, Portuguese, Russian, Ukrainian), ensuring consistent user experience across different locales.
- Updated schemas for i18n messages to include error handling structure, improving type safety and validation.
- Refactored invoice form components to utilize new currency symbols and language labels for better clarity and usability.

* feat: enhance localization support and add new languages

- Updated English localization to include ten supported languages for invoice creation, improving clarity and user experience.
- Added French, Italian, and Dutch localization files, ensuring comprehensive language support across the application.
- Enhanced the language switcher component to accommodate new languages, improving accessibility and usability for users.
- Updated schema and translation files to reflect the new languages, ensuring type safety and validation consistency.

* feat: enhance localization and error handling for About page

- Updated localization files to include a new switchLanguage button text in multiple languages, improving user experience for language switching.
- Enhanced error handling by introducing a new Error component for better user feedback and Sentry integration.
- Improved metadata generation in the About page layout to handle errors gracefully, ensuring robust localization support.
- Refactored the LanguageSwitcher component to utilize localized button text, enhancing accessibility and usability.

* refactor: improve layout and localization handling in About and App pages

- Adjusted layout structure in the About page header for better responsiveness and alignment.
- Updated the LanguageSwitcher component to remove unnecessary locale display, enhancing clarity.
- Modified the Home component to pass locale as a prop to ProjectInfo, ensuring consistent localization support.
- Enhanced the Logo component's styling for improved visual consistency across different screen sizes.

* feat: enhance localization and add meta tags for About page

- Updated localization files to include a new tagline in multiple languages, improving user experience and consistency.
- Modified the About page to display the tagline dynamically, enhancing the overall layout and responsiveness.
- Added a new script in package.json for checking site metadata, improving development workflow.
- Introduced a new dependency for handling email sending, expanding functionality for future features.

* feat: implement newsletter subscription feature with localization support

- Added a new subscription action to handle user email subscriptions, including rate limiting and error handling.
- Created a confirmation page for verifying subscription tokens, enhancing user experience and security.
- Introduced a new SubscribeInput component for user input, featuring success and error messages.
- Updated localization files to include newsletter-related texts in multiple languages, improving accessibility.
- Enhanced the About and App pages to include newsletter subscription sections, promoting user engagement.

* feat: enhance localization for newsletter subscription messages

- Added email language information to localization files in multiple languages, improving user clarity regarding email communication.
- Updated SubscribeInput and related components to display the new email language info, enhancing user experience.
- Modified i18n schema to include email language information, ensuring type safety and validation consistency.

* feat: add robots and sitemap generation for SEO optimization

- Introduced robots.ts and sitemap.ts files to manage SEO directives and sitemap generation, enhancing search engine indexing.
- Configured robots.txt rules to allow indexing of specific routes while disallowing app-related paths, improving site visibility.
- Implemented dynamic sitemap generation based on supported languages, ensuring up-to-date indexing information for search engines.

* feat: enhance subscription token verification with rate limiting and error handling

- Implemented IP-based rate limiting for subscription token verification attempts, allowing a maximum of 5 attempts per hour per IP.
- Updated the verifySubscriptionToken function to include error messages for invalid token formats and rate limit exceedance.
- Enhanced the ConfirmSubscriptionPage to display specific error messages based on verification results, improving user feedback.

* fix: update email development script directory in package.json

- Modified the dev:email script to specify the directory for email templates, ensuring correct path usage during development.

* feat: enhance locale validation and static rendering in NotFound and layout components

- Implemented locale validation in NotFound and layout components to ensure only supported locales are processed, defaulting to 'en' for invalid locales.
- Updated setRequestLocale calls to enable static rendering, preventing dynamic server errors as per Next.js guidelines.
- Improved comments for clarity on locale handling and static rendering implications.

* feat: enhance invoice form tests and localization messages

* fix: update invoice form test selectors and localization messages

- Changed the role selectors for the Amount and Net Price fields in invoice form tests to include more descriptive names: Amount (Quantity) and Net Price (Rate or Unit Price).
- Updated localization messages in Portuguese to reflect the correct terminology for VAT support, enhancing clarity for users.
- Adjusted test cases to ensure they align with the updated field names, improving test accuracy and maintainability.

* feat: refactor NotFound component and introduce locale-specific handling

- Converted the NotFound component to support locale-specific rendering by creating a new locale-based NotFound component.
- Implemented locale validation to ensure only supported locales are processed, enhancing user experience.
- Updated comments for clarity on static rendering implications and locale handling.
- Added a catch-all page to handle undefined routes, improving navigation consistency.

* feat: add end-to-end tests for About page and Not Found page

- Introduced comprehensive Playwright tests for the About page, covering content visibility in English, French, and German, as well as language switching functionality.
- Implemented tests for the Not Found page to ensure proper error handling and navigation across multiple locales.
- Enhanced the About page components with data-testid attributes for improved testability.
- Updated the Not Found component comment for clarity on client-side rendering requirements.

* refactor: move Not Found page tests to a dedicated file

- Extracted Not Found page tests from the About page test file into a new dedicated test file for improved organization and maintainability.
- Retained existing test cases for various locales, ensuring comprehensive coverage of error handling and navigation.
- Updated the test structure to enhance clarity and separation of concerns in the test suite.

* feat: enhance About page tests and localization for newsletter subscription

- Added tests for the newsletter subscription form visibility and functionality in English and French, ensuring comprehensive coverage of user interactions.
- Updated footer links in tests to verify correct attributes and visibility for social media and feedback links.
- Enhanced localization files to include new button labels and feedback options across multiple languages, improving user experience and consistency.
- Refactored the SubscribeSection component to include an ID for easier test targeting and improved accessibility.

* fix(ci): update Playwright report path in e2e workflow

* feat: enhance invoice form with dynamic invoice number handling and localization

- Introduced InvoiceNumberHelperMessage component to provide user guidance on invoice number format and switching to default.
- Updated invoice number initialization in INITIAL_INVOICE_DATA to include localized labels.
- Enhanced language selection to automatically update the invoice number format based on the selected language.
- Improved invoice number validation in the schema to enforce character limits, ensuring better user input handling.

* chore: update .gitignore and refactor PDF test download handling

- Added 'playwright-test-downloads/' to .gitignore to prevent tracking of test downloads.
- Refactored PDF test download logic to improve directory handling and ensure recursive creation of download directories.
- Updated filename generation in InvoicePDFDownloadLink component to extract invoice number correctly for better file naming consistency.

* refactor: move default buyer and seller data to constants

- Refactored DEFAULT_BUYER_DATA and DEFAULT_SELLER_DATA from schema to constants for better organization and maintainability.
- Updated relevant test files and components to import default data from the new constants location.
- Improved clarity and separation of concerns in the codebase.

* fix: improve invoice number handling in general information section

- Updated invoice number splitting logic to correctly handle spacing after the colon for better parsing.
- Enhanced language change functionality to retain the invoice number suffix, improving user experience during language switching.

* fix: update invoice number suffix handling in general information section

- Modified invoice number suffix assignment to default to the current month and year if not provided, ensuring consistent formatting.
- Adjusted end-to-end test to reflect the updated invoice number format

* feat: integrate video demo functionality and update UI components

- Added Video component to handle video playback with intersection observer for performance optimization.
- Implemented video demo dialog in the Home and About pages to enhance user experience with a visual guide on invoice creation.
- Updated the About page to replace static image with video, improving engagement and interactivity.
- Introduced new easy-invoice-demo.mp4 and easy-invoice-hero.webp assets for the demo functionality.
- Refactored ProjectInfo component to include a button for accessing the demo video, enhancing user guidance.

* fix: update video component and tests for better playback handling

- Removed unnecessary condition from the e2e workflow for uploading Playwright reports.
- Enhanced the About page test to check for video attributes, ensuring proper visibility and functionality.
- Updated the Video component to include a testId prop for improved test targeting and added error handling for video playback.
- Implemented cleanup logic in the Video component to handle playback errors gracefully during component unmounting.

* fix: enhance About page tests for language navigation

* fix: increase timeout for Playwright expect assertions to improve test reliability

* fix: increase Playwright retries and e2e workflow timeout for improved test stability

* feat: add loading skeleton component and About page loading state

- Introduced a new Skeleton component for loading placeholders.
- Implemented AboutLoading component to display loading state for the About page, enhancing user experience during data fetching.
- Structured the layout with responsive design using Tailwind CSS, ensuring a consistent look across devices.

* fix: update metadata titles and descriptions for localization

- Modified titles in the metadata section for various languages to include About for clarity.
- Updated VAT support descriptions to specify European VAT for better accuracy across multiple languages.
- Removed redundant meta objects from the About section in localization files to streamline the structure.

* feat: refactor invoice number handling to support object structure

- Updated invoice number management to use an object with label and value, enhancing clarity and flexibility.
- Modified relevant components and tests to accommodate the new structure, ensuring consistent data handling across the application.
- Implemented breaking change handling for legacy invoice number format, improving backward compatibility.
- Enhanced form validation and error messaging for the new invoice number fields.

* feat: enhance routing and SEO configurations

- Updated ESLint configuration to restrict imports from @react-pdf/renderer to the browser-specific version for better compatibility.
- Modified Next.js routing to redirect root to /en/app, ensuring a permanent redirect for improved SEO.
- Enhanced robots.txt to allow indexing of the root and about pages while disallowing app routes and subscription confirmation pages.
- Refactored sitemap generation to include the new app route and ensure proper indexing of allowed pages.
- Updated metadata in layout and confirm subscription pages to manage indexing behavior effectively

* feat: update ESLint rules and refactor navigation imports

- Enhanced ESLint configuration to restrict imports from  and , directing to  for improved routing consistency.
- Updated various components to use the new navigation imports and adjusted link paths to  for better user experience.
- Ensured proper error handling and user-friendly messages in the NotFound and Error components.

* fix: improve styles

* feat: add GitHub Actions workflow for E2E test failure notifications

- Introduced a new workflow to notify via GitHub issue when Playwright E2E tests fail.
- The workflow triggers on completion of the E2E tests and creates an issue with relevant details, enhancing visibility on test failures.

* chore: remove GitHub Actions workflow for E2E test failure notifications

* chore: update E2E workflow to send email notifications and adjust URL in tests

- Added email notification step to the E2E workflow, sending results of Playwright tests to a specified email.
- Updated the expected URL in the not-found-page test from /en/app to /pl/app for localization consistency.

* chore: enhance E2E workflow to calculate and report test duration

- Added duration calculation for Playwright tests in the E2E workflow, outputting the formatted duration to GitHub Actions.
- Updated email notification to include the duration of the test run for better insights.

* ci improve

* ci improve

* ci improve

* chore: refactor project structure and add utility types

- Removed unused image file .
- Introduced new TypeScript utility types in  for better type handling.
- Updated import paths in  and  to use the new  directory structure.
- Added common error handling components in .
- Refactored invoice-related utility functions into .
- Implemented rate limiting functionality in  and Redis connection in .
- Cleaned up unused utility functions in .

* feat: add FAQ section to About page and update translations

- Implemented a new FAQ section in the About page, enhancing user experience by providing answers to common questions.
- Added corresponding translations for the FAQ section in multiple languages (de, en, es, fr, it, nl, pl, pt, ru, uk).
- Updated E2E tests to verify visibility of the FAQ section and its links.

* feat: integrate react-aria-components for enhanced disclosure functionality

- Added  to the project dependencies for improved accessibility and UI interactions.
- Implemented a new  component in the About page, replacing the previous accordion structure with a more accessible disclosure pattern.
- Updated FAQ section to utilize the new disclosure components, enhancing user experience and maintainability.
- Adjusted styles for better responsiveness and visual consistency.

* feat: enhance error handling for shared invoice URL

- Added user-friendly error notification when the shared invoice URL is incorrect.
- Implemented a toast message with a clear button to redirect users back to the homepage, improving user experience and error management.

* feat: update translations for multi-language support and customization options
2025-04-19 19:56:32 +02:00
Vlad Sazonau
8ba571bdcb
chore: remove @openpanel/nextjs dependency and update Sentry configuration for production environment (#85)
- Removed the @openpanel/nextjs dependency from package.json to streamline the codebase.
- Updated Sentry configuration in client, edge, and server files to use NODE_ENV instead of VERCEL_ENV for production checks.
- Refactored error handling in invoice form tests to improve clarity and maintainability.
- Enhanced error toast messages for better user guidance during PDF generation failures.
2025-03-31 17:38:10 +02:00
Vlad Sazonau
e6f54d5dfc
feat: add e2e tests with playwright and other improvements (#79)
* feat: Add language attribute to date input fields in invoice form components

- Include `lang="en"` attribute in date input fields of `InvoiceForm` and `GeneralInformation` components for improved accessibility and localization support.

* fix: Update language attribute for date input fields in invoice form components

* refactor: Improve layout and organization of invoice components

- Remove unnecessary margin from the main container in the Home component.
- Wrap the share invoice button and PDF download link in a fragment for better structure.
- Adjust margins for the ProjectInfo and action button container for improved spacing.
- Update the InvoicePDFViewer height to use full height for better responsiveness.
- Remove the deprecated RegenerateInvoiceButton component to streamline the codebase.
- Update the InvoiceClientPage to accept handleShareInvoice prop for better functionality.
- Clean up unused language attributes in date input fields across invoice form components.

* feat: Integrate Playwright for end-to-end testing and enhance invoice form components

- Add Playwright configuration and dependencies for E2E testing.
- Create GitHub Actions workflow for automated E2E tests on deployment.
- Implement initial E2E tests for the Invoice Generator Page, verifying UI elements and form functionality.
- Refactor invoice form components to include data-testid attributes for better testability.
- Update .gitignore to exclude Playwright-related files and directories.

* chore: Update GitHub Actions workflow for E2E testing and enhance test coverage

- Upgrade pnpm version from 8 to 10 in the E2E workflow for improved package management.
- Add new test case to verify header buttons and links on the Invoice Generator Page, ensuring UI elements are displayed correctly and have the expected attributes.

* chore: Enhance ESLint configuration for Playwright integration

- Add Playwright ESLint plugin to package.json for improved E2E testing support.
- Update .eslintrc.json to include overrides for E2E test files.
- Clean up GitHub Actions workflow by removing unnecessary pnpm version specification.

* chore: Update Playwright configuration and improve test assertions

- Increase timeout for expect assertions and test execution from 15 seconds to 30 seconds for better stability in E2E tests.
- Comment out mobile viewport tests to streamline configuration and focus on desktop testing.

* chore: Update configuration and refactor invoice form components

- Add compiler options to remove console logs in production and enhance logging for fetch requests in next.config.mjs.
- Update package.json to include new type definitions for ua-parser-js and add ua-parser-js as a dependency.
- Refactor invoice form components to remove form prefix IDs, simplifying data-testid attributes for better testability.
- Introduce DeviceContext for managing device type state and improve responsiveness in invoice form components.
- Implement server-side device detection using user agent parsing for better rendering on mobile and desktop views.
- Update media query hooks to streamline device type checks across components.

* chore: Update Playwright configuration and enhance invoice form tests

- Reduce timeout for expect assertions from 30 seconds to 15 seconds for improved test performance.
- Add new test for handling currency switching in the Invoice Generator Page, verifying correct currency display and calculations.
- Refactor buyer and seller information components to include tooltip messages and improve accessibility with aria attributes.
- Update BuyerDialog and BuyerManagement components to enhance user experience with better visibility and edit functionality for buyer details.

* chore: Update Playwright installation command in GitHub Actions workflow

- Modify Playwright installation command to remove explicit browser specification, allowing for default browser installation with dependencies.

* chore: Update GitHub Actions E2E workflow for Playwright report handling

- Change condition for uploading Playwright report to ensure it uploads regardless of test outcome.
- Reduce retention days for uploaded reports from 5 to 3 for better resource management.

* chore: Update Playwright installation command in GitHub Actions workflow

- Specify installation of Chromium and WebKit browsers along with dependencies for enhanced testing capabilities.

* chore: Enhance E2E tests for seller and buyer management functionality

- Add tests to verify the deletion process for sellers and buyers, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Introduce default data constants for sellers and buyers to streamline test setup.
- Improve accessibility by adding screen reader text for delete buttons in the seller management component.

* chore: Pin versions of GitHub Actions in E2E workflow for stability

- Update actions/checkout, pnpm/action-setup, actions/setup-node, and actions/upload-artifact to specific versions for improved reliability and security.
- Comment added to clarify the rationale for using pinned versions.

* chore: Add E2E test for accordion items visibility and localStorage state management

- Implement test to verify that accordion items are visible, collapsible, and their state is correctly saved in localStorage.
- Ensure state persistence across page reloads and validate updated states after toggling sections.
- Introduce ACCORDION_STATE_LOCAL_STORAGE_KEY and AccordionState type for better type safety and clarity.

* chore: Update Playwright configuration and add comprehensive E2E tests for seller and buyer management

- Increase timeout for expect assertions and test execution from 30 seconds to 60 seconds for improved stability in E2E tests.
- Introduce new E2E tests for seller and buyer management, covering creation, editing, and deletion processes, including confirmation dialogs and success messages.
- Ensure localStorage data is correctly saved and parsed for both seller and buyer information.
- Implement detailed validation for form fields and visibility toggles in seller and buyer management dialogs.
- Enhance accessibility by adding screen reader text for buttons and tooltips in the management components.

* chore: Refactor Playwright configuration and enhance invoice item validation tests

- Introduce a constant for timeout values in Playwright configuration for consistency and maintainability.
- Add comprehensive validation tests for amount, net price, and VAT fields in the invoice items section, ensuring proper error messages for invalid inputs.
- Update expected error messages in the schema to match the new formatting for better clarity.
- Improve test structure by utilizing descriptive variable names and modularizing input handling for better readability.

* chore: add pdf e2e tests

- Add `pdf-parse` and its type definitions to package.json for PDF handling capabilities.
- Increase Playwright timeout from 30 seconds to 60 seconds for improved test stability.
- Introduce comprehensive E2E tests for PDF generation, verifying content in both English and Polish.
- Implement cleanup procedures for test downloads to ensure a clean testing environment.
- Validate invoice data updates in the generated PDF, ensuring accurate content reflects user inputs.

* chore: add eslint, knip, lint-staged

* chore: run prettier

* chore: minor improvements

* chore: add more test and improved e2e config

* minor fixes

* minor fixes

* chore: add new test
2025-03-27 21:41:55 +01:00
Vlad Sazonau
1b3aa79553
feat: Add multi-language PDF download feature with multi-select component and create/edite/delete buyer (#73)
* feat: Add multi-language PDF download feature with advanced UI components

- Implement `InvoicePDFDownloadMultipleLanguages` component for downloading PDFs in multiple languages
- Create new UI components: `MultiSelect`, `Badge`, `Command`, `Popover`, and `Separator`
- Add language selection dropdown with advanced interaction and download capabilities
- Integrate custom tooltip and button styling for enhanced user experience
- Implement ZIP archive generation for multiple language PDFs
- Add PRO feature placeholder with commented-out code for future release

* feat: Implement Buyer Management with Local Storage and Form Validation

- Add `BuyerManagement` component for creating, editing, and deleting buyers
- Implement `BuyerDialog` for comprehensive buyer data management
- Integrate Zod schema validation for buyer data
- Add local storage persistence for buyer information
- Include error handling, analytics tracking, and Sentry error logging
- Replace placeholder "New Buyer" button with fully functional management system
- Update invoice form to support dynamic buyer selection and management

* chore: Add Node.js and pnpm version constraints to package.json

- Specify minimum Node.js version as 20.0.0
- Set pnpm package manager version to 10.5.0
- Add `engines` field to enforce development environment compatibility

* chore: Remove pnpm version constraint from package.json

- Remove explicit pnpm version requirement
- Maintain Node.js version constraint
- Simplify package manager configuration

* chore: Upgrade @react-pdf dependencies to latest versions

- Update @react-pdf/renderer from 4.2.4 to 4.3.0
- Remove @react-pdf/layout dependency

* style: Enhance MoneyInput component styling with subtle shadow and improved text color
2025-03-08 23:31:51 +01:00
Vlad Sazonau
6eb6c3aaba
feat: add more sentry captures (#70)
* feat: add more sentry captures

- Add Sentry exception capturing in error handling for multiple components
- Remove redundant logging statements
- Update error handling in various files with Sentry error tracking
- Improve error logging and tracking consistency
- add axiom to middleware

* chore: remove next-axiom logging and related dependencies

* chore: Update dependencies and add Vercel Speed Insights

* remove log.error

* feat: Enhance invoice form with mobile-friendly layout and unique form field identifiers

- Add new `InvoiceClientPage` component to manage mobile and desktop invoice form layouts
- Implement dynamic form field identifiers for mobile and desktop views
- Improve accessibility by generating unique IDs for form inputs
- Refactor invoice form to support multiple view modes
- Add project logo and branding to the main page
- Update component structure to support responsive design

* chore: minor tweaks

* minor tweak

* fix: Correct SVG attribute naming in project logo component

* fix: Improve invoice PDF document title
2025-03-05 22:05:06 +01:00
Vlad Sazonau
f135814eaf
feat: Integrate Sentry for comprehensive error monitoring and tracking (#66)
- Add Sentry configuration for client, server, and edge runtime environments
- Configure error tracking with sampling rates and performance monitoring
- Implement global error handling with Sentry exception capturing
- Add instrumentation for Next.js runtime error tracking
- Update Next.js configuration to support Sentry integration
- Add Sentry-related dependencies to package.json
2025-03-01 23:52:12 +01:00
Vlad Sazonau
b4bbf3370a
feat: Add Axiom logging and enhance error tracking across application + update invoice form styles (#65)
* feat: Add Axiom logging and enhance error tracking across application + update invoice form styles

- Integrate next-axiom for comprehensive logging and web vitals tracking
- Add logging for various error scenarios in invoice generation, form interactions, and PDF downloads
- Implement error logging in seller management, invoice form, and error page
- Create a reusable ErrorGeneratingPdfToast component
- Add web vitals tracking with AxiomWebVitals component
- Enhance analytics and error tracking with detailed log messages

* feat: Enhance error logging
2025-03-01 22:31:09 +01:00
Vlad Sazonau
1dac29c124
feat: Add mobile-friendly tabs for invoice form and PDF preview (#64)
* feat: Add mobile-friendly tabs for invoice form and PDF preview

- Implement Radix UI Tabs component for responsive invoice page layout
- Add dynamic tabs for mobile view with "Edit Invoice" and "Preview PDF" options
- Conditionally render form and PDF viewer based on selected tab
- Include icons for tab triggers to improve visual clarity
- Maintain existing desktop side-by-side layout for larger screens
- Add new Tabs UI component with custom styling

* feat: Enhance invoice form with accordion state persistence and UI refinements

- Add localStorage-based accordion state management for invoice form sections
- Implement accordion state schema with Zod for validation
- Refactor ProjectInfo component in main page
- Improve button and layout styling with responsive margins
- Add fallback for accordion state initialization
- Optimize UI components with consistent spacing and helper messages
2025-02-28 22:14:37 +01:00
Vlad Sazonau
ac5a6f4510
feat: add Radix UI Accordion to invoice form for improved section organization (#56) 2025-02-23 18:29:49 +01:00
Vlad Sazonau
47357962c7
chore: add open panel for analytics (#54)
* chore: add open panel for analytics

* refactor: replace loglib with OpenPanel for analytics tracking

* docs: add support link to README
2025-02-23 01:21:35 +01:00
Vlad Sazonau
bed431f553
feat: save sellers for future use, enhance invoice form with advanced input validation and user experience improvements (#47)
* feat: add seller management with local storage and dialog components

- Introduced new components for managing sellers: SellerManagement and SellerDialog
- Implemented local storage hook (useLocalStorageEntities) for persistent seller data
- Added ability to add, edit, and delete sellers with form validation
- Created new Radix UI dialog and alert dialog components
- Updated invoice form schema to support seller management
- Enhanced invoice form with seller selection and management functionality

* feat: enhance invoice form with advanced input validation and user experience improvements

- Added rich color toasts for form validation errors
- Improved input validation with max length and range constraints
- Enhanced input preview and helper messages for amounts and prices
- Implemented amount-in-words preview for net prices
- Updated PDF template formatting for better readability
- Refactored media query hook and utility functions
- Added more descriptive error messages and input guidance

* feat: extract default seller data and improve seller selection UX

- Created DEFAULT_SELLER_DATA constant in schema for reusable default seller configuration
- Updated seller management component to use default seller data
- Enhanced seller selection dropdown with improved styling and placeholder text
- Simplified seller reset logic across components
2025-02-22 22:27:18 +01:00
Vlad Sazonau
60cdb7d344
feat: Show/hide columns on pdf, add og image, tooltips + other improvements (#36)
* feat: enhance invoice form with new UI components and visibility controls

- Added Radix UI Switch and Tooltip components for improved interactivity
- Introduced field visibility toggles for invoice items
- Added input helper messages for better user guidance
- Updated schema to support new field visibility options
- Refined styling and responsiveness of form elements
- Improved tooltips and helper text across the invoice form

* feat: add comprehensive invoice field visibility controls and date formatting options

- Introduced granular field visibility switches for invoice items and sections
- Added support for multiple date format options
- Enhanced invoice form with dynamic field visibility toggles
- Updated PDF template to conditionally render fields based on visibility settings
- Improved date handling and formatting across invoice generation
- Added validation and helper messages for date-related fields
- Expanded schema to support more flexible invoice configuration

* refactor: update invoice PDF template column styles

- Replaced commented-out column width styles with flex-based layout
- Adjusted column width proportions for better table readability
- Simplified column width definition using flex properties

* chore: upd deps + minor fixes

* fix: improve net price validation error message

* refactor: improve invoice form field rendering and localization

- Reordered error and helper message rendering for better UX
- Added currency context to labels for clarity
- Updated input step and type attributes for improved validation
- Localized numeric inputs with toLocaleString for consistent formatting
- Made unit field optional in invoice item schema

* refactor: improve invoice PDF download and regeneration UX

- Replaced PDFDownloadLink with usePDF hook for better loading state management
- Added loading states and animations for PDF download and regeneration buttons
- Created a new RegenerateInvoiceButton component with improved error handling
- Simplified dynamic imports and component structure
- Enhanced user feedback during PDF generation process

* refactor: optimize imports and remove unused components in invoice page

* refactor: extract loading timeout constant for consistent UX
2025-02-10 22:25:47 +01:00
Vlad Sazonau
a342935e78
feat: update dependencies and enhance invoice form functionality (#14)
* feat: update dependencies and enhance invoice form functionality

- Added new dependencies: @radix-ui/react-label, @radix-ui/react-slot, class-variance-authority, clsx, sonner, tailwind-merge, and tailwindcss-animate.
- Updated package.json and pnpm-lock.yaml to reflect new versions.
- Enhanced the invoice form with improved error handling and UI components.
- Integrated a toast notification system for better user feedback.
- Updated the PDF download link to include invoice language in the filename.
- Improved layout and styling in the invoice form and PDF template components.
- Refactored state management for invoice data to streamline data loading from URL and local storage.

* feat: add Prettier configuration and update project files

- Introduced a Prettier configuration file (.prettierrc.js) for consistent code formatting.
- Updated package.json to include Prettier and its Tailwind CSS plugin as dependencies.
- Made minor formatting adjustments across various components and configuration files for improved readability and consistency.
- Enhanced the loading and invoice form components with better styling and layout adjustments.
- Ensured all JSON files and configuration files have proper formatting and structure.

* feat: enhance invoice sharing and download experience

- Updated toast notification to include rich text formatting for better user guidance on sharing invoices.
- Increased toast duration for improved visibility.
- Refactored layout of the invoice regeneration and download button for better mobile responsiveness.
- Added conditional rendering for the PDF download link based on mobile view.
- Improved styling consistency across components.

* feat: implement responsive PDF download link and add media query hook

- Introduced a custom hook `useMediaQuery` to manage responsive behavior.
- Updated the `InvoicePDFDownloadLink` component to remove mobile-specific prop and enhance styling.
- Modified the main page to conditionally render the PDF download link based on desktop view.
- Enabled server-side rendering for the PDF download link for improved performance.

* feat: enhance invoice PDF layout and translations

- Added a new center style to align content in the invoice items table.
- Updated the invoice items table to apply the center style for better visual alignment of headers.
- Modified translations for 'netAmount' and 'netPrice' to include line breaks for improved readability in the PDF output.

* fix: update link in footer to point to new personal website

* feat: add contact link to footer for user engagement
2025-01-13 22:38:54 +01:00
VladSez
141df9fd4b feat: change analytics lib + minor fixes 2024-11-30 15:36:33 +01:00
VladSez
c6418457ac chore: add metadata + minor fixes 2024-11-30 00:57:44 +01:00
VladSez
04437e829e wip 2024-11-28 23:55:20 +01:00
VladSez
db3c637fb0 Initial commit from Create Next App 2024-10-20 21:26:41 +02:00