From b5a2ed19e5d850bbac1487081e8fccb89729e10c Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Thu, 19 Nov 2026 16:20:10 +0100 Subject: [PATCH 1/2] Restore resized sticky note heights after reload --- .../react-flow/nodes/NodeContent.test.tsx | 44 +++++++++++++++++++ .../react-flow/nodes/NodeContent.tsx | 4 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 src/extensions/react-flow/nodes/NodeContent.test.tsx diff --git a/src/extensions/react-flow/nodes/NodeContent.test.tsx b/src/extensions/react-flow/nodes/NodeContent.test.tsx new file mode 100644 index 00000000..71cd9f75 --- /dev/null +++ b/src/extensions/react-flow/nodes/NodeContent.test.tsx @@ -0,0 +1,44 @@ +import React from "react"; +import { render, screen } from "@testing-library/react"; +import { ReactFlowProvider } from "@xyflow/react"; + +import "@testing-library/jest-dom"; + +import { NodeContent } from "./NodeContent"; + +describe("NodeContent vertical sizing", () => { + it.each([ + { savedHeight: 900, maxHeight: undefined, expectedMaxHeight: "none" }, + { savedHeight: 900, maxHeight: 600, expectedMaxHeight: "600px" }, + { savedHeight: undefined, maxHeight: undefined, expectedMaxHeight: "400px" }, + ])( + "applies max-height $expectedMaxHeight with saved height $savedHeight and resize limit $maxHeight", + ({ savedHeight, maxHeight, expectedMaxHeight }) => { + render( + + + + , + ); + + const node = screen.getByTestId("node-content"); + expect(node).toHaveStyle({ maxHeight: expectedMaxHeight }); + if (savedHeight) { + const height = Math.min(savedHeight, maxHeight ?? Infinity); + expect(node).toHaveStyle({ height: `${height}px` }); + expect(node.parentElement).toHaveStyle({ height: `${height}px` }); + } + }, + ); +}); diff --git a/src/extensions/react-flow/nodes/NodeContent.tsx b/src/extensions/react-flow/nodes/NodeContent.tsx index a1e78a82..12cbea94 100644 --- a/src/extensions/react-flow/nodes/NodeContent.tsx +++ b/src/extensions/react-flow/nodes/NodeContent.tsx @@ -535,13 +535,15 @@ export function NodeContent>({ highlightColor, ); + // A saved height must override the default CSS height cap, just as an interactive resize does. + const resizableMaxHeight = resizeMaxDimensions?.height ?? (nodeDimensions?.height ? "none" : undefined); const resizableStyles = isResizable && (width ?? 0) + (height ?? 0) > 0 ? { width, height, maxWidth: resizeDirections.right ? (resizeMaxDimensions?.width ?? undefined) : undefined, - maxHeight: resizeDirections.bottom ? (resizeMaxDimensions?.height ?? undefined) : undefined, + maxHeight: resizeDirections.bottom ? resizableMaxHeight : undefined, } : {}; From c713f45499150d8bb65e8173c747e51170cda03d Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Thu, 19 Nov 2026 16:22:14 +0100 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93be23c7..7c81cd91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - improve keyboard navigation, tag removal and focus handling - improve screen reader labels and selection announcements - preserve filters and keep the dropdown open when toggling existing options +- `` + - restore the saved height of vertically resized nodes, including sticky notes, while honoring configured resize limits ## [26.2.1] - 2026-11-02