Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
0a8a88b
patch for highlighting in codemirror editor
arausly Jul 7, 2025
0f727a9
Merge branch 'develop' into feature/keyValueParameterType-CMEM-6277
arausly Jul 9, 2025
86d4ea8
Prepare release v24.4.0
haschek Jul 29, 2025
84e5a65
CodeEditor component should switch to/from read-only mode without los…
andreas-schultz Jul 9, 2025
978b733
Support updating most config parameters of CodeMirror component after…
andreas-schultz Jul 9, 2025
e4b6afe
Fix compile errors
andreas-schultz Jul 18, 2025
2705c54
Allow to set parameters of the outer div container of the CodeAutocom…
andreas-schultz Jul 7, 2025
a2a556c
Fix CodeEditor Enter key handling using wrong offset; Fix first drop …
haschek Jul 29, 2025
56e4c5d
Fix compile issue
andreas-schultz Jul 29, 2025
8e19597
improve changelog messages
haschek Jul 29, 2025
3741cf8
Merge branch 'next' into feature/keyValueParameterType-CMEM-6277
robertisele Aug 4, 2025
71ccfd7
Remove errors in explore (CMEM-6724)
fiorsaoirse Aug 5, 2025
3580f3f
Revert "Remove errors in explore (CMEM-6724)"
fiorsaoirse Aug 5, 2025
9e7f048
Added additional actions to ActivityControlWidget
fiorsaoirse Aug 5, 2025
0911071
add explicit property to set delay before swapping the placeholder el…
haschek Aug 5, 2025
88f68e1
use minimal swap time as default
haschek Aug 5, 2025
d2f7033
Added a story, added tests
fiorsaoirse Aug 5, 2025
cc3e52d
prevent that flow drag action removes a click action on a menu element
haschek Aug 5, 2025
48bf477
prevent infering event processes, only use latest one
haschek Aug 5, 2025
1d11c32
add missing styles for react flow 12 attribution
haschek Aug 6, 2025
86ea778
Check data-test-id before usage
fiorsaoirse Aug 6, 2025
a230b0c
remove support for react flow v10
haschek Aug 6, 2025
409475a
update changelog
haschek Aug 6, 2025
1c518f5
Merge pull request #311 from eccenca/bugfix/remove-errors-CMEM-6724
haschek Aug 6, 2025
137ba76
Merge remote-tracking branch 'origin/develop' into fix/improveTooltip…
haschek Aug 6, 2025
ccf1f47
upgrade jest to v30, fix critical security issue in one of the used s…
haschek Aug 6, 2025
3ca5705
fix typo
haschek Aug 7, 2025
2b0cf16
decide to use a longer opening delay for the first time and use a tra…
haschek Aug 7, 2025
a5b45a7
Merge pull request #312 from eccenca/fix/improveTooltipPerformanceRep…
andreas-schultz Aug 7, 2025
09c52e4
Merge remote-tracking branch 'origin/develop' into release/v24.4.0
haschek Aug 7, 2025
7b25d6b
swich back to any type to prevent a breaking change
haschek Aug 7, 2025
56be6df
Merge pull request #307 from eccenca/release/v24.4.0
haschek Aug 7, 2025
a3c5346
Update changelog section to 24.4.0
haschek Aug 7, 2025
d2b885b
Merge pull request #315 from eccenca/maintain/mergeReleaseTag-v24.4.0
haschek Aug 11, 2025
009ca81
Merge remote-tracking branch 'origin/develop' into feature/forwardUpg…
haschek Aug 11, 2025
bd8f403
Merge pull request #316 from eccenca/feature/forwardUpgradesFromDevel…
robertisele Aug 13, 2025
f043a50
include version splitter for react flow edges
haschek Aug 13, 2025
eeb6753
added v6 codemirror pkg support for html
arausly Aug 13, 2025
7dd9e24
fix edge markers and add colors of intent states for v12 support
haschek Aug 14, 2025
7f393d8
add property to v12 edge that can used to define the arrow marker, or…
haschek Aug 14, 2025
a8873a4
add ability to use different path layous for v12 edges, provide strai…
haschek Aug 14, 2025
4660ae8
Merge remote-tracking branch 'origin/next' into fix/useCorrectEdgesAn…
haschek Aug 14, 2025
ff44c99
update changelog
haschek Aug 14, 2025
c193934
export bezier edge and use straigh edge for default react flow config…
haschek Aug 14, 2025
2736da6
adjust minimap and attribution position
haschek Aug 14, 2025
d2eee18
Merge branch 'next' into feature/htmlFormattedEmail-CMEM-6763
robertisele Aug 18, 2025
d56f33f
Merge pull request #317 from eccenca/feature/htmlFormattedEmail-CMEM-…
robertisele Aug 18, 2025
dbe3b59
minimal fix for the offset problem of new connection lines when edito…
haschek Aug 19, 2025
2e8ca43
Added missed styles from the original package
fiorsaoirse Aug 19, 2025
69904a2
Added a changelog entry
fiorsaoirse Aug 19, 2025
76745a2
provide component that is used as default element for new connection …
haschek Aug 19, 2025
749a08d
Merge remote-tracking branch 'origin/next' into fix/useCorrectEdgesAn…
haschek Aug 19, 2025
bc2bafa
Added missed styles from the original package
fiorsaoirse Aug 19, 2025
5612b32
include some v12 base styles
haschek Aug 19, 2025
4d293a3
Merge branch 'next' into feature/keyValueParameterType-CMEM-6277
andreas-schultz Aug 20, 2025
1ded734
Merge pull request #300 from eccenca/feature/keyValueParameterType-CM…
andreas-schultz Aug 20, 2025
df1f21a
update package lock
haschek Aug 20, 2025
faf7840
Prepare release v24.3.1
haschek Aug 20, 2025
7414441
Added missed styles from the original package
fiorsaoirse Aug 19, 2025
2ffb3cc
Added a changelog entry
fiorsaoirse Aug 19, 2025
d30f208
update changelog
haschek Aug 20, 2025
b50a9fb
Merge pull request #321 from eccenca/release/v24.3.1
haschek Aug 21, 2025
7efc329
Update changelog section to 24.3.1
haschek Aug 21, 2025
c7bf0b9
Merge branch 'bugfix/reactflow-missed-styles' into maintain/mergeRele…
haschek Aug 21, 2025
19f269d
Merge pull request #322 from eccenca/maintain/mergeReleaseTag-v24.3.1
haschek Aug 21, 2025
48f369a
Update changelog, remove fix info from wrong section
haschek Aug 21, 2025
370d9c7
Fix typo
haschek Aug 21, 2025
54091d4
Merge branch 'next' into fix/useCorrectEdgesAndArrows-CMEM-6721
haschek Aug 21, 2025
26cb90f
Merge pull request #318 from eccenca/bugfix/reactflow-missed-styles
haschek Aug 21, 2025
377ac05
increase delay to prevent swaps for quick and not intended mouse hovers
haschek Aug 21, 2025
512adfd
add check if the hover state is still given before triggering the event
haschek Aug 21, 2025
62ed3bb
update changelog
haschek Aug 21, 2025
44aa3c1
prevent infinite event triggers
haschek Aug 21, 2025
9f106d9
Merge pull request #323 from eccenca/fix/preventWronglyDisplayedToolt…
fiorsaoirse Aug 22, 2025
9acbe0b
Prepare release v24.4.1
haschek Aug 25, 2025
dd0bec9
export base intent types via library root
haschek Aug 25, 2025
9d30bfd
add color palette icons
haschek Aug 25, 2025
ada0b2a
Merge pull request #314 from eccenca/fix/useCorrectEdgesAndArrows-CME…
haschek Aug 25, 2025
ea0bdf1
Merge pull request #324 from eccenca/release/v24.4.1
haschek Aug 25, 2025
ab58289
Update changelog section to 24.4.1
haschek Aug 25, 2025
f7d2e9c
Merge pull request #325 from eccenca/maintain/mergeReleaseTag-v24.4.1
haschek Aug 25, 2025
0d37bec
Merge remote-tracking branch 'origin/develop' into feature/includeDev…
haschek Aug 26, 2025
fd4e22c
Merge pull request #328 from eccenca/feature/includeDevelopToNext-CME…
haschek Sep 2, 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
99 changes: 87 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,97 @@ This is a major release, and it might be not compatible with your current usage

### Added

- Extended existing height and readOnly props from `CodeEditorProps` to `AutoSuggestionProps` & `ExtendedCodeEditorProps` to be configurable from `<CodeAutocompleteField />`
- `<CodeAutocompleteField />`:
- outerDivAttributes parameter: Allows to set parameter of the container div element of the code complete field.
- `<EdgeStraight />`
- it's basically `<EdgeDefault />` without any special configs
- `<EdgeBezier />`
- only supported for v12, in v9 as straight edge is used
- use `curvature` property in the edge `data` object to define the bezier layout (0..1, default: 0.25)
- `<EdgeDefaultV12 />`
- the `data` object provides `markerAppearance` to set and remove the edge arrows
- `<EdgeNew />`
- component for React Flow v12, displaying new connection lines

### Removed

- support for React Flow v10 was completely removed

### Fixed

- <CodeMirror />:
- Editor is re-created after certain property changes and is reset, i.e. loses it current state.
- <CodeAutocompleteField />:
- Read-only mode does not work correctly. It is still possible to change the value via pressing Enter (in multiline mode) or clicking the clear button.
- First auto-completion item not marked as active when drop down first shown.
- `<CodeEditor />`:
- Enter key handling (adding new line) broken when `onKeyDown` is defined.
- `<Modal />`:
- Add 'nopan', 'nowheel' and 'nodrag' classes to Modal's overlay classes in order to always prevent react-flow to react to drag and pan actions in modals.
- Add 'nopan', 'nowheel' and 'nodrag' classes to Modal's overlay classes in order to always prevent react-flow to react to drag and pan actions in modals.

### Changed

- `<EdgeDefault />` and `<EdgeStep />`
- support now v9 and v12 of react flow
- `<ReactFlowExtended />`
- use `<EdgeNew />` by default for new connection lines, you can overwrite it by setting `connectionLineComponent` to `undefined`

### Deprecated

- support for React Flow v9 will be removed in v26
- `<EdgeDefs />`
- use `<ReactFlowMarkers />` or build it on single `<ReactFlowMarker />`

## [24.4.1] - 2025-08-25

### Fixed

- React flow v12:
- add missing styles from react flow library to ensure proper functionality of new connection lines
- `<Tooltip />`
- re-check hover state after swapping the placeholder before triggering the event bubbling

### Changed

- `<IconButton/>`
- increase the default delay before swapping the tooltip placeholder of the icon, reducing unwanted swaps because of mouseovers that were not intended
- `IntentBaseTypes` now available via root export
- some `intent` properties support less or more intent types, in case you need to test supported types before, then you can use it directly from the component interface, e.g. `TextFieldProps["intent"]`

### Added

- `application-colors` and `data-color` icons, both represented by the Carbon `ColorPalette` icon

## [24.3.1] - 2025-08-21

### Fixed

- React flow v12:
- add missing styles from react flow library to ensure proper functionality of new connection lines

## [24.4.0] - 2025-08-07

### Added

- `<ExtendedCodeEditor />`
- `height` and `readOnly` properties to forward them to `<CodeEditor/>`
- `<CodeAutocompleteField />`:
- `outerDivAttributes` property: allows to set parameter of the container element
- `height` and `readOnly` properties to forward them to `<ExtendedCodeEditor/>`
- `<ActivityControlWidget />`
- `additionalActions` property to include other more complex components between the action buttons and the context menu of the widget
- `<Tooltip />`
- `swapPlaceholderDelay` property to allow configuration of the delay time before the placeholder element is replaced by the actual tooltip component

### Fixed

- `<CodeEditor />`
- Editor is re-created after certain property changes and is reset, i.e. loses it current state.
- Enter key handling (adding new line) was broken when `onKeyDown` is defined.
- `<CodeAutocompleteField />`
- First auto-completion item not marked as active when drop down first shown.
- Read-only mode does not work correctly. It is still possible to change the value via pressing Enter (in multiline mode) or clicking the clear button.

### Changed

- `<NodeContent />`
- prevent start of a react flow drag action of a node when user clicks in the node menu section

### Deprecated

- `<CodeEditor />`
- `onChange` property: support for `(v: any) => void` type will be exchanged to more specific `(v: string) => void`

## [24.3.0] - 2025-06-05

Expand Down Expand Up @@ -111,7 +186,7 @@ If you use Jest then you can use the same aliases for the `moduleNameMapper` con

### Migration from v24 to v25

- remove deprecated components, properties and imports from your project, if the info cannot be found here then it was already mentioned in **Deprecated** sections of the v24.* changelogs.
- remove deprecated components, properties and imports from your project, if the info cannot be found here then it was already mentioned in **Deprecated** sections of the v24.\* changelogs.
- we changed the integration of the supported react flow versions, formerly names `legacy` and `next` resources were renamed to more precise `v9` and `v10`, please see all info in the section about changes

## [24.1.0] - 2025-04-16
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@eccenca/gui-elements",
"description": "GUI elements based on other libraries, usable in React application, written in Typescript.",
"version": "24.3.0",
"version": "24.4.1",
"license": "Apache-2.0",
"homepage": "https://github.com/eccenca/gui-elements",
"bugs": "https://github.com/eccenca/gui-elements/issues",
Expand Down Expand Up @@ -79,6 +79,7 @@
"@codemirror/lang-sql": "^6.8.0",
"@codemirror/lang-xml": "^6.1.0",
"@codemirror/lang-yaml": "^6.1.2",
"@codemirror/lang-html": "^6.4.9",
"@codemirror/legacy-modes": "^6.5.0",
"@mavrin/remark-typograf": "^2.2.0",
"@xyflow/react": "^12.6.0",
Expand All @@ -93,7 +94,6 @@
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-flow-renderer": "9.7.4",
"react-flow-renderer-lts": "npm:react-flow-renderer@^10.3.17",
"react-inlinesvg": "^3.0.3",
"react-markdown": "^10.1.0",
"react-markdown-deprecated": "npm:react-markdown@^8.0.7",
Expand Down Expand Up @@ -149,8 +149,8 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"husky": "4",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest": "^30.0.5",
"jest-environment-jsdom": "^30.0.5",
"jest-pnp-resolver": "^1.2.3",
"lint-staged": "^15.5.1",
"node-sass-package-importer": "^5.3.3",
Expand Down
50 changes: 45 additions & 5 deletions src/cmem/ActivityControl/ActivityControlWidget.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import React from "react";
import React, { useMemo, useState } from "react";
import { loremIpsum } from "react-lorem-ipsum";
import { OverlaysProvider } from "@blueprintjs/core";
import { Meta, StoryFn } from "@storybook/react";

import { helpersArgTypes } from "../../../.storybook/helpers";
import { ActivityControlWidget, Tag, TagList } from "../../../index";
import {
ActivityControlWidget,
ActivityControlWidgetAction,
IconButton,
SimpleDialog,
Tag,
TagList,
} from "../../../index";

export default {
title: "Cmem/ActivityControlWidget",
Expand All @@ -19,7 +27,7 @@ const Template: StoryFn<typeof ActivityControlWidget> = (args) => <ActivityContr

export const FullExample = Template.bind({});

const actions = [
const actions: ActivityControlWidgetAction[] = [
{
"data-test-id": "activity-reload-activity",
icon: "item-reload",
Expand All @@ -30,13 +38,15 @@ const actions = [
{
"data-test-id": "activity-start-activity",
icon: "item-start",
// eslint-disable-next-line no-console
action: () => console.log("start"),
tooltip: "Start Activity",
disabled: false,
},
{
"data-test-id": "activity-stop-activity",
icon: "item-stop",
// eslint-disable-next-line no-console
action: () => console.log("cancel"),
tooltip: "Stop Activity",
disabled: false,
Expand All @@ -57,8 +67,8 @@ const commonWidgetArgs = {
progressSpinner: {
intent: "none",
value: 0.5,
},
};
} as const,
} as const;

FullExample.args = {
...commonWidgetArgs,
Expand All @@ -80,3 +90,33 @@ WidgetWithTags.args = {
...commonWidgetArgs,
tags: widgetTags,
};

export const WidgetWithAdditionalActions: StoryFn<typeof ActivityControlWidget> = (args) => {
const [isOpen, setIsOpen] = useState(false);

const params = useMemo(
() => ({
...commonWidgetArgs,
...args,
additionalActions: args.additionalActions ?? [
<IconButton name="application-explore" onClick={() => setIsOpen(true)} />,
],
}),
[]
);

return (
<OverlaysProvider>
<ActivityControlWidget {...params} />
<SimpleDialog
title="Additional actions dialog"
isOpen={isOpen}
onClose={() => setIsOpen(false)}
canOutsideClickClose
canEscapeKeyClose
>
Modal content
</SimpleDialog>
</OverlaysProvider>
);
};
56 changes: 47 additions & 9 deletions src/cmem/ActivityControl/ActivityControlWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ export interface ActivityControlWidgetProps extends TestableComponent {
* execution timer messages for waiting and running times.
*/
timerExecutionMsg?: JSX.Element | null;
/**
* additional actions that can serve as a complex component, positioned between the default actions and the context menu
*/
additionalActions?: React.ReactElement<unknown>[];
}

interface IActivityContextMenu extends TestableComponent {
Expand Down Expand Up @@ -110,11 +114,13 @@ interface IActivityMenuAction extends ActivityControlWidgetAction {
/** Shows the status of activities and supports actions on these activities. */
export function ActivityControlWidget(props: ActivityControlWidgetProps) {
const {
"data-test-id": dataTestId,
"data-test-id": dataTestIdLegacy,
"data-testid": dataTestId,
progressBar,
progressSpinner,
activityActions,
activityContextMenu,
additionalActions,
small,
border,
hasSpacing,
Expand All @@ -126,10 +132,19 @@ export function ActivityControlWidget(props: ActivityControlWidgetProps) {
} = props;
const spinnerClassNames = (progressSpinner?.className ?? "") + ` ${eccgui}-spinner--permanent`;
const widget = (
<OverviewItem data-test-id={dataTestId} hasSpacing={border || hasSpacing} densityHigh={small}>
<OverviewItem
data-test-id={dataTestIdLegacy}
data-testid={dataTestId}
hasSpacing={border || hasSpacing}
densityHigh={small}
>
{progressBar && <ProgressBar {...progressBar} />}
{(progressSpinner || progressSpinnerFinishedIcon) && (
<OverviewItemDepiction keepColors>
<OverviewItemDepiction
data-testid={dataTestId ? `${dataTestId}-progress-spinner` : undefined}
data-test-id={dataTestIdLegacy ? `${dataTestIdLegacy}-progress-spinner` : undefined}
keepColors
>
{progressSpinnerFinishedIcon ? (
React.cloneElement(progressSpinnerFinishedIcon as JSX.Element, { small, large: !small })
) : (
Expand All @@ -145,13 +160,21 @@ export function ActivityControlWidget(props: ActivityControlWidgetProps) {
)}
<OverviewItemDescription>
{props.label && (
<OverviewItemLine small={small}>
<OverviewItemLine
data-testid={dataTestId ? `${dataTestId}-label` : undefined}
data-test-id={dataTestIdLegacy ? `${dataTestIdLegacy}-label` : undefined}
small={small}
>
{React.cloneElement(labelWrapper, {}, props.label)}
{timerExecutionMsg && (props.statusMessage || tags) && <>&nbsp;({timerExecutionMsg})</>}
</OverviewItemLine>
)}
{(props.statusMessage || tags) && (
<OverviewItemLine small>
<OverviewItemLine
data-testid={dataTestId ? `${dataTestId}-status-message` : undefined}
data-test-id={dataTestIdLegacy ? `${dataTestIdLegacy}-status-message` : undefined}
small
>
{tags}
{props.statusMessage && (
<OverflowText passDown>
Expand All @@ -172,28 +195,43 @@ export function ActivityControlWidget(props: ActivityControlWidgetProps) {
</OverviewItemLine>
)}
{timerExecutionMsg && !(props.statusMessage || tags) && (
<OverviewItemLine small>{timerExecutionMsg}</OverviewItemLine>
<OverviewItemLine
data-testid={dataTestId ? `${dataTestId}-status-message` : undefined}
data-test-id={dataTestIdLegacy ? `${dataTestIdLegacy}-status-message` : undefined}
small
>
{timerExecutionMsg}
</OverviewItemLine>
)}
</OverviewItemDescription>
<OverviewItemActions>
<OverviewItemActions
data-testid={dataTestId ? `${dataTestId}-actions` : undefined}
data-test-id={dataTestIdLegacy ? `${dataTestIdLegacy}-actions` : undefined}
>
{activityActions &&
activityActions.map((action, idx) => {
return (
<IconButton
key={typeof action.icon === "string" ? action.icon : action["data-test-id"] ?? idx}
key={
typeof action.icon === "string"
? action.icon
: action["data-test-id"] ?? action["data-testid"] ?? idx
}
data-test-id={action["data-test-id"]}
data-testid={action["data-testid"]}
name={action.icon}
text={action.tooltip}
onClick={action.action}
disabled={action.disabled}
hasStateWarning={action.hasStateWarning}
intent={action.hasStateWarning ? "warning" : undefined}
tooltipProps={{
hoverOpenDelay: 200,
placement: "bottom",
}}
/>
);
})}
{additionalActions}
{activityContextMenu && activityContextMenu.menuItems.length > 0 && (
<ContextMenu
data-test-id={activityContextMenu["data-test-id"]}
Expand Down
Loading