Skip to content

Commit

Permalink
feat(kudos): enable mentions in retro reflections (#9284)
Browse files Browse the repository at this point in the history
* feat(kudos): send kudos by text in standups

* Remove console logs

* Fix test

* Store unicode emoji too

* Link teamPromptResponseId

* Update slack notification

* Update email notification

* Mention notification analytics

* response mentioned toast analytics

* Enable mentions in retro reflections

* feat(kudos): enable mentions in retro reflections

* Make some params optional

* make editorRef optional

* Clear undo redo stack
  • Loading branch information
igorlesnenko committed Jan 11, 2024
1 parent a86da98 commit bd8f696
Show file tree
Hide file tree
Showing 11 changed files with 228 additions and 726 deletions.
6 changes: 3 additions & 3 deletions packages/client/components/AndroidEditorFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ interface Props {
editorState: EditorState
onBlur?: (e: React.FocusEvent) => void
onFocus?: (e: React.FocusEvent) => void
onKeyDown: (e: React.KeyboardEvent) => void
onKeyDown?: (e: React.KeyboardEvent) => void
onPastedText?: (text: string) => void
placeholder: string
editorRef: RefObject<HTMLTextAreaElement>
placeholder?: string
editorRef?: RefObject<HTMLTextAreaElement>
onChange?: () => void
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import EditorLinkChangerModal from './EditorLinkChangerModal'

interface Props {
editorState: EditorState
editorRef: RefObject<HTMLTextAreaElement>
editorRef?: RefObject<HTMLTextAreaElement>

link: string | null

Expand Down Expand Up @@ -95,11 +95,11 @@ const EditorLinkChangerDraftjs = (props: Props) => {
'apply-entity'
)
setEditorState(newEditorState)
setTimeout(() => editorRef.current && editorRef.current.focus(), 0)
setTimeout(() => editorRef?.current && editorRef.current.focus(), 0)
}

const handleEscape = () => {
setTimeout(() => editorRef.current && editorRef.current.focus(), 0)
setTimeout(() => editorRef?.current && editorRef.current.focus(), 0)
}

return (
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

0 comments on commit bd8f696

Please sign in to comment.