Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Form PDF Settings to be previewed before saving #1563

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

jakejackson1
Copy link
Member

@jakejackson1 jakejackson1 commented Aug 29, 2024

Description

Add a "Preview PDF" button to the form PDF settings so users can preview the document with the current settings before saving.

Testing instructions

  1. Go to the Form Editor
  2. Navigate to Form Settings -> PDF
  3. Add a new PDF
  4. Use the Preview PDF button
  5. Make changes to the PDF settings
  6. Use the Preview PDF button again
  7. Save the PDF settings
  8. Make changes to the PDF settings
  9. Use the Preview PDF button
  10. Repeat step 8-9 as many times as necessary

Screenshots

CleanShot 2024-08-29 at 14 47 08@2x
CleanShot 2024-08-29 at 14 47 20@2x

Checklist:

  • I've tested the code.
  • My code is easy to read, follow, and understand
  • My code follows the accessibility standards.
  • My code has proper inline documentation / docblocks.

Additional Comments

The following extensions require a compatibility update:

  1. Core Booster (filter fields)
  2. Developer Toolkit (toolkit setting)

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 86.25430% with 40 lines in your changes missing coverage. Please review.

Project coverage is 77.83%. Comparing base (c1dbd83) to head (141c78b).
Report is 4 commits behind head on development.

Files with missing lines Patch % Lines
src/Model/Model_PDF.php 20.58% 27 Missing ⚠️
src/Rest/Rest_Form_Settings.php 94.15% 10 Missing ⚠️
src/bootstrap.php 90.47% 2 Missing ⚠️
src/Rest/Rest_Pdf_Preview.php 97.95% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1563      +/-   ##
===============================================
+ Coverage        77.29%   77.83%   +0.53%     
===============================================
  Files              251      252       +1     
  Lines            13780    13920     +140     
  Branches           370      370              
===============================================
+ Hits             10651    10834     +183     
+ Misses            3121     3078      -43     
  Partials             8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jakejackson1
Copy link
Member Author

jakejackson1 commented Aug 29, 2024

TODO:

  • Allow entry to be passed to the get_items() endpoint and only return PDFs that would be active for that entry (the PDF is set to active and the conditional logic passes).
  • Increase code coverage for API

@jakejackson1 jakejackson1 marked this pull request as ready for review August 30, 2024 00:20
@jakejackson1 jakejackson1 merged commit c721a04 into development Aug 30, 2024
13 checks passed
@jakejackson1 jakejackson1 linked an issue Aug 30, 2024 that may be closed by this pull request
@jakejackson1 jakejackson1 deleted the pdf-preview branch August 30, 2024 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PDF Preview Feature
1 participant