Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(sql_console): full-height not respected
Elian Doranf29427684940
diff --git a/apps/client/src/widgets/NoteDetail.tsx b/apps/client/src/widgets/NoteDetail.tsxindex 2332dbf2d9..ebce85a0cd 100644--- a/apps/client/src/widgets/NoteDetail.tsx+++ b/apps/client/src/widgets/NoteDetail.tsx@@ -344,9 +344,8 @@ export function checkFullHeight(noteContext: NoteContext | undefined, type: Exte// https://github.com/zadam/trilium/issues/2522const isBackendNote = noteContext?.noteId === "_backendLog";- const isSqlNote = noteContext.note?.mime === "text/x-sqlite;schema=trilium";const isFullHeightNoteType = type && TYPE_MAPPINGS[type].isFullHeight;- return (!noteContext?.hasNoteList() && isFullHeightNoteType && !isSqlNote)+ return (!noteContext?.hasNoteList() && isFullHeightNoteType)|| noteContext?.viewScope?.viewMode === "attachments"|| isBackendNote;}diff --git a/apps/client/src/widgets/scroll_padding.tsx b/apps/client/src/widgets/scroll_padding.tsxindex d42098672b..549e53f441 100644--- a/apps/client/src/widgets/scroll_padding.tsx+++ b/apps/client/src/widgets/scroll_padding.tsx@@ -1,11 +1,14 @@import { useEffect, useRef, useState } from "preact/hooks";+import { useNoteContext } from "./react/hooks";export default function ScrollPadding() {const { note, parentComponent, ntxId, viewScope } = useNoteContext();const ref = useRef<HTMLDivElement>(null);const [height, setHeight] = useState<number>(10);- const isEnabled = ["text", "code"].includes(note?.type ?? "") && viewScope?.viewMode === "default";+ const isEnabled = ["text", "code"].includes(note?.type ?? "")+ && viewScope?.viewMode === "default"+ && !note?.isTriliumSqlite();const refreshHeight = () => {if (!ref.current) return;@@ -37,6 +40,6 @@ export default function ScrollPadding() {style={{ height }}onClick={() => parentComponent.triggerCommand("scrollToEnd", { ntxId })}/>- : <div></div>- )+ : <div />+ );}diff --git a/apps/client/src/widgets/type_widgets/SqlConsole.css b/apps/client/src/widgets/type_widgets/SqlConsole.cssindex 63b5621edd..2d19e90982 100644--- a/apps/client/src/widgets/type_widgets/SqlConsole.css+++ b/apps/client/src/widgets/type_widgets/SqlConsole.css@@ -1,7 +1,10 @@-.sql-result-widget {- padding: 15px;+.sql-console-widget-container {+ .note-detail-split-preview {+ overflow: auto;+ }++ .sql-console-result-container td {+ white-space: preserve;+ }}-.sql-console-result-container td {- white-space: preserve;-}\ No newline at end of file