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

feat: implement toggle ai features mutation #10457

Merged
merged 8 commits into from
Nov 20, 2024

Conversation

nickoferrall
Copy link
Contributor

@nickoferrall nickoferrall commented Nov 6, 2024

This PR enables org admins to toggle on or off AI features.

Loom demo: https://www.loom.com/share/9294e9363fa94c098bed98d161229115

To Test

  • Ensure AI Features toggle is turned on and see AI summaries, icebreaker, etc
  • Toggle it off and you don't see any AI features

@github-actions github-actions bot added the size/m label Nov 6, 2024
@nickoferrall nickoferrall changed the title implement toggle ai features mutation feat: implement toggle ai features mutation Nov 7, 2024
@nickoferrall nickoferrall marked this pull request as ready for review November 11, 2024 15:50
@@ -138,6 +138,7 @@ export const selectOrganizations = () =>
'trialStartDate',
'scheduledLockAt',
'lockedAt',
'useAI',
Copy link
Contributor Author

@nickoferrall nickoferrall Nov 11, 2024

Choose a reason for hiding this comment

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

Adding this was a gotcha for me. Curious why we don't do selectAll?

@nickoferrall nickoferrall removed the request for review from mattkrick November 13, 2024 16:37

const handleToggle = () => {
const variables = {orgId}
ToggleAIFeaturesMutation(atmosphere, variables, {
Copy link
Member

Choose a reason for hiding this comment

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

+1 if you use the useMutation pattern instead of the older pattern then you don't need useMutationProps in this component & it'll be a little cleaner

@nickoferrall nickoferrall merged commit f1dd5c4 into feat/org-feature-flags-dynamic Nov 20, 2024
7 checks passed
@nickoferrall nickoferrall deleted the feat/toggle-ai-features branch November 20, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants