From 92a1dbd18dc25c0046f573a3e46158f5cecdbf17 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Thu, 11 Apr 2024 09:45:38 +0200 Subject: [PATCH] feat: Release activity library for everyone (#9617) --- .../ActivityLibrary/ActivityLibrary.tsx | 9 +-- .../components/Dashboard/DashSidebar.tsx | 26 ++------- .../Dashboard/MobileDashSidebar.tsx | 19 +++---- packages/client/components/MeetingsDash.tsx | 12 +--- .../components/SideBarStartMeetingButton.tsx | 12 +--- .../client/components/StartMeetingFAB.tsx | 13 +---- .../components/TeamDashMain/TeamDashMain.tsx | 5 +- .../userDashboard/components/UserDashMain.tsx | 37 ++++++++++++ .../components/UserDashMain/UserDashMain.tsx | 57 ------------------- .../UserDashMain/UserDashMainRoot.tsx | 14 ----- .../UserDashboard/UserDashboard.tsx | 4 +- .../mutations/helpers/bootstrapNewUser.ts | 14 +---- .../public/mutations/loginWithGoogle.ts | 4 +- .../public/mutations/loginWithMicrosoft.ts | 4 +- .../public/mutations/signUpWithPassword.ts | 2 +- .../public/typeDefs/updateFeatureFlag.graphql | 2 - .../graphql/public/types/UserFeatureFlags.ts | 1 - 17 files changed, 63 insertions(+), 172 deletions(-) create mode 100644 packages/client/modules/userDashboard/components/UserDashMain.tsx delete mode 100644 packages/client/modules/userDashboard/components/UserDashMain/UserDashMain.tsx delete mode 100644 packages/client/modules/userDashboard/components/UserDashMain/UserDashMainRoot.tsx diff --git a/packages/client/components/ActivityLibrary/ActivityLibrary.tsx b/packages/client/components/ActivityLibrary/ActivityLibrary.tsx index 2c84540e135..7cac76e9adc 100644 --- a/packages/client/components/ActivityLibrary/ActivityLibrary.tsx +++ b/packages/client/components/ActivityLibrary/ActivityLibrary.tsx @@ -85,9 +85,6 @@ const query = graphql` } } } - featureFlags { - retrosInDisguise - } organizations { featureFlags { aiTemplate @@ -199,7 +196,7 @@ export const ActivityLibrary = (props: Props) => { const {queryRef} = props const data = usePreloadedQuery(query, queryRef) const {viewer} = data - const {featureFlags, availableTemplates, organizations} = viewer + const {availableTemplates, organizations} = viewer const hasAITemplateFeatureFlag = !!organizations.find((org) => org.featureFlags.aiTemplate) const setSearch = (value: string) => { @@ -272,10 +269,6 @@ export const ActivityLibrary = (props: Props) => { return undefined }, [categoryId, templatesToRender]) - if (!featureFlags.retrosInDisguise) { - return - } - if (!categoryId || !availableCategoryIds.includes(categoryId)) { return } diff --git a/packages/client/components/Dashboard/DashSidebar.tsx b/packages/client/components/Dashboard/DashSidebar.tsx index c9fbe1403eb..2f5c78f0cdb 100644 --- a/packages/client/components/Dashboard/DashSidebar.tsx +++ b/packages/client/components/Dashboard/DashSidebar.tsx @@ -2,7 +2,7 @@ import styled from '@emotion/styled' import graphql from 'babel-plugin-relay/macro' import React from 'react' import {useFragment} from 'react-relay' -import {useLocation, useRouteMatch} from 'react-router' +import {useRouteMatch} from 'react-router' import {PALETTE} from '../../styles/paletteV3' import {NavSidebar} from '../../types/constEnums' import { @@ -16,7 +16,6 @@ import {DashSidebar_viewer$key} from '../../__generated__/DashSidebar_viewer.gra import DashNavList from '../DashNavList/DashNavList' import SideBarStartMeetingButton from '../SideBarStartMeetingButton' import LeftDashNavItem from './LeftDashNavItem' -import getTeamIdFromPathname from '../../utils/getTeamIdFromPathname' const Nav = styled('nav')<{isOpen: boolean}>(({isOpen}) => ({ // 78px is total height of 'Add meeting' block @@ -83,9 +82,6 @@ const DashSidebar = (props: Props) => { graphql` fragment DashSidebar_viewer on User { ...StandardHub_viewer - featureFlags { - retrosInDisguise - } organizations { ...DashNavList_organization id @@ -97,10 +93,8 @@ const DashSidebar = (props: Props) => { viewerRef ) - const location = useLocation() - if (!viewer) return null - const {featureFlags, organizations} = viewer + const {organizations} = viewer if (match) { const {orgId: orgIdFromParams} = match.params @@ -108,7 +102,7 @@ const DashSidebar = (props: Props) => { const {id: orgId, name, isBillingLeader} = currentOrg ?? {} return ( - +