mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
refactor: rename EditorDocumentRenderer to RendererPane
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
4d48aa613d
commit
bded420cab
4 changed files with 5 additions and 5 deletions
|
@ -12,12 +12,12 @@ import { CommunicatorImageLightbox } from '../markdown-renderer/extensions/image
|
||||||
import { ExtensionEventEmitterProvider } from '../markdown-renderer/hooks/use-extension-event-emitter'
|
import { ExtensionEventEmitterProvider } from '../markdown-renderer/hooks/use-extension-event-emitter'
|
||||||
import { AppBar, AppBarMode } from './app-bar/app-bar'
|
import { AppBar, AppBarMode } from './app-bar/app-bar'
|
||||||
import { ChangeEditorContentContextProvider } from './change-content-context/codemirror-reference-context'
|
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 { EditorPane } from './editor-pane/editor-pane'
|
||||||
import { useComponentsFromAppExtensions } from './editor-pane/hooks/use-components-from-app-extensions'
|
import { useComponentsFromAppExtensions } from './editor-pane/hooks/use-components-from-app-extensions'
|
||||||
import { HeadMetaProperties } from './head-meta-properties/head-meta-properties'
|
import { HeadMetaProperties } from './head-meta-properties/head-meta-properties'
|
||||||
import { useUpdateLocalHistoryEntry } from './hooks/use-update-local-history-entry'
|
import { useUpdateLocalHistoryEntry } from './hooks/use-update-local-history-entry'
|
||||||
import { RealtimeConnectionAlert } from './realtime-connection-alert/realtime-connection-alert'
|
import { RealtimeConnectionAlert } from './realtime-connection-alert/realtime-connection-alert'
|
||||||
|
import { RendererPane } from './renderer-pane/renderer-pane'
|
||||||
import { Sidebar } from './sidebar/sidebar'
|
import { Sidebar } from './sidebar/sidebar'
|
||||||
import { Splitter } from './splitter/splitter'
|
import { Splitter } from './splitter/splitter'
|
||||||
import type { DualScrollState, ScrollState } from './synced-scroll/scroll-props'
|
import type { DualScrollState, ScrollState } from './synced-scroll/scroll-props'
|
||||||
|
@ -110,7 +110,7 @@ export const EditorPageContent: React.FC = () => {
|
||||||
|
|
||||||
const rightPane = useMemo(
|
const rightPane = useMemo(
|
||||||
() => (
|
() => (
|
||||||
<EditorDocumentRenderer
|
<RendererPane
|
||||||
frameClasses={'h-100 w-100'}
|
frameClasses={'h-100 w-100'}
|
||||||
onMakeScrollSource={setRendererToScrollSource}
|
onMakeScrollSource={setRendererToScrollSource}
|
||||||
onScroll={onMarkdownRendererScroll}
|
onScroll={onMarkdownRendererScroll}
|
||||||
|
|
|
@ -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
|
* 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 { NoteType } from '@hedgedoc/commons'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
export type EditorDocumentRendererProps = Omit<
|
export type RendererPaneProps = Omit<
|
||||||
RendererIframeProps,
|
RendererIframeProps,
|
||||||
'markdownContentLines' | 'rendererType' | 'onTaskCheckedChange'
|
'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 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
|
* @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 trimmedContentLines = useTrimmedNoteMarkdownContentWithoutFrontmatter()
|
||||||
const noteType: NoteType = useApplicationState((state) => state.noteDetails.frontmatter.type)
|
const noteType: NoteType = useApplicationState((state) => state.noteDetails.frontmatter.type)
|
||||||
const adjustedOnScroll = useOnScrollWithLineOffset(onScroll)
|
const adjustedOnScroll = useOnScrollWithLineOffset(onScroll)
|
Loading…
Reference in a new issue