refactor: rename EditorDocumentRenderer to RendererPane

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-04-27 12:45:30 +02:00
parent 4d48aa613d
commit bded420cab
4 changed files with 5 additions and 5 deletions

View file

@ -12,12 +12,12 @@ import { CommunicatorImageLightbox } from '../markdown-renderer/extensions/image
import { ExtensionEventEmitterProvider } from '../markdown-renderer/hooks/use-extension-event-emitter'
import { AppBar, AppBarMode } from './app-bar/app-bar'
import { ChangeEditorContentContextProvider } from './change-content-context/codemirror-reference-context'
import { EditorDocumentRenderer } from './editor-document-renderer/editor-document-renderer'
import { EditorPane } from './editor-pane/editor-pane'
import { useComponentsFromAppExtensions } from './editor-pane/hooks/use-components-from-app-extensions'
import { HeadMetaProperties } from './head-meta-properties/head-meta-properties'
import { useUpdateLocalHistoryEntry } from './hooks/use-update-local-history-entry'
import { RealtimeConnectionAlert } from './realtime-connection-alert/realtime-connection-alert'
import { RendererPane } from './renderer-pane/renderer-pane'
import { Sidebar } from './sidebar/sidebar'
import { Splitter } from './splitter/splitter'
import type { DualScrollState, ScrollState } from './synced-scroll/scroll-props'
@ -110,7 +110,7 @@ export const EditorPageContent: React.FC = () => {
const rightPane = useMemo(
() => (
<EditorDocumentRenderer
<RendererPane
frameClasses={'h-100 w-100'}
onMakeScrollSource={setRendererToScrollSource}
onScroll={onMarkdownRendererScroll}

View file

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
@ -14,7 +14,7 @@ import { useScrollStateWithoutLineOffset } from './hooks/use-scroll-state-withou
import { NoteType } from '@hedgedoc/commons'
import React from 'react'
export type EditorDocumentRendererProps = Omit<
export type RendererPaneProps = Omit<
RendererIframeProps,
'markdownContentLines' | 'rendererType' | 'onTaskCheckedChange'
>
@ -26,7 +26,7 @@ export type EditorDocumentRendererProps = Omit<
* @param onScroll A callback that is executed when the view in the rendered is scrolled
* @param props Every property from the {@link RendererIframe} except the markdown content
*/
export const EditorDocumentRenderer: React.FC<EditorDocumentRendererProps> = ({ scrollState, onScroll, ...props }) => {
export const RendererPane: React.FC<RendererPaneProps> = ({ scrollState, onScroll, ...props }) => {
const trimmedContentLines = useTrimmedNoteMarkdownContentWithoutFrontmatter()
const noteType: NoteType = useApplicationState((state) => state.noteDetails.frontmatter.type)
const adjustedOnScroll = useOnScrollWithLineOffset(onScroll)