Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
nickoferrall committed Dec 16, 2024
1 parent f776961 commit 4399754
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
28 changes: 0 additions & 28 deletions packages/client/modules/demo/ClientGraphQLServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ const makeReflectionGroupThread = () => ({
}
})

const BOT_GROUP_TITLES: Record<string, string> = {
botGroup1: 'Empower Junior Staff',
botGroup2: 'Documentation Practices',
botGroup4: 'Chat Communication Issues',
botGroup5: 'Unproductive Discussions',
botGroup6: 'Meeting Overload'
}

class ClientGraphQLServer extends (EventEmitter as GQLDemoEmitter) {
atmosphere: LocalAtmosphere
db: RetroDemoDB
Expand Down Expand Up @@ -1587,26 +1579,6 @@ class ClientGraphQLServer extends (EventEmitter as GQLDemoEmitter) {
this.emit(SubscriptionChannel.MEETING, data)
}
return {updateCommentContent: data}
},
async updateGroupTitle(reflectionGroup: DemoReflectionGroup, reflections: DemoReflection[]) {
// Use hardcoded title for bot groups, otherwise use first reflection's content
const title =
BOT_GROUP_TITLES[reflectionGroup.id] ??
reflections[0]?.plaintextContent?.slice(0, 20) ??
'New Group'

reflectionGroup.smartTitle = title
if (!reflectionGroup.titleIsUserDefined) {
reflectionGroup.title = title
}

const data = {
__typename: 'UpdateReflectionGroupTitlePayload',
meetingId: RetroDemo.MEETING_ID,
reflectionGroupId: reflectionGroup.id,
title
}
this.emit(SubscriptionChannel.MEETING, data)
}
} as const

Expand Down
12 changes: 0 additions & 12 deletions packages/client/modules/demo/getDemoEntities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@ import {fetchQuery} from 'relay-runtime'
import {getDemoEntitiesQuery} from '~/__generated__/getDemoEntitiesQuery.graphql'
import Atmosphere from '../../Atmosphere'

const BOT_GROUP_TITLES: Record<string, string> = {
botGroup1: 'Empower Junior Staff',
botGroup2: 'Documentation Practices',
botGroup4: 'Chat Communication Issues',
botGroup5: 'Unproductive Discussions',
botGroup6: 'Meeting Overload'
}

export const getDemoGroupTitle = (groupId: string, firstReflectionContent?: string) => {
return BOT_GROUP_TITLES[groupId] ?? firstReflectionContent ?? 'New Group'
}

const query = graphql`
query getDemoEntitiesQuery($text: String!) {
getDemoEntities(text: $text) {
Expand Down

0 comments on commit 4399754

Please sign in to comment.