-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add opt-in props for pingback #330
Conversation
If I understand the error message correctly, an API key for Percy is missing. Is there anything I can do to fix that issue? |
f8f6dff
to
d2d655e
Compare
0320496
to
41a7e7d
Compare
This is a desperate and experimental attempt to fix the pipeline, since it works for that branch
41a7e7d
to
4bd9772
Compare
@LBBO thank you for trying to do this but it's not something we want to add. Disabling pingbacks by default at a component level could lead to unpredictable reporting. For example, we'd have to go through every project GIPHY has released an add this property to all of our components. This is hundreds of components. We will add a way to disable pingbacks but it must be done by the GIPHY team and be well thought-out and planned. Thank you for the PR though |
Would it be an option to convert the opt-in to an opt-out? That way, no existing behavior would change and the privacy feature would still be added. If not, can you provide a timeline on when the feature will be addressed? I would love to have this for the Signal PR referenced above. |
@LBBO I think it'd be a global setting and it'd be on be default. We have a way to configure the pingback url, it'd be something along those lines and it'd be checked only once in the |
And that would also be managed in the PingbackContext, right? I considered doing that in the first place but decided against it since I didn't want to force people to add elements to their shadow Dom. But yeah, if having it be an opt-out property in the context is what you would like to see, I can start working on that tomorrow. What do you think about the current naming? Would |
Alright, I just had a look at the code and I see that you mean an actual global property stored in Also, the way that the configurable pingback URL is currently implemented, the global scope must be modified before If it's okay with you, I'd like to add a |
@LBBO thanks for the feedback. Definitely aware of the issues with using a global variable, and aware that it's hard to configure. I struggled with using a env variable to configure font loading in |
I'm sad to hear that. Let me know when there's an update :-) |
This PR adds a
optInToTelemetry
prop to all components that can cause any pingback events. By default, it is set to false, creating an opt-in behavior. Pingback events are only sent when users explicitly opt-in.I added e2e tests for this behavior for the react-components. Since the normal components didn't seem to have a pre-existing test setup, I didn't add any here. Of course, I also added documentation for the new property.
Also, in an effort to follow the boyscout rule, I added
npm test
scripts to packages that didn't have it yet sonpm test
can now be executed globally. Let me know if you would prefer me to extract those changes into a separate PR.Fixes #291