UNPKG

@wordpress/editor

Version:
8 lines (7 loc) 15.1 kB
{ "version": 3, "sources": ["../../../src/components/collab-sidebar/note-thread.js"], "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { Button } from '@wordpress/components';\nimport { Stack } from '@wordpress/ui';\nimport { useDebounce } from '@wordpress/compose';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { AddNote } from './add-note';\nimport { Note } from './note';\nimport { NoteCard } from './note-card';\nimport { NoteForm } from './note-form';\nimport { FloatingContainer } from './floating-container';\nimport { focusNoteThread, getNoteExcerpt } from './utils';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useBlockElement } = unlock( blockEditorPrivateApis );\n\nexport function NoteThread( {\n\tnote,\n\tonEditNote,\n\tonAddReply,\n\tonDeleteNote,\n\tisSelected,\n\tsidebarRef,\n\tfloating,\n\tonKeyDown,\n} ) {\n\tconst isFloating = !! floating;\n\tconst { toggleBlockHighlight, selectBlock, toggleBlockSpotlight } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst { selectNote } = unlock( useDispatch( editorStore ) );\n\tconst relatedBlockElement = useBlockElement( note.blockClientId );\n\tconst debouncedToggleBlockHighlight = useDebounce(\n\t\ttoggleBlockHighlight,\n\t\t50\n\t);\n\tconst floatingRef = useRef( null );\n\tconst isKeyboardTabbingRef = useRef( false );\n\n\tconst registerThread = floating?.registerThread;\n\tconst unregisterThread = floating?.unregisterThread;\n\n\t// Register block + floating elements with the board.\n\t// The board's ResizeObserver and autoUpdate track changes automatically.\n\tuseEffect( () => {\n\t\tconst floatingEl = floatingRef.current;\n\t\tif ( floatingEl && registerThread ) {\n\t\t\tregisterThread( note.id, relatedBlockElement, floatingEl );\n\t\t}\n\t\treturn () => unregisterThread?.( note.id );\n\t}, [ relatedBlockElement, note.id, registerThread, unregisterThread ] );\n\n\tconst onMouseEnter = () => {\n\t\tdebouncedToggleBlockHighlight( note.blockClientId, true );\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tdebouncedToggleBlockHighlight( note.blockClientId, false );\n\t};\n\n\tconst onFocus = () => {\n\t\ttoggleBlockHighlight( note.blockClientId, true );\n\t};\n\n\tconst onBlur = ( event ) => {\n\t\t// Don't deselect notes when the browser window/tab loses focus.\n\t\tif ( ! document.hasFocus() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isNoteFocused = event.relatedTarget?.closest(\n\t\t\t'.editor-collab-sidebar-panel__thread'\n\t\t);\n\t\tconst isDialogFocused =\n\t\t\tevent.relatedTarget?.closest( '[role=\"dialog\"]' );\n\t\tconst isTabbing = isKeyboardTabbingRef.current;\n\n\t\t// When another note is clicked, do nothing because the current note is automatically closed.\n\t\tif ( isNoteFocused && ! isTabbing ) {\n\t\t\treturn;\n\t\t}\n\t\t// When deleting a note, a dialog appears, but the note should not be collapsed.\n\t\tif ( isDialogFocused ) {\n\t\t\treturn;\n\t\t}\n\t\t// When tabbing, do nothing if the focus is within the current note.\n\t\tif (\n\t\t\tisTabbing &&\n\t\t\tevent.currentTarget.contains( event.relatedTarget )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Closes a note that has lost focus when any of the following conditions are met:\n\t\t// - An element other than a note is clicked.\n\t\t// - Focus was lost by tabbing.\n\t\ttoggleBlockHighlight( note.blockClientId, false );\n\t\tunselectNote();\n\t};\n\n\tconst handleNoteSelect = () => {\n\t\tselectNote( note.id );\n\t\ttoggleBlockSpotlight( note.blockClientId, true );\n\t\tif ( !! note.blockClientId ) {\n\t\t\t// Pass `null` as the second parameter to prevent focusing the block.\n\t\t\tselectBlock( note.blockClientId, null );\n\t\t}\n\t};\n\n\tconst unselectNote = () => {\n\t\tselectNote( undefined );\n\t\ttoggleBlockSpotlight( note.blockClientId, false );\n\t};\n\n\tconst handleResolve = () => {\n\t\tonEditNote( { id: note.id, status: 'approved' } );\n\t\tunselectNote();\n\t\tif ( isFloating ) {\n\t\t\trelatedBlockElement?.focus();\n\t\t} else {\n\t\t\tfocusNoteThread( note.id, sidebarRef.current );\n\t\t}\n\t};\n\n\tconst allReplies = note?.reply || [];\n\tconst lastReply =\n\t\tallReplies.length > 0 ? allReplies[ allReplies.length - 1 ] : undefined;\n\tconst restReplies = allReplies.length > 0 ? allReplies.slice( 0, -1 ) : [];\n\n\tconst noteExcerpt = getNoteExcerpt(\n\t\tstripHTML( note.content?.rendered ),\n\t\t10\n\t);\n\tconst ariaLabel = !! note.blockClientId\n\t\t? sprintf(\n\t\t\t\t// translators: %s: note excerpt\n\t\t\t\t__( 'Note: %s' ),\n\t\t\t\tnoteExcerpt\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: %s: note excerpt\n\t\t\t\t__( 'Original block deleted. Note: %s' ),\n\t\t\t\tnoteExcerpt\n\t\t );\n\n\tif ( isFloating && note.id === 'new' ) {\n\t\treturn (\n\t\t\t<AddNote\n\t\t\t\tonSubmit={ onAddReply }\n\t\t\t\tsidebarRef={ sidebarRef }\n\t\t\t\tfloating={ { y: floating.y, ref: floatingRef } }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<FloatingContainer\n\t\t\tfloating={\n\t\t\t\tisFloating ? { y: floating.y, ref: floatingRef } : undefined\n\t\t\t}\n\t\t\tclassName={ clsx( 'editor-collab-sidebar-panel__thread', {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t} ) }\n\t\t\tid={ `note-thread-${ note.id }` }\n\t\t\tgap=\"md\"\n\t\t\tonClick={ handleNoteSelect }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onFocus }\n\t\t\tonBlur={ onBlur }\n\t\t\tonKeyUp={ ( event ) => {\n\t\t\t\tif ( event.key === 'Tab' ) {\n\t\t\t\t\tisKeyboardTabbingRef.current = false;\n\t\t\t\t}\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Tab' ) {\n\t\t\t\t\tisKeyboardTabbingRef.current = true;\n\t\t\t\t} else {\n\t\t\t\t\tonKeyDown( event );\n\t\t\t\t}\n\t\t\t} }\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"treeitem\"\n\t\t\taria-label={ ariaLabel }\n\t\t\taria-expanded={ isSelected }\n\t\t>\n\t\t\t<Button\n\t\t\t\tclassName=\"editor-collab-sidebar-panel__skip-to-note\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tsize=\"compact\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tfocusNoteThread( note.id, sidebarRef.current, 'textarea' );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Add new reply' ) }\n\t\t\t</Button>\n\t\t\t{ ! note.blockClientId && (\n\t\t\t\t<p className=\"editor-collab-sidebar-panel__deleted-block-notice\">\n\t\t\t\t\t{ __( 'Original block deleted.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t\t<Note\n\t\t\t\tnote={ note }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonEditNote={ onEditNote }\n\t\t\t\tonDeleteNote={ onDeleteNote }\n\t\t\t\tonResolve={ handleResolve }\n\t\t\t/>\n\t\t\t{ isSelected &&\n\t\t\t\tallReplies.map( ( reply ) => (\n\t\t\t\t\t<Note\n\t\t\t\t\t\tkey={ reply.id }\n\t\t\t\t\t\tnote={ reply }\n\t\t\t\t\t\tparentNote={ note }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonEditNote={ onEditNote }\n\t\t\t\t\t\tonDeleteNote={ onDeleteNote }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t{ ! isSelected && restReplies.length > 0 && (\n\t\t\t\t<Stack\n\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__more-reply-separator\"\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__more-reply-button\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tselectNote( note.id );\n\t\t\t\t\t\t\tfocusNoteThread( note.id, sidebarRef.current );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: number of replies.\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%s more reply',\n\t\t\t\t\t\t\t\t'%s more replies',\n\t\t\t\t\t\t\t\trestReplies.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\trestReplies.length\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Button>\n\t\t\t\t</Stack>\n\t\t\t) }\n\t\t\t{ ! isSelected && lastReply && (\n\t\t\t\t<Note\n\t\t\t\t\tnote={ lastReply }\n\t\t\t\t\tparentNote={ note }\n\t\t\t\t\tisSelected={ false }\n\t\t\t\t\tonEditNote={ onEditNote }\n\t\t\t\t\tonDeleteNote={ onDeleteNote }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isSelected && (\n\t\t\t\t<NoteCard role=\"treeitem\">\n\t\t\t\t\t<NoteForm\n\t\t\t\t\t\tonSubmit={ ( inputComment ) => {\n\t\t\t\t\t\t\tif ( 'approved' === note.status ) {\n\t\t\t\t\t\t\t\t// For reopening, include the content in the reopen action.\n\t\t\t\t\t\t\t\tonEditNote( {\n\t\t\t\t\t\t\t\t\tid: note.id,\n\t\t\t\t\t\t\t\t\tstatus: 'hold',\n\t\t\t\t\t\t\t\t\tcontent: inputComment,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// For regular replies, add as separate comment.\n\t\t\t\t\t\t\t\tonAddReply( {\n\t\t\t\t\t\t\t\t\tcontent: inputComment,\n\t\t\t\t\t\t\t\t\tparent: note.id,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonCancel={ ( event ) => {\n\t\t\t\t\t\t\t// Prevent the parent onClick from being triggered.\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\tunselectNote();\n\t\t\t\t\t\t\tfocusNoteThread( note.id, sidebarRef.current );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabels={ {\n\t\t\t\t\t\t\tsubmit:\n\t\t\t\t\t\t\t\t'approved' === note.status\n\t\t\t\t\t\t\t\t\t? __( 'Reopen & Reply' )\n\t\t\t\t\t\t\t\t\t: __( 'Reply' ),\n\t\t\t\t\t\t\tinput: sprintf(\n\t\t\t\t\t\t\t\t// translators: %1$s: note identifier, %2$s: author name\n\t\t\t\t\t\t\t\t__( 'Reply to note %1$s by %2$s' ),\n\t\t\t\t\t\t\t\tnote.id,\n\t\t\t\t\t\t\t\tnote.author_name\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</NoteCard>\n\t\t\t) }\n\t\t\t{ !! note.blockClientId && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__skip-to-block\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\trelatedBlockElement?.focus();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Back to block' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</FloatingContainer>\n\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