-
Notifications
You must be signed in to change notification settings - Fork 92
gwaft-template-collapsible.php: Fixed an issue with page numbers and hidden fields.
#1044
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
Conversation
…d hidden fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Caution Review failedThe pull request is closed. WalkthroughThe changes modify the processing of the Changes
Sequence Diagram(s)sequenceDiagram
participant F as Function
participant I as Items Array
participant G as Grouping Logic
F->>I: Start loop over $data['items']
I-->>F: Return field item
F->>F: Check if field type/visibility equals "hidden"
alt Field is hidden
F-->>F: Skip current iteration (continue)
else Field is visible
F->>F: Adjust pageNumber (pageNumber - 1)
F->>G: Add field to corresponding page group
end
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
veryspry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left one suggested change, but am approving anyways since I'm OOO the next few days. Don't want to hold a snippet up for a nitpick 🙂
…d hidden fields. Co-authored-by: Matt Ehlinger <ehlinger.matt@gmail.com>
Context
⛑️ Ticket(s): https://secure.helpscout.net/conversation/2849211669/78114
Summary
The collapsible templates snippet does not work because the values of
$page_groupsand$pagesare an "index" behind.Adjustment for the index issue, and adding a field visibility check.
BEFORE Customer described issue (was also reproduced locally with a simple form):
https://app.screencast.com/wVMGdfNrt8gY2
AFTER the snippet update:
https://www.loom.com/share/457a4df1ae314b92a54e5f18b3e7ad71