From bded420cab76e672157375189d126f2a4cbfe942 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Thu, 27 Apr 2023 12:45:30 +0200 Subject: [PATCH] refactor: rename EditorDocumentRenderer to RendererPane Signed-off-by: Tilman Vatteroth --- frontend/src/components/editor-page/editor-page-content.tsx | 4 ++-- .../hooks/use-on-scroll-with-line-offset.ts | 0 .../hooks/use-scroll-state-without-line-offset.ts | 0 .../renderer-pane.tsx} | 6 +++--- 4 files changed, 5 insertions(+), 5 deletions(-) rename frontend/src/components/editor-page/{editor-document-renderer => renderer-pane}/hooks/use-on-scroll-with-line-offset.ts (100%) rename frontend/src/components/editor-page/{editor-document-renderer => renderer-pane}/hooks/use-scroll-state-without-line-offset.ts (100%) rename frontend/src/components/editor-page/{editor-document-renderer/editor-document-renderer.tsx => renderer-pane/renderer-pane.tsx} (89%) diff --git a/frontend/src/components/editor-page/editor-page-content.tsx b/frontend/src/components/editor-page/editor-page-content.tsx index fa5f9b14d..ca9be3010 100644 --- a/frontend/src/components/editor-page/editor-page-content.tsx +++ b/frontend/src/components/editor-page/editor-page-content.tsx @@ -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( () => ( - @@ -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 = ({ scrollState, onScroll, ...props }) => { +export const RendererPane: React.FC = ({ scrollState, onScroll, ...props }) => { const trimmedContentLines = useTrimmedNoteMarkdownContentWithoutFrontmatter() const noteType: NoteType = useApplicationState((state) => state.noteDetails.frontmatter.type) const adjustedOnScroll = useOnScrollWithLineOffset(onScroll)