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: update meeting summary UI #10081

Merged
merged 51 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
05250cf
add generateInsight mutation
nickoferrall Jul 1, 2024
c4ef355
replace shortUrls with real urls
nickoferrall Jul 1, 2024
450b9c2
handle teamId arg and replace short meeting ids
nickoferrall Jul 2, 2024
c806eca
add orgId arg to generateInsight
nickoferrall Jul 2, 2024
e262f9f
filter meetings more efficiently
nickoferrall Jul 3, 2024
3e4aff4
return wins and challenges from generateInsight
nickoferrall Jul 3, 2024
b0b042e
Merge branch 'feat/generate-insight' into feat/generate-team-insight
nickoferrall Jul 16, 2024
14a34dc
generate insight
nickoferrall Jul 17, 2024
7792681
implement addInsight migration
nickoferrall Jul 17, 2024
7c02ca4
check for existingInsight
nickoferrall Jul 17, 2024
91e56b0
start summary of summaries
nickoferrall Jul 18, 2024
a0f2607
include links to discussions
nickoferrall Jul 18, 2024
adc15ac
update prompt
nickoferrall Jul 22, 2024
3b939b1
return summary if exists
nickoferrall Jul 23, 2024
cebc7b3
update prompt and clean up processing getTopics meetingId
nickoferrall Jul 23, 2024
e15d1e7
remove generated files
nickoferrall Jul 23, 2024
23448b1
remove meetingSummary yaml file
nickoferrall Jul 23, 2024
fde4584
update short meeting date
nickoferrall Jul 23, 2024
555ec41
Merge branch 'master' into feat/summary-of-summaries
nickoferrall Jul 23, 2024
ca5c6fc
move addInsight migration after merging master
nickoferrall Jul 23, 2024
6e5aeeb
fix insight start end date insert
nickoferrall Jul 23, 2024
5b1964e
return prev insight if dates and teamid exist
nickoferrall Jul 24, 2024
bc7b351
update generate insight prompt to reduce jargon
nickoferrall Jul 24, 2024
f9e3449
update migration to make wins and challenges non null
nickoferrall Jul 24, 2024
aeb8fa8
accept prompt as arg in generateInsight
nickoferrall Jul 26, 2024
cc9768c
update migration order
nickoferrall Jul 26, 2024
a3ba8d0
remove meetings from generateInsight query
nickoferrall Jul 26, 2024
5c191ef
use number.isNaN instead
nickoferrall Jul 26, 2024
a5c6a61
generate new meeting summary
nickoferrall Jul 29, 2024
e082197
create new summaries for old meetings
nickoferrall Jul 29, 2024
5cbcb1a
clean up
nickoferrall Jul 30, 2024
568a560
move generateMeetingSummary to private schema
nickoferrall Jul 30, 2024
6de0b50
remove generateMeetingSummary from permissions
nickoferrall Jul 30, 2024
13ef865
update userPrompt type
nickoferrall Jul 31, 2024
5e4f68c
update generateInsight userPrompt type
nickoferrall Jul 31, 2024
9920f55
update userPrompt type
nickoferrall Jul 31, 2024
7c858cd
Merge branch 'master' into feat/summary-of-summaries
nickoferrall Jul 31, 2024
76b5883
fix conflict
nickoferrall Jul 31, 2024
80683fc
Merge branch 'feat/summary-of-summaries' into feat/10038/new-meeting-…
nickoferrall Jul 31, 2024
4d5e81e
render link in summary
nickoferrall Aug 5, 2024
b39190b
format links using replace
nickoferrall Aug 6, 2024
0f98d26
re-add marked
nickoferrall Aug 6, 2024
d854293
Merge branch 'master' of github.com:ParabolInc/parabol
nickoferrall Aug 7, 2024
402236d
Merge branch 'master' of github.com:ParabolInc/parabol
nickoferrall Aug 8, 2024
291bd97
merge with master
nickoferrall Aug 8, 2024
2ef6ea7
fix merge conflict issues
nickoferrall Aug 8, 2024
97e2eb5
remove redundant table body elements
nickoferrall Aug 8, 2024
57d7028
santize summary
nickoferrall Aug 12, 2024
56344dd
add css file to static folder
nickoferrall Aug 12, 2024
a2a3339
remove css files and move to global css
nickoferrall Aug 12, 2024
d2654c0
remove example summary
nickoferrall Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import graphql from 'babel-plugin-relay/macro'
import {WholeMeetingSummaryResult_meeting$key} from 'parabol-client/__generated__/WholeMeetingSummaryResult_meeting.graphql'
import {PALETTE} from 'parabol-client/styles/paletteV3'
import {FONT_FAMILY} from 'parabol-client/styles/typographyV2'
import DOMPurify from 'dompurify'
import {marked} from 'marked'
import React, {useEffect} from 'react'
import {useFragment} from 'react-relay'
import {WholeMeetingSummaryResult_meeting$key} from '../../../../../__generated__/WholeMeetingSummaryResult_meeting.graphql'
import useAtmosphere from '../../../../../hooks/useAtmosphere'
import {PALETTE} from '../../../../../styles/paletteV3'
import {FONT_FAMILY} from '../../../../../styles/typographyV2'
import {AIExplainer} from '../../../../../types/constEnums'
import SendClientSideEvent from '../../../../../utils/SendClientSideEvent'
import EmailBorderBottom from './EmailBorderBottom'
Expand Down Expand Up @@ -39,8 +41,9 @@ interface Props {
meetingRef: WholeMeetingSummaryResult_meeting$key
}

const WholeMeetingSummaryResult = (props: Props) => {
const {meetingRef} = props
const WholeMeetingSummaryResult = ({meetingRef}: Props) => {
const atmosphere = useAtmosphere()

const meeting = useFragment(
graphql`
fragment WholeMeetingSummaryResult_meeting on NewMeeting {
Expand All @@ -55,16 +58,25 @@ const WholeMeetingSummaryResult = (props: Props) => {
`,
meetingRef
)
const atmosphere = useAtmosphere()
const {summary: wholeMeetingSummary, team} = meeting
const explainerText = team?.tier === 'starter' ? AIExplainer.STARTER : AIExplainer.PREMIUM_MEETING
useEffect(() => {
SendClientSideEvent(atmosphere, 'AI Summary Viewed', {
source: 'Meeting Summary',
tier: meeting.team.billingTier,
meetingId: meeting.id
})
}, [])
}, [atmosphere, meeting.id, meeting.team.billingTier])

const {summary: wholeMeetingSummary, team} = meeting

if (!wholeMeetingSummary) return null
const renderedSummary = marked(wholeMeetingSummary, {
gfm: true,
breaks: true
}) as string
const sanitizedSummary = DOMPurify.sanitize(renderedSummary)

const explainerText = team?.tier === 'starter' ? AIExplainer.STARTER : AIExplainer.PREMIUM_MEETING

return (
<>
<tr>
Expand All @@ -78,7 +90,12 @@ const WholeMeetingSummaryResult = (props: Props) => {
</td>
</tr>
<tr>
<td style={textStyle}>{wholeMeetingSummary}</td>
<td
align='center'
style={textStyle}
className='summary-link-style'
dangerouslySetInnerHTML={{__html: sanitizedSummary}}
/>
</tr>
</td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"json2csv": "5.0.7",
"jwt-decode": "^2.1.0",
"linkify-it": "^2.0.3",
"marked": "^13.0.3",
"mousetrap": "^1.6.3",
"ms": "^2.0.0",
"react": "^17.0.2",
Expand Down
7 changes: 6 additions & 1 deletion packages/client/styles/theme/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
2) prevent a horizontal scrollbar from causing a vertical scrollbar due to the 100vh
*/
#root {
@apply w-full h-screen p-0 m-0 bg-slate-200;
@apply m-0 h-screen w-full bg-slate-200 p-0;
}

*,
Expand Down Expand Up @@ -187,3 +187,8 @@
.draft-codeblock {
@apply m-0 rounded-[1px] border-l-2 border-solid border-l-slate-500 bg-slate-200 py-0 px-[8px] font-mono font-[13px] leading-normal;
}

.summary-link-style a {
@apply text-sky-500;
text-decoration: underline;
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16916,6 +16916,11 @@ markdown-it@^13.0.1:
mdurl "^1.0.1"
uc.micro "^1.0.5"

marked@^13.0.3:
version "13.0.3"
resolved "https://registry.yarnpkg.com/marked/-/marked-13.0.3.tgz#5c5b4a5d0198060c7c9bc6ef9420a7fed30f822d"
integrity sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA==

marked@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3"
Expand Down
Loading