Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
61f849e
added adaptation to change resize direction
arausly Oct 20, 2024
fa6fb3d
started logic for setting max-wdith for resizable nodes
arausly Oct 28, 2024
b8efa4a
fixed undo/redo for resizable nodes
arausly Nov 5, 2024
6c61b90
refactors
arausly Nov 13, 2024
d0aada4
refactors and changes
arausly Nov 18, 2024
1998848
fixed horizontally overflowing evaluation results
arausly Nov 19, 2024
bc6aa05
resizable wrapper fix
arausly Nov 19, 2024
7d7bd45
added resizable feature to linking editor and removed height from bei…
arausly Nov 21, 2024
cf472cb
Merge branch 'next' into feature/change-node-width-CMEM-4051
haschek Nov 27, 2024
3016f54
Merge branch 'next' into feature/change-node-width-CMEM-4051
haschek Nov 28, 2024
3decd11
Merge branch 'develop' into feature/change-node-width-CMEM-4051
arausly Jan 20, 2025
889fc70
added updates for resizing feature
arausly Jan 23, 2025
405a1e4
added fix for skewed widths
arausly Feb 6, 2025
2a2fa93
fixed reset nodes option
arausly Feb 7, 2025
2a66978
added patch for overflowing menu
arausly Feb 10, 2025
12cb2a6
Merge remote-tracking branch 'origin/develop' into feature/change-nod…
haschek Feb 11, 2025
2c47c96
fix for cursor handles and extra padding
arausly Feb 12, 2025
1d7a989
tentative patch
arausly Feb 12, 2025
4d01305
More refactors
arausly Feb 15, 2025
f5dfbfd
test patches
arausly Feb 18, 2025
a77abb7
corrected isresizable flag and other refactors
arausly Feb 20, 2025
9c52178
fixed bug with height expansion
arausly Feb 21, 2025
a6aabd1
Merge branch 'develop' into feature/change-node-width-CMEM-4051
haschek Feb 24, 2025
b95d5d0
node content refactors
arausly Feb 24, 2025
6e0fab8
more refactors
arausly Feb 25, 2025
f033892
removed max-height for nodes since they are all possibly resizable
arausly Feb 25, 2025
365c588
overwrote max-height for resizable, expands based on content
arausly Feb 25, 2025
1f0bae5
fix node resizing: use correct default size and do not set values for…
haschek Feb 27, 2025
4c3c819
autoformat
haschek Feb 27, 2025
841ab52
update changelog
haschek Feb 27, 2025
12ea726
corrected to right min dimensions
arausly Mar 3, 2025
765782d
preserved reset changes in stack
arausly Mar 4, 2025
6184a0f
check resizing for all property changes, otherwise class information …
haschek Mar 5, 2025
358ea04
Refactoring of NodeContent
silkservice Mar 11, 2025
203d3eb
fix initial size, updating initial measures and fix clas enahncement
haschek Mar 11, 2025
3877e5a
Small clean-ups
silkservice Mar 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- implemented support for `intent` states in code editor
- `Label` component
- added `additionalElements` property to display elements at the end of the label
- `<NodeContent />`
- `resizeDirections` to specifiy the axis that can be used to resize the node
- `resizeMaxDimensions` to add maximum values for resizing height/width

## [24.0.1] - 2025-02-06

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"jshint": "^2.13.6",
"lodash": "^4.17.21",
"n3": "^1.23.1",
"re-resizable": "^6.10.1",
"re-resizable": "^6.10.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-flow-renderer": "9.7.4",
Expand Down
1 change: 1 addition & 0 deletions src/components/Menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ $menu-background-color: transparent !default;
@import "~@blueprintjs/core/src/components/menu/menu";

.#{$ns}-menu {
min-width: auto;
padding: 0;

.#{$ns}-popover2-content > & {
Expand Down
34 changes: 18 additions & 16 deletions src/extensions/codemirror/CodeMirror.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useMemo, useRef } from "react";
import { defaultKeymap, indentWithTab } from "@codemirror/commands";
import { foldKeymap } from "@codemirror/language";
import { lintGutter } from "@codemirror/lint";
import { EditorState, Extension } from "@codemirror/state";
import { DOMEventHandlers, EditorView, KeyBinding, keymap, Rect, ViewUpdate } from "@codemirror/view";
import { minimalSetup } from "codemirror";
Expand Down Expand Up @@ -29,6 +28,7 @@ import {
adaptedHighlightSpecialChars,
adaptedLineNumbers,
adaptedPlaceholder,
adaptedLintGutter,
} from "./tests/codemirrorTestHelper";
import { ExtensionCreator } from "./types";

Expand Down Expand Up @@ -212,7 +212,7 @@ export const CodeEditor = ({
return [];
}

const values = [lintGutter()];
const values = [adaptedLintGutter()];

const linters = ModeLinterMap.get(mode);
if (linters) {
Expand Down Expand Up @@ -320,24 +320,26 @@ export const CodeEditor = ({
parent: parent.current,
});

if (height) {
view.dom.style.height = typeof height === "string" ? height : `${height}px`;
}
if (view?.dom) {
if (height) {
view.dom.style.height = typeof height === "string" ? height : `${height}px`;
}

if (disabled) {
view.dom.className += ` ${eccgui}-disabled`;
}
if (disabled) {
view.dom.className += ` ${eccgui}-disabled`;
}

if (intent) {
view.dom.className += ` ${eccgui}-intent--${intent}`;
}
if (intent) {
view.dom.className += ` ${eccgui}-intent--${intent}`;
}

if (autoFocus) {
view.focus();
}
if (autoFocus) {
view.focus();
}

if (setEditorView) {
setEditorView(view);
if (setEditorView) {
setEditorView(view);
}
}

return () => {
Expand Down
4 changes: 4 additions & 0 deletions src/extensions/codemirror/tests/codemirrorTestHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import { EditorView, placeholder, highlightSpecialChars, lineNumbers, highlightActiveLine } from "@codemirror/view";
import { syntaxHighlighting, foldGutter, codeFolding } from "@codemirror/language";
import { Extension } from "@codemirror/state";
import { lintGutter } from "@codemirror/lint";

/** placeholder extension, current error '_view.placeholder is not a function' */
export const adaptedPlaceholder = (text?: string) =>
Expand Down Expand Up @@ -55,3 +56,6 @@ export const adaptedFoldGutter = (props?: any) =>

export const adaptedCodeFolding = (props?: any) =>
typeof codeFolding === "function" ? codeFolding(props) : emptyExtension;

export const adaptedLintGutter = (props?: any) =>
typeof lintGutter === "function" ? lintGutter(props) : emptyExtension;
1 change: 1 addition & 0 deletions src/extensions/react-flow/_config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ $reactflow-edge-stroke-color-selected: $eccgui-color-accent !default;
$reactflow-transition-time: 0.25s !default;
$reactflow-transition-function: "" !default;
$reactflow-transition-anglestart: -90deg;
$reactflow-cursor-delimiter-offset: 0.9 * $eccgui-size-block-whitespace;
Loading