-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Prevents the image size change from tracking each value continuously #17523
Conversation
You can trigger an installable build for these changes by visiting CircleCI here. |
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
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.
Works as described!
properties["enabled"] = (value != Int.max) as AnyObject | ||
properties["value"] = value as Int as AnyObject | ||
WPAnalytics.track(.appSettingsImageOptimizationChanged, withProperties: properties) | ||
self.debounce(#selector(self.trackImageSizeChanged), afterDelay: 0.5) |
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.
Nice 👍
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.
This works mostly as expected, except for course because it's using a debounce it's possible we'll send multiple values if you pause for half a second while scrubbing.
An alternative would be to edit MediaSizeSliderCell
and handle touchUpInside
and touchUpOutside
, and have an extra callback block to receive the final value when the touches end. We'd then use this final value for the tracking call.
Entirely up to you, depending on whether you think potentially logging some interim values is an issue or not! I'll approve as-is anyway 🙂
Good idea, I avoided doing that I wanted to reduce code modifications needed just for tracking. I don't want to accidentally break anything just by adding tracking. I think the number of interim values sent using the debounce will be pretty minimal for most users. |
Project: #17503
Description
Prevents the image size change from tracking each value continuously
To test:
🔵 Tracked: app_settings_image_optimization_changed <enabled: 1, value: VALUE>
value: 1400
Regression Notes
Potential unintended areas of impact
None, adding tracking.
What I did to test those areas of impact (or what existing automated tests I relied on)
Manual testing
What automated tests I added (or what prevented me from doing so)
None.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.