Skip to content
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 PWI opt-out toggle #2122

Merged
merged 8 commits into from
Dec 7, 2023
Merged

Add PWI opt-out toggle #2122

merged 8 commits into from
Dec 7, 2023

Conversation

pfrazee
Copy link
Collaborator

@pfrazee pfrazee commented Dec 7, 2023

This just adds the opt-out toggle. The behaviors for handling the opt-out can come in a follow-up PR (not a blocker until we enable the PWI).

  • Added to the moderation screen
  • Open to discussing the copy, but we need to settle it by Friday

Current copy

CleanShot 2023-12-06 at 18 45 17@2x

Previous iterations (no longer current)

CleanShot 2023-12-06 at 16 12 39@2x

}
updateProfile.mutate({
profile,
updates: existing => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this is not new, but are we mutating something that's also used for rendering? Generally in React we shouldn't mutate stuff we render — can this be a new object?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not being used for rendering. I agree with the general approach as a safe default approach, but this is a narrow non-react api that handles this okay. Not against changing it, but not an issue

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah if we don't render it then cool

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg but mutation seems shady

@pfrazee pfrazee merged commit 17c2758 into main Dec 7, 2023
4 checks passed
@pfrazee pfrazee deleted the pwi-opt-out branch December 7, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants