feat: add button to appearance tab to toggle exclude custom css class - #38
Merged
Merged
Conversation
Yannicvanveen
requested review from
mvdhoek1
and
a balanced review from Copilot
September 16, 2026 08:04
There was a problem hiding this comment.
🟡 Changes recommended
The toggle can report or preserve an incorrect exclusion state for valid custom CSS values.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds a Gravity PDF exclusion toggle to Gravity Forms’ Appearance tab.
Changes:
- Adds an accessible exclusion toggle synchronized with custom CSS.
- Shows the toggle only for forms with active PDF configurations.
- Supports multiple PDF configurations when checking activity.
File summaries
| File | Description |
|---|---|
src/Views/partials/gf-field-zgw-pdf-exclude-script.php |
Implements toggle behavior and state synchronization. |
src/Views/partials/gf-field-zgw-pdf-exclude-option.php |
Renders the toggle and status text. |
src/Providers/GravityFormsServiceProvider.php |
Registers editor hooks. |
src/GravityForms/FormSettingsPDF.php |
Adds the active-PDF helper. |
src/GravityForms/FieldSettings.php |
Conditionally renders the setting and script. |
Review details
Suppressed comments (1)
src/Views/partials/gf-field-zgw-pdf-exclude-script.php:64
- This removes only the first matching token. If the CSS field was manually given duplicate
excludeclasses, clicking “include” leaves another token behind, so the field remains excluded and the control stays pressed. Remove every exact match in the off branch.
classes.splice(index, 1);
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mvdhoek1
approved these changes
Sep 16, 2026
mvdhoek1
left a comment
Contributor
There was a problem hiding this comment.
Akkoord onder voorbehoud comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Voegt een button toe waarmee de exclude class die Gravity PDF gebruikt om velden uit te sluiten aan- en uitgezet kan worden. State wordt ook bijgewerkt bij handmatige wijzigingen aan het veld.