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

Move Core Font Installer Notice to selected pages. #1445

Conversation

jestonihpi
Copy link
Contributor

Description

WIP. I have only set the Core Font Installer Notice exclusively to Gravity PDF pages. I need to add this to these pages as well:

  1. Form List
  2. Form Settings
  3. Form Entry List
  4. Form Entry Details

#1439

Testing instructions

Screenshots

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

@jestonihpi jestonihpi linked an issue Jan 13, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #1445 (c8bdf64) into development (f9649f0) will increase coverage by 17.58%.
The diff coverage is n/a.

❗ Current head c8bdf64 differs from pull request most recent head 172cd15. Consider uploading reports for the commit 172cd15 to get more accurate results

@@                Coverage Diff                 @@
##             development    #1445       +/-   ##
==================================================
+ Coverage          75.71%   93.30%   +17.58%     
==================================================
  Files                243       57      -186     
  Lines              12828     1464    -11364     
  Branches             370      370               
==================================================
- Hits                9713     1366     -8347     
+ Misses              3107       90     -3017     
  Partials               8        8               
Impacted Files Coverage Δ
src/Controller/Controller_Actions.php
src/Helper/Fields/Field_Consent.php
src/Helper/Fields/Field_Post_Category.php
src/View/html/Settings/licence.php
src/Controller/Controller_Custom_Fonts.php
src/Helper/Helper_Interface_Url_Signer.php
src/deprecated.php
src/Helper/Helper_Field_Container.php
src/Helper/Fields/Field_Shipping.php
src/Helper/Helper_Abstract_Field_Products.php
... and 176 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jestonihpi jestonihpi force-pushed the 1439-change-where-core-font-installer-notice-is-shown branch 3 times, most recently from 6f93a84 to 79a7f5c Compare January 19, 2023 04:02
@jestonihpi
Copy link
Contributor Author

Hi @jakejackson1, can you review the recent changes on this PR please?

This would look like on Form list:
image
The font will be reset to adapt to the current error messages.

But when its on Gravity PDF pages, it will look like this:
image

Not sure if this is a good compromise, please advise.

Thanks!

@jestonihpi jestonihpi force-pushed the 1439-change-where-core-font-installer-notice-is-shown branch 4 times, most recently from 6bd796e to 89c576e Compare February 22, 2023 01:42
Copy link
Member

@jakejackson1 jakejackson1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jestonihpi just a few minor corrections needed.

src/Controller/Controller_Actions.php Outdated Show resolved Hide resolved
$register_routes = false;
$is_gfpdf_page = \GPDFAPI::get_misc_class()->is_gfpdf_page();

if ( ! wp_doing_ajax() && is_admin() && ( $pagenow === 'plugins.php' || $is_gfpdf_page || \GFForms::is_gravity_page() ) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned, assign all conditions to individual variables so this IF statement is easy to understad.

@jestonihpi jestonihpi force-pushed the 1439-change-where-core-font-installer-notice-is-shown branch from e64df1b to 96f94cf Compare February 24, 2023 06:20
Add Gravity Form's default error message handler. This will add the message to the current gform_admin_error_messages queue

Rewrite maybe_remove_non_pdf_messages to return false if the current page doesn't belongs to gravity pdf. Add toggle between Helper_Notices and GFCommon on we display the font install message.

Update condition and improve codebase

Update unit test for Test_Action

Revert changes on Helper_Notices

Update Install font notice display, codebase cleanup.

Lint
@jestonihpi jestonihpi force-pushed the 1439-change-where-core-font-installer-notice-is-shown branch from ce2f9ac to 172cd15 Compare February 24, 2023 07:08
@jakejackson1
Copy link
Member

Resolved in #1549

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.

Change where Core Font Installer Notice is shown
2 participants