-
Notifications
You must be signed in to change notification settings - Fork 92
gpnf-auto-attach-child-files
: Refactored for greater configuration flexibility.
#535
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
e4d92f8
to
053025d
Compare
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.
Awesome work!
I'm going to give this a functional test here shortly. In the meantime, here are a couple of minor suggestions for the code.
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.
Just noticed a typo in a method name and now PHPCS is barking about a couple of things.
I did a functional test and it looks good! I did notice that it slowed down submission a bit, but I'm not sure if that's an issue with the refactor itself.
I went ahead and approved this pending the two small things mentioned above.
Thanks for doing that! All was looking good during my tests but it's always nice to get an extra set of eyes on it 🙌 As far as the slowdown goes, my guess is that it isn't due to the refactor as the logic is essentially the same as before. The main difference is the way that configuration options are set If I had to guess why, database reads are probably the main culprit. For instance:
We also make a call to That said, PCRE is supposed to cache compiled regex's which should be helpful since we pass the same regex string to each call of |
Just waiting on confirmation from a user that this works well for them before merging! |
Feature request: Support for multiple child forms (in one parent form) whose upload fields have different id's. For example: Parent Form has two child forms, I'm going to go ahead and add that functionality to this snippet before merging! |
8987a33
to
a21e3aa
Compare
@claygriffiths just a heads up that I changed the API here a bit so that this works with more complex child form configurations. See here for more details: #535 (comment) |
gpnf-auto-attach-child-files
for greater configuration flexibilitygpnf-auto-attach-child-files
: Refactored for greater configuration flexibility.
a21e3aa
to
a9e0835
Compare
a9e0835
to
a1d860b
Compare
We're just waiting for a user to confirm this works for them |
This is confirmed to work as intended. I'm mergin' it! |
Context
⛑️ Ticket(s): https://secure.helpscout.net/conversation/2011825626/38759/
Summary
gpnf-auto-attach-child-files
into a class.child_form_upload_field_ids
config option to limit which child form upload fields are included in a notification.