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(kudos): send kudos at the end of the retro #9288

Merged
merged 24 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
56fcf95
feat(kudos): send kudos by text in standups
igorlesnenko Dec 1, 2023
8a1f3a0
Remove console logs
igorlesnenko Dec 1, 2023
b0520eb
Fix test
igorlesnenko Dec 4, 2023
9eaeb3b
Store unicode emoji too
igorlesnenko Dec 4, 2023
c69445d
Link teamPromptResponseId
igorlesnenko Dec 5, 2023
e09969d
Update slack notification
igorlesnenko Dec 5, 2023
92601b9
Update email notification
igorlesnenko Dec 5, 2023
606a9a8
Mention notification analytics
igorlesnenko Dec 6, 2023
cce3c1e
response mentioned toast analytics
igorlesnenko Dec 6, 2023
bee99b8
Enable mentions in retro reflections
igorlesnenko Dec 13, 2023
9599f6f
feat(kudos): enable mentions in retro reflections
igorlesnenko Dec 13, 2023
ec9c423
feat(kudos): send kudos at the end of the retro
igorlesnenko Dec 15, 2023
4313555
Handle anonymous notifications
igorlesnenko Dec 19, 2023
3d1ea2c
Make some params optional
igorlesnenko Dec 20, 2023
0356481
make editorRef optional
igorlesnenko Jan 10, 2024
56edc8f
Merge branch 'master' of github.com:ParabolInc/parabol into retro-men…
igorlesnenko Jan 10, 2024
9407f4a
Clear undo redo stack
igorlesnenko Jan 10, 2024
e466f5e
Merge branch 'retro-mentions' of github.com:ParabolInc/parabol into r…
igorlesnenko Jan 10, 2024
5a88ad7
remove any
igorlesnenko Jan 10, 2024
bb48933
Merge branch 'master' of github.com:ParabolInc/parabol into retro-kudos
igorlesnenko Jan 11, 2024
860db8e
rebuild
igorlesnenko Jan 11, 2024
820339a
make name and picture nullable
igorlesnenko Jan 11, 2024
3516ed7
Merge branch 'master' of github.com:ParabolInc/parabol into retro-kudos
igorlesnenko Jan 12, 2024
4bbb67b
Change anonymous to someone
igorlesnenko Jan 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
12 changes: 5 additions & 7 deletions packages/client/components/KudosReceivedNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {KudosReceivedNotification_notification$key} from '~/__generated__/KudosR
import NotificationTemplate from './NotificationTemplate'
import useAtmosphere from '../hooks/useAtmosphere'
import SendClientSideEvent from '../utils/SendClientSideEvent'
import getReactji from '~/utils/getReactji'
import anonymousAvatar from '../styles/theme/images/anonymous-avatar.svg'

interface Props {
notification: KudosReceivedNotification_notification$key
Expand All @@ -25,15 +25,13 @@ const KudosReceivedNotification = (props: Props) => {
picture
meetingName
meetingId
emoji
emojiUnicode
status
}
`,
notificationRef
)
const {type, name, picture, meetingName, emoji, meetingId, status} = notification

const {unicode} = getReactji(emoji)
const {type, name, picture, meetingName, emojiUnicode, meetingId, status} = notification

useEffect(() => {
SendClientSideEvent(atmosphere, 'Notification Viewed', {
Expand All @@ -46,14 +44,14 @@ const KudosReceivedNotification = (props: Props) => {
<NotificationTemplate
message={
<>
{unicode} {name} gave you kudos in{' '}
{emojiUnicode} {name !== '' ? name : 'Anonymous'} gave you kudos in{' '}
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 maybe "Someone gave you kudos" instead of "anonymous"?

Copy link
Contributor Author

@igorlesnenko igorlesnenko Jan 9, 2024

Choose a reason for hiding this comment

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

@nickoferrall not sure, if "Someone", for me it feels that if I click on it, I figure out who exactly it was. @acressall What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On the other hand, it may be more obvious in the notification that it is an anonymous user since he has an anonymous avatar. But in the snackbar it may not be obvious, I think

Copy link
Contributor Author

@igorlesnenko igorlesnenko Jan 12, 2024

Choose a reason for hiding this comment

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

Changed to Someone for now

Copy link
Contributor

@acressall acressall Jan 12, 2024

Choose a reason for hiding this comment

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

I think "someone" is okay. We could also take away the person aspect and just say "You were given kudos in..."

I wonder if we should display a snippet of the kudos, in case there are multiple from the same meeting? If a few people gave you kudos in reflections you might see 4 of the same notification 🤔

igorlesnenko marked this conversation as resolved.
Show resolved Hide resolved
<Link to={`/meet/${meetingId}`} className='font-semibold text-sky-500 underline'>
{meetingName}
</Link>
</>
}
notification={notification}
avatar={picture}
avatar={name !== '' ? picture : anonymousAvatar}
/>
)
}
Expand Down
16 changes: 12 additions & 4 deletions packages/client/components/ReflectionCard/ReflectionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ const ReflectionCard = (props: Props) => {
}
disableAnonymity
spotlightSearchQuery
teamId
}
`,
meetingRef
Expand All @@ -159,8 +160,15 @@ const ReflectionCard = (props: Props) => {
reflectionGroupId,
creator
} = reflection
const {localPhase, localStage, spotlightGroup, phases, disableAnonymity, spotlightSearchQuery} =
meeting
const {
localPhase,
localStage,
spotlightGroup,
phases,
disableAnonymity,
spotlightSearchQuery,
teamId
} = meeting
const {phaseType} = localPhase
const {isComplete} = localStage
const spotlightGroupId = spotlightGroup?.id
Expand Down Expand Up @@ -333,7 +341,6 @@ const ReflectionCard = (props: Props) => {
>
<ColorBadge phaseType={phaseType as NewMeetingPhaseTypeEnum} reflection={reflection} />
<ReflectionEditorWrapper
dataCy={`editor-wrapper`}
isClipped={isClipped}
ariaLabel={readOnly ? '' : 'Edit this reflection'}
editorRef={editorRef}
Expand All @@ -343,10 +350,11 @@ const ReflectionCard = (props: Props) => {
handleReturn={handleReturn}
handleKeyDownFallback={handleKeyDownFallback}
placeholder={isViewerCreator ? 'My reflection… (press enter to add)' : '*New Reflection*'}
readOnly={readOnly}
readOnly={!!readOnly}
setEditorState={setEditorState}
userSelect={userSelect}
disableAnonymity={disableAnonymity}
teamId={teamId}
/>
{error && <StyledError onClick={clearError}>{error.message}</StyledError>}
{!readOnly && (
Expand Down
Loading
Loading