From 9701315f3d33d4d49accaf393ac6621873977c79 Mon Sep 17 00:00:00 2001 From: Georg Bremer Date: Wed, 10 Apr 2024 18:09:11 +0200 Subject: [PATCH] Remove legacy new meeting dialog Redirect the old url to the activity library. --- .../ActivityLibrary/ActivityCard.tsx | 2 +- .../components/ActivityLibrary/Categories.ts | 2 +- packages/client/components/Dashboard.tsx | 2 +- .../MeetingHelp/CheckInHelpMenu.tsx | 2 +- packages/client/components/NewMeeting.tsx | 234 ------------------ .../client/components/NewMeetingCarousel.tsx | 172 ------------- .../NewMeetingRecurrenceSettings.tsx | 70 ------ packages/client/components/NewMeetingRoot.tsx | 52 ---- .../client/components/NewMeetingSettings.tsx | 2 +- packages/client/components/PrivateRoutes.tsx | 12 +- .../Recurrence/EndRecurringMeetingModal.tsx | 2 +- .../components/SelectMeetingDropdown.tsx | 30 --- .../SuggestedActionTryActionMeeting.tsx | 4 +- .../SuggestedActionTryRetroMeeting.tsx | 4 +- packages/client/components/Tag/TierTag.tsx | 2 +- packages/client/hooks/useActiveTopTemplate.ts | 2 +- packages/client/hooks/useEndMeetingHotkey.ts | 2 +- .../components/ReflectTemplateItem.tsx | 2 +- .../meeting/components/RemoveTemplate.tsx | 2 +- .../components/OrgBilling/OrgPlan.tsx | 2 +- .../components/OrgBilling/OrgPlans.tsx | 2 +- packages/client/utils/getContentGroup.ts | 2 +- .../client/utils/relay/setActiveTemplate.ts | 2 +- .../client/utils/useTemplateDescription.ts | 2 +- 24 files changed, 23 insertions(+), 587 deletions(-) delete mode 100644 packages/client/components/NewMeeting.tsx delete mode 100644 packages/client/components/NewMeetingCarousel.tsx delete mode 100644 packages/client/components/NewMeetingRecurrenceSettings.tsx delete mode 100644 packages/client/components/NewMeetingRoot.tsx diff --git a/packages/client/components/ActivityLibrary/ActivityCard.tsx b/packages/client/components/ActivityLibrary/ActivityCard.tsx index 59a955d6249..e0ccdbdf51d 100644 --- a/packages/client/components/ActivityLibrary/ActivityCard.tsx +++ b/packages/client/components/ActivityLibrary/ActivityCard.tsx @@ -4,7 +4,7 @@ import React, {PropsWithChildren, useEffect, useRef, useState} from 'react' import {useFragment} from 'react-relay' import {twMerge} from 'tailwind-merge' import {ActivityCard_template$key} from '../../__generated__/ActivityCard_template.graphql' -import {MeetingTypeEnum} from '../../__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '../../__generated__/MeetingSelectorQuery.graphql' import {Tooltip} from '../../ui/Tooltip/Tooltip' import {TooltipContent} from '../../ui/Tooltip/TooltipContent' import {TooltipTrigger} from '../../ui/Tooltip/TooltipTrigger' diff --git a/packages/client/components/ActivityLibrary/Categories.ts b/packages/client/components/ActivityLibrary/Categories.ts index e50a16131e6..57b66dbd474 100644 --- a/packages/client/components/ActivityLibrary/Categories.ts +++ b/packages/client/components/ActivityLibrary/Categories.ts @@ -1,4 +1,4 @@ -import {MeetingTypeEnum} from '../../__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '../../__generated__/MeetingSelectorQuery.graphql' import {CardTheme} from './ActivityCard' export const MAIN_CATEGORIES = [ diff --git a/packages/client/components/Dashboard.tsx b/packages/client/components/Dashboard.tsx index 53d3c842532..6dbc7c535e2 100644 --- a/packages/client/components/Dashboard.tsx +++ b/packages/client/components/Dashboard.tsx @@ -150,7 +150,7 @@ const Dashboard = (props: Props) => { ( )} diff --git a/packages/client/components/MeetingHelp/CheckInHelpMenu.tsx b/packages/client/components/MeetingHelp/CheckInHelpMenu.tsx index ab710768f5a..2a14d40c109 100644 --- a/packages/client/components/MeetingHelp/CheckInHelpMenu.tsx +++ b/packages/client/components/MeetingHelp/CheckInHelpMenu.tsx @@ -1,5 +1,5 @@ import React, {forwardRef} from 'react' -import {MeetingTypeEnum} from '~/__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '~/__generated__/MeetingSelectorQuery.graphql' import useClientSideTrack from '../../hooks/useClientSideTrack' import {ExternalLinks} from '../../types/constEnums' import {phaseLabelLookup} from '../../utils/meetings/lookups' diff --git a/packages/client/components/NewMeeting.tsx b/packages/client/components/NewMeeting.tsx deleted file mode 100644 index 084389fe6db..00000000000 --- a/packages/client/components/NewMeeting.tsx +++ /dev/null @@ -1,234 +0,0 @@ -import styled from '@emotion/styled' -import graphql from 'babel-plugin-relay/macro' -import React, {useEffect, useRef, useState} from 'react' -import {PreloadedQuery, usePreloadedQuery} from 'react-relay' -import useAtmosphere from '~/hooks/useAtmosphere' -import useMutationProps from '~/hooks/useMutationProps' -import useUsageSnackNag from '~/hooks/useUsageSnackNag' -import StartCheckInMutation from '~/mutations/StartCheckInMutation' -import StartRetrospectiveMutation from '~/mutations/StartRetrospectiveMutation' -import StartSprintPokerMutation from '~/mutations/StartSprintPokerMutation' -import StartTeamPromptMutation from '~/mutations/StartTeamPromptMutation' -import {PALETTE} from '~/styles/paletteV3' -import {MeetingTypeEnum, NewMeetingQuery} from '~/__generated__/NewMeetingQuery.graphql' -import useRouter from '../hooks/useRouter' -import {Breakpoint, Radius} from '../types/constEnums' -import sortByTier from '../utils/sortByTier' -import DialogContainer from './DialogContainer' -import DialogTitle from './DialogTitle' -import FlatButton from './FlatButton' -import IconLabel from './IconLabel' -import NewMeetingActions from './NewMeetingActions' -import NewMeetingCarousel from './NewMeetingCarousel' -import {NewMeetingRecurrenceSettings} from './NewMeetingRecurrenceSettings' -import NewMeetingSettings from './NewMeetingSettings' -import NewMeetingTeamPicker from './NewMeetingTeamPicker' -import {RecurrenceSettings} from './Recurrence/RecurrenceSettings' - -interface Props { - teamId?: string | null - queryRef: PreloadedQuery - onClose: () => void -} - -const MEDIA_QUERY_FUZZY_TABLET = `@media screen and (max-width: ${Breakpoint.FUZZY_TABLET}px)` - -const TeamAndSettings = styled('div')({ - marginTop: 16, - minHeight: 166, - padding: '0px 24px' -}) - -const SettingsFirstRow = styled('div')({ - paddingBottom: 16 -}) - -const SettingsRow = styled('div')({ - display: 'flex', - flexDirection: 'row', - gap: 16, - '> div, button': { - width: '50%' - }, - [MEDIA_QUERY_FUZZY_TABLET]: { - flexDirection: 'column', - '> div, button': { - width: '100%' - } - } -}) - -const NewMeetingDialog = styled(DialogContainer)({ - width: '865px', - borderRadius: Radius.FIELD, - - [MEDIA_QUERY_FUZZY_TABLET]: { - minWidth: '100vw', - maxHeight: '100vh', - minHeight: '100vh', - borderRadius: 0 - } -}) - -const Title = styled(DialogTitle)({ - fontSize: 24, - display: 'flex', - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'space-between', - padding: '16px 16px 16px 24px', - [MEDIA_QUERY_FUZZY_TABLET]: { - padding: '8px 8px 8px 16px' - } -}) - -const CloseButton = styled(FlatButton)({ - padding: 8, - color: PALETTE.SLATE_600 -}) - -const NewMeetingInner = styled('div')({ - height: '100%', - maxHeight: 640, - maxWidth: 1400, - padding: 0, - - [MEDIA_QUERY_FUZZY_TABLET]: { - display: 'block', - padding: 0 - } -}) - -const query = graphql` - query NewMeetingQuery { - viewer { - featureFlags { - insights - } - teams { - ...NewMeetingTeamPicker_selectedTeam - ...NewMeetingSettings_selectedTeam - ...NewMeetingTeamPicker_teams - ...NewMeetingActions_team - id - lastMeetingType - name - tier - } - } - } -` - -const NewMeeting = (props: Props) => { - const {teamId, queryRef, onClose} = props - const data = usePreloadedQuery(query, queryRef) - const {viewer} = data - const {teams, featureFlags} = viewer - const {insights} = featureFlags - const [meetingOrder, setMeetingOrder] = useState([ - 'retrospective', - 'teamPrompt', - 'poker', - 'action' - ]) - const [recurrenceSettings, setRecurrenceSettings] = useState({ - name: '', - rrule: null - }) - - const {history, location} = useRouter() - const [idx, setIdx] = useState(0) - useUsageSnackNag(insights) - const meetingType = meetingOrder[idx] as MeetingTypeEnum - const sendToMeRef = useRef(false) - useEffect(() => { - if (!teamId) { - sendToMeRef.current = true - const [firstTeam] = sortByTier(teams) - const nextPath = firstTeam ? `/new-meeting/${firstTeam.id}` : '/newteam' - history.replace(nextPath, location.state) - } - }, []) - const selectedTeam = teams.find((team) => team.id === teamId) - useEffect(() => { - if (!selectedTeam) return - const {lastMeetingType} = selectedTeam - const meetingIdx = meetingOrder.indexOf(lastMeetingType) - const newMeetingOrder = [...meetingOrder] - const firstMeeting = newMeetingOrder.splice(meetingIdx, 1)[0] as MeetingTypeEnum - newMeetingOrder.unshift(firstMeeting) - setMeetingOrder(newMeetingOrder) - }, []) - const {submitMutation, error, submitting, onError, onCompleted} = useMutationProps() - const atmosphere = useAtmosphere() - const onStartMeetingClick = () => { - if (submitting || !selectedTeam) return - submitMutation() - const {id: teamId} = selectedTeam - if (meetingType === 'poker') { - StartSprintPokerMutation(atmosphere, {teamId}, {history, onError, onCompleted}) - } else if (meetingType === 'action') { - StartCheckInMutation(atmosphere, {teamId}, {history, onError, onCompleted}) - } else if (meetingType === 'retrospective') { - StartRetrospectiveMutation(atmosphere, {teamId}, {history, onError, onCompleted}) - } else if (meetingType === 'teamPrompt') { - StartTeamPromptMutation( - atmosphere, - { - teamId, - recurrenceSettings: { - rrule: recurrenceSettings.rrule?.toString(), - name: recurrenceSettings.name - } - }, - {history, onError, onCompleted} - ) - } - } - if (!teamId || !selectedTeam) return null - return ( - - - New meeting - <CloseButton onClick={onClose}> - <IconLabel icon='close' iconLarge /> - </CloseButton> - - - - - - history.replace(`/new-meeting/${teamId}`)} - selectedTeamRef={selectedTeam} - teamsRef={teams} - /> - - - - {meetingType === 'teamPrompt' && ( - - )} - - - - - - ) -} - -export default NewMeeting diff --git a/packages/client/components/NewMeetingCarousel.tsx b/packages/client/components/NewMeetingCarousel.tsx deleted file mode 100644 index d3d78343bf2..00000000000 --- a/packages/client/components/NewMeetingCarousel.tsx +++ /dev/null @@ -1,172 +0,0 @@ -import styled from '@emotion/styled' -import React, {useEffect, useRef} from 'react' -import {FreeMode, Keyboard, Mousewheel} from 'swiper' -import 'swiper/css' -import 'swiper/css/free-mode' -import 'swiper/css/mousewheel' -import {Swiper, SwiperSlide} from 'swiper/react' -import action from '../../../static/images/illustrations/action.png' -import retrospective from '../../../static/images/illustrations/retrospective.png' -import poker from '../../../static/images/illustrations/sprintPoker.png' -import teamPrompt from '../../../static/images/illustrations/teamPrompt.png' -import {PALETTE} from '../styles/paletteV3' -import {BezierCurve, Breakpoint} from '../types/constEnums' -import {MeetingTypeEnum} from '../__generated__/NewMeetingQuery.graphql' - -const Container = styled('div')({ - '.swiper-wrapper': { - alignItems: 'center', - padding: '20px 0' - } -}) - -const Title = styled('div')<{isActive: boolean}>(({isActive}) => ({ - color: isActive ? PALETTE.WHITE : PALETTE.SLATE_900, - fontSize: 20, - fontWeight: 600 -})) - -const Description = styled('div')<{isActive: boolean}>(({isActive}) => ({ - display: isActive ? 'block' : 'none', - overflow: 'hidden', - color: PALETTE.WHITE, - fontSize: 12, - whiteSpace: 'nowrap', - textOverflow: 'ellipsis' -})) - -const MeetingImage = styled('img')({ - objectFit: 'contain', - height: 108 -}) - -const BACKGROUND_COLORS = { - retrospective: PALETTE.GRAPE_500, - action: PALETTE.AQUA_400, - poker: PALETTE.TOMATO_400, - teamPrompt: PALETTE.JADE_400 -} - -const Card = styled('div')<{isActive: boolean; meetingType: keyof typeof BACKGROUND_COLORS}>( - ({isActive, meetingType}) => ({ - background: isActive ? BACKGROUND_COLORS[meetingType] : PALETTE.SLATE_200, - cursor: 'pointer', - borderRadius: 4, - padding: 16, - transition: `all 200ms ${BezierCurve.DECELERATE}`, - transform: isActive ? `scale(1.1)` : 'scale(1)', - display: 'flex', - flexDirection: 'column', - outline: 'none', - position: 'relative' - }) -) - -const ILLUSTRATIONS = { - retrospective, - action, - poker, - teamPrompt -} as Record - -const TITLES = { - retrospective: 'Retrospective', - action: 'Team Check-in', - poker: 'Sprint Poker', - teamPrompt: 'Standup' -} as Record - -const DESCRIPTIONS = { - retrospective: 'Improve how you work', - action: 'Sync up, unblock each other', - poker: 'Estimate effort, de-risk execution', - teamPrompt: 'Share updates, on your time' -} as Record - -interface Props { - idx: number - setIdx: (idx: number) => void - meetingOrder: MeetingTypeEnum[] - onStartMeetingClick: () => void -} - -const NewMeetingCarousel = (props: Props) => { - const {idx, setIdx, meetingOrder, onStartMeetingClick} = props - const cardRef = useRef(null) - - useEffect(() => { - if (cardRef.current) { - cardRef.current.focus() - } - }, [cardRef.current]) - - const onKeyDown = (e: React.KeyboardEvent) => { - const {key} = e - if (key === 'ArrowLeft') { - if (idx !== 0) { - const newIdx = idx - 1 - setIdx(newIdx) - } - } else if (key === 'ArrowRight') { - if (idx !== meetingOrder.length - 1) { - const newIdx = idx + 1 - setIdx(newIdx) - } - } else if (key === 'Enter') { - onStartMeetingClick() - } - } - - return ( - - - {meetingOrder.map((meetingType, index) => { - const src = ILLUSTRATIONS[meetingType] - const title = TITLES[meetingType] - const description = DESCRIPTIONS[meetingType] - const isActive = idx === index - return ( - - setIdx(index)} - ref={isActive ? cardRef : null} - onKeyDown={onKeyDown} - > - - {title} - {description} - - - ) - })} - - - ) -} - -export default NewMeetingCarousel diff --git a/packages/client/components/NewMeetingRecurrenceSettings.tsx b/packages/client/components/NewMeetingRecurrenceSettings.tsx deleted file mode 100644 index 51206d0f3d0..00000000000 --- a/packages/client/components/NewMeetingRecurrenceSettings.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import React, {ChangeEvent} from 'react' -import {RRule} from 'rrule' -import {MenuPosition} from '../hooks/useCoords' -import useMenu from '../hooks/useMenu' -import {PortalStatus} from '../hooks/usePortal' -import NewMeetingDropdown from './NewMeetingDropdown' -import {toHumanReadable} from './Recurrence/HumanReadableRecurrenceRule' -import {RecurrenceSettings} from './Recurrence/RecurrenceSettings' - -interface Props { - onRecurrenceSettingsUpdated: (recurrenceSettings: RecurrenceSettings) => void - recurrenceSettings: RecurrenceSettings - placeholder: string -} - -export const NewMeetingRecurrenceSettings = (props: Props) => { - const {onRecurrenceSettingsUpdated, recurrenceSettings, placeholder} = props - const {rrule, name} = recurrenceSettings - - const onNameChange = (e: ChangeEvent) => { - const title = e.target.value || placeholder - onRecurrenceSettingsUpdated({...recurrenceSettings, name: title}) - } - - const onRruleChange = (rrule: RRule | null) => { - onRecurrenceSettingsUpdated({...recurrenceSettings, rrule}) - } - - const {togglePortal, menuPortal, originRef, portalStatus} = useMenu( - MenuPosition.LOWER_RIGHT, - { - id: 'newMeetingRecurrenceSettings', - isDropdown: true - } - ) - const handleClick = () => { - togglePortal() - } - - return ( - <> - - {menuPortal( -
- - -
- )} - - ) -} diff --git a/packages/client/components/NewMeetingRoot.tsx b/packages/client/components/NewMeetingRoot.tsx deleted file mode 100644 index a89bf8025aa..00000000000 --- a/packages/client/components/NewMeetingRoot.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React, {Suspense, useCallback, useEffect} from 'react' -import {useHistory, useLocation} from 'react-router' -import newMeetingQuery, {NewMeetingQuery} from '~/__generated__/NewMeetingQuery.graphql' -import useModal from '../hooks/useModal' -import useQueryLoaderNow from '../hooks/useQueryLoaderNow' -import useRouter from '../hooks/useRouter' -import useSubscription from '../hooks/useSubscription' -import NotificationSubscription from '../subscriptions/NotificationSubscription' -import OrganizationSubscription from '../subscriptions/OrganizationSubscription' -import TaskSubscription from '../subscriptions/TaskSubscription' -import TeamSubscription from '../subscriptions/TeamSubscription' -import {Loader} from '../utils/relay/renderLoader' -import NewMeeting from './NewMeeting' - -const NewMeetingRoot = () => { - const {match} = useRouter<{teamId: string}>() - const {params} = match - const {teamId} = params - useSubscription('NewMeetingRoot', NotificationSubscription) - useSubscription('NewMeetingRoot', OrganizationSubscription) - useSubscription('NewMeetingRoot', TaskSubscription) - useSubscription('NewMeetingRoot', TeamSubscription) - const queryRef = useQueryLoaderNow(newMeetingQuery, {teamId}) - - const location = useLocation<{backgroundLocation?: Location}>() - const history = useHistory() - - const onClose = useCallback(() => { - const state = location.state - history.replace(state?.backgroundLocation ?? '/meetings') - }, [location]) - - const {openPortal, closePortal, modalPortal} = useModal({ - id: 'newMeetingRoot', - onClose - }) - - useEffect(() => { - openPortal() - return () => { - closePortal() - } - }, []) - - return modalPortal( - }> - {queryRef && } - - ) -} - -export default NewMeetingRoot diff --git a/packages/client/components/NewMeetingSettings.tsx b/packages/client/components/NewMeetingSettings.tsx index 5ea12f25bd2..26993d5e365 100644 --- a/packages/client/components/NewMeetingSettings.tsx +++ b/packages/client/components/NewMeetingSettings.tsx @@ -1,7 +1,7 @@ import graphql from 'babel-plugin-relay/macro' import React from 'react' import {useFragment} from 'react-relay' -import {MeetingTypeEnum} from '~/__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '~/__generated__/MeetingSelectorQuery.graphql' import {NewMeetingSettings_selectedTeam$key} from '~/__generated__/NewMeetingSettings_selectedTeam.graphql' import NewMeetingSettingsAction from './NewMeetingSettingsAction' import NewMeetingSettingsPoker from './NewMeetingSettingsPoker' diff --git a/packages/client/components/PrivateRoutes.tsx b/packages/client/components/PrivateRoutes.tsx index b6545a0a437..5c5e81a8a97 100644 --- a/packages/client/components/PrivateRoutes.tsx +++ b/packages/client/components/PrivateRoutes.tsx @@ -1,6 +1,6 @@ import React, {lazy} from 'react' import {Location} from 'history' -import {Route, Switch, useLocation} from 'react-router' +import {Redirect, Route, Switch, useLocation} from 'react-router' import useAuthRoute from '../hooks/useAuthRoute' import useNoIndex from '../hooks/useNoIndex' @@ -53,10 +53,6 @@ const ShareTopicRouterRoot = lazy( () => import(/* webpackChunkName: 'ShareTopicRouterRoot' */ './ShareTopicRouterRoot') ) -const NewMeetingRoot = lazy( - () => import(/* webpackChunkName: 'NewMeetingRoot' */ './NewMeetingRoot') -) - const PrivateRoutes = () => { useAuthRoute() useNoIndex() @@ -67,9 +63,12 @@ const PrivateRoutes = () => { + + + @@ -86,7 +85,6 @@ const PrivateRoutes = () => { component={ReviewRequestToJoinOrgRoot} /> - ) diff --git a/packages/client/components/Recurrence/EndRecurringMeetingModal.tsx b/packages/client/components/Recurrence/EndRecurringMeetingModal.tsx index 864e85c79c8..161709a6de8 100644 --- a/packages/client/components/Recurrence/EndRecurringMeetingModal.tsx +++ b/packages/client/components/Recurrence/EndRecurringMeetingModal.tsx @@ -18,7 +18,7 @@ import { StandardMutation } from '../../types/relayMutations' import {humanReadableCountdown} from '../../utils/date/relativeDate' -import {MeetingTypeEnum} from '../../__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '../../__generated__/MeetingSelectorQuery.graphql' import DialogContainer from '../DialogContainer' export const EndMeetingMutationLookup = { diff --git a/packages/client/components/SelectMeetingDropdown.tsx b/packages/client/components/SelectMeetingDropdown.tsx index 779fe2397a0..0f992d2b09b 100644 --- a/packages/client/components/SelectMeetingDropdown.tsx +++ b/packages/client/components/SelectMeetingDropdown.tsx @@ -1,11 +1,9 @@ import styled from '@emotion/styled' -import {Forum} from '@mui/icons-material' import graphql from 'babel-plugin-relay/macro' import React from 'react' import {useFragment} from 'react-relay' import useRouter from '~/hooks/useRouter' import {PALETTE} from '~/styles/paletteV3' -import getTeamIdFromPathname from '~/utils/getTeamIdFromPathname' import plural from '~/utils/plural' import {SelectMeetingDropdown_meetings$key} from '~/__generated__/SelectMeetingDropdown_meetings.graphql' import {MenuProps} from '../hooks/useMenu' @@ -27,29 +25,6 @@ const HeaderLabel = styled('div')({ userSelect: 'none' }) -const NoMeetings = styled('div')({ - alignItems: 'center', - display: 'flex', - fontSize: 16, - fontWeight: 600, - height: 56, - justifyContent: 'center', - padding: '0 16px', - width: '100%' -}) - -const StyledIcon = styled(Forum)({ - color: PALETTE.SLATE_600, - marginRight: 16 -}) - -const NoMeetingItem = () => ( - - - {'Start a New Meeting'} - -) - const SelectMeetingDropdown = (props: Props) => { const {meetings: meetingsRef, menuProps} = props const meetings = useFragment( @@ -64,14 +39,9 @@ const SelectMeetingDropdown = (props: Props) => { const {history} = useRouter() const meetingCount = meetings.length const label = `${meetingCount} Active ${plural(meetingCount, 'Meeting')}` - const startMeeting = () => { - const teamId = getTeamIdFromPathname() - history.push(`/new-meeting/${teamId}`) - } return ( {label} - {meetingCount === 0 && } />} {meetings.map((meeting) => { const handleClick = () => { history.push(`/meet/${meeting.id}`) diff --git a/packages/client/components/SuggestedActionTryActionMeeting.tsx b/packages/client/components/SuggestedActionTryActionMeeting.tsx index 864a62e6f3e..ac26fe9ec9d 100644 --- a/packages/client/components/SuggestedActionTryActionMeeting.tsx +++ b/packages/client/components/SuggestedActionTryActionMeeting.tsx @@ -31,9 +31,7 @@ const SuggestedActionTryActionMeeting = (props: Props) => { const onClick = () => { const {history} = props - const {team} = suggestedAction - const {id: teamId} = team - history.push(`/new-meeting/${teamId}`) + history.push(`/activity-library/category/standup`) } return ( diff --git a/packages/client/components/SuggestedActionTryRetroMeeting.tsx b/packages/client/components/SuggestedActionTryRetroMeeting.tsx index 9e8dd3c3b1e..e9f9c1e5072 100644 --- a/packages/client/components/SuggestedActionTryRetroMeeting.tsx +++ b/packages/client/components/SuggestedActionTryRetroMeeting.tsx @@ -31,9 +31,7 @@ const SuggestedActionTryRetroMeeting = (props: Props) => { const onClick = () => { const {history} = props - const {team} = suggestedAction - const {id: teamId} = team - history.push(`/new-meeting/${teamId}`) + history.push(`/activity-library/category/retrospective`) } return ( diff --git a/packages/client/components/Tag/TierTag.tsx b/packages/client/components/Tag/TierTag.tsx index 53332df10e7..89dff6ea7e6 100644 --- a/packages/client/components/Tag/TierTag.tsx +++ b/packages/client/components/Tag/TierTag.tsx @@ -2,7 +2,7 @@ import styled from '@emotion/styled' import React from 'react' import {PALETTE} from '../../styles/paletteV3' import {TierLabel} from '../../types/constEnums' -import {TierEnum} from '../../__generated__/NewMeetingQuery.graphql' +import {TierEnum} from '../../__generated__/OrganizationSubscription.graphql' import BaseTag from './BaseTag' interface Props { diff --git a/packages/client/hooks/useActiveTopTemplate.ts b/packages/client/hooks/useActiveTopTemplate.ts index 3a15da68c07..1cfd4d8db2a 100644 --- a/packages/client/hooks/useActiveTopTemplate.ts +++ b/packages/client/hooks/useActiveTopTemplate.ts @@ -1,6 +1,6 @@ import {useEffect, useRef} from 'react' import {commitLocalUpdate} from 'react-relay' -import {MeetingTypeEnum} from '~/__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '~/__generated__/MeetingSelectorQuery.graphql' import isTempId from '../utils/relay/isTempId' import {setActiveTemplate} from '../utils/relay/setActiveTemplate' import useAtmosphere from './useAtmosphere' diff --git a/packages/client/hooks/useEndMeetingHotkey.ts b/packages/client/hooks/useEndMeetingHotkey.ts index 0f3934dd4c3..6122816cf2e 100644 --- a/packages/client/hooks/useEndMeetingHotkey.ts +++ b/packages/client/hooks/useEndMeetingHotkey.ts @@ -1,7 +1,7 @@ import EndCheckInMutation from '~/mutations/EndCheckInMutation' import EndRetrospectiveMutation from '~/mutations/EndRetrospectiveMutation' import EndSprintPokerMutation from '~/mutations/EndSprintPokerMutation' -import {MeetingTypeEnum} from '~/__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '~/__generated__/MeetingSelectorQuery.graphql' import handleHotkey from '../utils/meetings/handleHotkey' import useAtmosphere from './useAtmosphere' import useHotkey from './useHotkey' diff --git a/packages/client/modules/meeting/components/ReflectTemplateItem.tsx b/packages/client/modules/meeting/components/ReflectTemplateItem.tsx index 10524e02f8d..1be0bb114a8 100644 --- a/packages/client/modules/meeting/components/ReflectTemplateItem.tsx +++ b/packages/client/modules/meeting/components/ReflectTemplateItem.tsx @@ -12,7 +12,7 @@ import {PALETTE} from '../../../styles/paletteV3' import useTemplateDescription from '../../../utils/useTemplateDescription' import {setActiveTemplate} from '../../../utils/relay/setActiveTemplate' import {ReflectTemplateItem_template$key} from '../../../__generated__/ReflectTemplateItem_template.graphql' -import {TierEnum} from '../../../__generated__/NewMeetingQuery.graphql' +import {TierEnum} from '../../../__generated__/OrganizationSubscription.graphql' const TemplateItem = styled('li')<{isActive: boolean}>(({isActive}) => ({ backgroundColor: isActive ? PALETTE.SLATE_200 : undefined, diff --git a/packages/client/modules/meeting/components/RemoveTemplate.tsx b/packages/client/modules/meeting/components/RemoveTemplate.tsx index 0cfed46afc8..5d8c9ab0c1e 100644 --- a/packages/client/modules/meeting/components/RemoveTemplate.tsx +++ b/packages/client/modules/meeting/components/RemoveTemplate.tsx @@ -1,7 +1,7 @@ import graphql from 'babel-plugin-relay/macro' import React from 'react' import {useFragment} from 'react-relay' -import {MeetingTypeEnum} from '~/__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '~/__generated__/MeetingSelectorQuery.graphql' import DetailAction from '../../../components/DetailAction' import useAtmosphere from '../../../hooks/useAtmosphere' import useMutationProps from '../../../hooks/useMutationProps' diff --git a/packages/client/modules/userDashboard/components/OrgBilling/OrgPlan.tsx b/packages/client/modules/userDashboard/components/OrgBilling/OrgPlan.tsx index f7df386a5b6..aa6101a8847 100644 --- a/packages/client/modules/userDashboard/components/OrgBilling/OrgPlan.tsx +++ b/packages/client/modules/userDashboard/components/OrgBilling/OrgPlan.tsx @@ -4,7 +4,7 @@ import {Elevation} from '../../../../styles/elevation' import BaseButton from '../../../../components/BaseButton' import {Radius} from '../../../../types/constEnums' import {PALETTE} from '../../../../styles/paletteV3' -import {TierEnum} from '../../../../__generated__/NewMeetingQuery.graphql' +import {TierEnum} from '../../../../__generated__/OrganizationSubscription.graphql' import styled from '@emotion/styled' import useTooltip from '../../../../hooks/useTooltip' import {MenuPosition} from '../../../../hooks/useCoords' diff --git a/packages/client/modules/userDashboard/components/OrgBilling/OrgPlans.tsx b/packages/client/modules/userDashboard/components/OrgBilling/OrgPlans.tsx index 0e31205312a..2b419f3ea4d 100644 --- a/packages/client/modules/userDashboard/components/OrgBilling/OrgPlans.tsx +++ b/packages/client/modules/userDashboard/components/OrgBilling/OrgPlans.tsx @@ -6,7 +6,7 @@ import Panel from '../../../../components/Panel/Panel' import Row from '../../../../components/Row/Row' import {OrgPlans_organization$key} from '../../../../__generated__/OrgPlans_organization.graphql' import {ElementWidth} from '../../../../types/constEnums' -import {TierEnum} from '../../../../__generated__/NewMeetingQuery.graphql' +import {TierEnum} from '../../../../__generated__/OrganizationSubscription.graphql' import OrgStats from './OrgStats' import useModal from '../../../../hooks/useModal' import DowngradeModal from './DowngradeModal' diff --git a/packages/client/utils/getContentGroup.ts b/packages/client/utils/getContentGroup.ts index ae83f04df0c..aae1ef1fd40 100644 --- a/packages/client/utils/getContentGroup.ts +++ b/packages/client/utils/getContentGroup.ts @@ -2,7 +2,7 @@ const CONTENT_GROUP_PREFIX = `App |` export default function getContentGroup(pathname: string) { let contentGroup // ^action\.parabol\.co/(meet|new-meeting|retro)(/|$|\?) - if (pathname.match(/^\/(meet|meetings|new-meeting|retro)(\/|$\?)/)) { + if (pathname.match(/^\/(meet|meetings|retro)(\/|$\?)/)) { contentGroup = 'Meetings' } else if (pathname.match(/^\/(team|new-summary)(\/|$|\?)/)) { contentGroup = 'Team' diff --git a/packages/client/utils/relay/setActiveTemplate.ts b/packages/client/utils/relay/setActiveTemplate.ts index 1fc5cb4e617..8fd4231d171 100644 --- a/packages/client/utils/relay/setActiveTemplate.ts +++ b/packages/client/utils/relay/setActiveTemplate.ts @@ -1,6 +1,6 @@ import {commitLocalUpdate} from 'react-relay' import {RecordSourceProxy} from 'relay-runtime' -import {MeetingTypeEnum} from '~/__generated__/NewMeetingQuery.graphql' +import {MeetingTypeEnum} from '~/__generated__/MeetingSelectorQuery.graphql' import Atmosphere from '../../Atmosphere' const setActiveTemplateInRelayStore = ( diff --git a/packages/client/utils/useTemplateDescription.ts b/packages/client/utils/useTemplateDescription.ts index ffb16050082..302dfaaabfe 100644 --- a/packages/client/utils/useTemplateDescription.ts +++ b/packages/client/utils/useTemplateDescription.ts @@ -2,7 +2,7 @@ import graphql from 'babel-plugin-relay/macro' import {readInlineData} from 'react-relay' import {useTemplateDescription_template$key} from '../__generated__/useTemplateDescription_template.graphql' import {useTemplateDescription_viewer$key} from '../__generated__/useTemplateDescription_viewer.graphql' -import {TierEnum} from '../__generated__/NewMeetingQuery.graphql' +import {TierEnum} from '../__generated__/OrganizationSubscription.graphql' import relativeDate from './date/relativeDate' const useTemplateDescription = (