Stirling-PDF/.github/workflows
ConnorYoh 9c9acbfb5b
V2: Convert Tool (#3828)
🔄 Dynamic Processing Strategies

- Adaptive routing: Same tool uses different backend endpoints based on
file analysis
- Combined vs separate processing: Intelligently chooses between merge
operations and individual file processing
- Cross-format workflows: Enable complex conversions like "mixed files →
PDF" that other tools can't handle

  ⚙️ Format-Specific Intelligence

  Each conversion type gets tailored options:
  - HTML/ZIP → PDF: Zoom controls (0.1-3.0 increments) with live preview
  - Email → PDF: Attachment handling, size limits, recipient control
  - PDF → PDF/A: Digital signature detection with warnings
  - Images → PDF: Smart combining vs individual file options

 File Architecture

  Core Implementation:
  ├── Convert.tsx                     # Main stepped workflow UI
├── ConvertSettings.tsx # Centralized settings with smart detection
├── GroupedFormatDropdown.tsx # Enhanced format selector with grouping
├── useConvertParameters.ts # Smart detection & parameter management
  ├── useConvertOperation.ts         # Multi-strategy processing logic
  └── Settings Components:
      ├── ConvertFromWebSettings.tsx      # HTML zoom controls
      ├── ConvertFromEmailSettings.tsx    # Email attachment options
├── ConvertToPdfaSettings.tsx # PDF/A with signature detection
      ├── ConvertFromImageSettings.tsx    # Image PDF options
      └── ConvertToImageSettings.tsx      # PDF to image options

 Utility Layer

  Utils & Services:
├── convertUtils.ts # Format detection & endpoint routing
  ├── fileResponseUtils.ts          # Generic API response handling
└── setupTests.ts # Enhanced test environment with crypto mocks

  Testing & Quality

  Comprehensive Test Coverage

  Test Suite:
├── useConvertParameters.test.ts # Parameter logic & smart detection
  ├── useConvertParametersAutoDetection.test.ts  # File type analysis
├── ConvertIntegration.test.tsx # End-to-end conversion workflows
  ├── ConvertSmartDetectionIntegration.test.tsx  # Mixed file scenarios
  ├── ConvertE2E.spec.ts                     # Playwright browser tests
├── convertUtils.test.ts # Utility function validation
  └── fileResponseUtils.test.ts              # API response handling

  Advanced Test Features

  - Crypto API mocking: Proper test environment for file hashing
  - File.arrayBuffer() polyfills: Complete browser API simulation
  - Multi-file scenario testing: Complex batch processing validation
- CI/CD integration: Vitest runs in GitHub Actions with proper artifacts

---------

Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2025-08-01 16:08:04 +01:00
..
ai_pr_title_review.yml chore(deps): bump step-security/harden-runner from 2.12.1 to 2.12.2 (#3849) 2025-07-01 15:39:12 +01:00
auto-labelerV2.yml chore(deps): bump step-security/harden-runner from 2.12.1 to 2.12.2 (#3849) 2025-07-01 15:39:12 +01:00
build.yml V2: Convert Tool (#3828) 2025-08-01 16:08:04 +01:00
check_properties.yml refactor: move modules under app/ directory and update file paths (#3938) 2025-07-14 20:53:11 +01:00
codeql.yml-disabled Bump: Harden Runner from v2.10.2 to v2.10.3 (#2686) 2025-01-13 22:26:05 +00:00
dependency-review.yml chore(deps): bump step-security/harden-runner from 2.12.1 to 2.12.2 (#3849) 2025-07-01 15:39:12 +01:00
deploy-on-v2-commit.yml Update deploy-on-v2-commit.yml 2025-07-29 16:00:08 +01:00
frontend-licenses-update.yml fix(workflows): correct YAML indentation in frontend license update workflow (#4056) 2025-07-30 22:38:03 +01:00
licenses-update.yml fix(ci): disable Gradle caching in GitHub workflows to resolve cache conflicts (#3986) 2025-07-20 21:37:04 +01:00
manage-label.yml chore(deps): bump step-security/harden-runner from 2.12.1 to 2.12.2 (#3849) 2025-07-01 15:39:12 +01:00
multiOSReleases.yml fix(ci): disable Gradle caching in GitHub workflows to resolve cache conflicts (#3986) 2025-07-20 21:37:04 +01:00
PR-Auto-Deploy-V2.yml Support for SSL testing (#4070) 2025-08-01 10:26:20 +01:00
PR-Demo-cleanup.yml fix(ci): correct variable name for deployment comment check in PR-Demo-cleanup workflow (#3946) 2025-07-14 22:21:48 +01:00
PR-Demo-Comment-with-react.yml fix(ci): disable Gradle caching in GitHub workflows to resolve cache conflicts (#3986) 2025-07-20 21:37:04 +01:00
pre_commit.yml ci: enhance GitHub Actions workflows with Gradle setup, caching improvements, and Docker image testing (#3956) 2025-07-16 17:17:11 +01:00
push-docker.yml fix(ci): disable Gradle caching in GitHub workflows to resolve cache conflicts (#3986) 2025-07-20 21:37:04 +01:00
releaseArtifacts.yml fix(ci): disable Gradle caching in GitHub workflows to resolve cache conflicts (#3986) 2025-07-20 21:37:04 +01:00
scorecards.yml chore(deps): bump step-security/harden-runner from 2.12.1 to 2.12.2 (#3849) 2025-07-01 15:39:12 +01:00
sonarqube.yml chore(deps): bump step-security/harden-runner from 2.12.1 to 2.12.2 (#3849) 2025-07-01 15:39:12 +01:00
stale.yml chore(deps): bump step-security/harden-runner from 2.12.1 to 2.12.2 (#3849) 2025-07-01 15:39:12 +01:00
swagger.yml fix(ci): disable Gradle caching in GitHub workflows to resolve cache conflicts (#3986) 2025-07-20 21:37:04 +01:00
sync_files.yml refactor: move modules under app/ directory and update file paths (#3938) 2025-07-14 20:53:11 +01:00
testdriver.yml fix(ci): disable Gradle caching in GitHub workflows to resolve cache conflicts (#3986) 2025-07-20 21:37:04 +01:00