Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a3f8a99
Update changelog section to 26.0.0
haschek Jul 8, 2026
63a23f2
Merge pull request #403 from eccenca/maintain/mergeReleaseTag-v26.0.0
haschek Jul 8, 2026
67e6977
Fix pre/code text inside tooltips
andreas-schultz Jul 13, 2026
c74f47f
Merge pull request #404 from eccenca/feature/executionVariables-CMEM-…
andreas-schultz Jul 13, 2026
b4ef376
Do not disable history in CodeEditor component when shouldHaveMinimal…
andreas-schultz Jul 15, 2026
8c6ca34
Merge pull request #405 from eccenca/fix/undoRedo-codeAutoCompleteInp…
J-x-D Jul 27, 2026
4de846c
fix width if it contains a label with OverflowText children
haschek Aug 5, 2026
4b790ef
use minimum breakpoint for column display
haschek Aug 5, 2026
1d8cf1c
use workaround to improve alignment
haschek Aug 6, 2026
9c4d618
extend story, fetch example from label directly
haschek Aug 11, 2026
b1a7768
Merge pull request #406 from eccenca/bugfix/propertyNameWidth-CMEM-7578
haschek Aug 12, 2026
da85cd4
Prepare release v26.1.0
haschek Aug 12, 2026
47cbefa
fis high ecurity issues for js-yaml library
haschek Aug 17, 2026
839984e
fix high ecurity issues for nanoid library
haschek Aug 17, 2026
8bcf4a5
fix high ecurity issues for fast-uri library
haschek Aug 17, 2026
5e6cb72
fix high security issues for immutable library
haschek Aug 17, 2026
c0cf88c
fix high security issues for brace-expansion library
haschek Aug 17, 2026
5316ec5
fix high security issues for postcss library used with stylelint pack…
haschek Aug 17, 2026
1d37cfe
fix high security issues for postcss library
haschek Aug 17, 2026
a72acdf
Merge pull request #409 from eccenca/bugfix/v26.1.0-securityfix
haschek Aug 18, 2026
9613895
fix runtime arror and classname issue
haschek Aug 18, 2026
aa8ac36
improve fix for pre/code markup in tooltip content for inline code
haschek Aug 18, 2026
1c475ae
fix name of breakpoint variable
haschek Aug 18, 2026
db2be5d
fix story to demonstrate orginal change
haschek Aug 18, 2026
adf3f63
improve changelog
haschek Aug 19, 2026
157b769
fix fetch of css custom properties values
haschek Aug 19, 2026
49c6fcc
update changelog
haschek Aug 19, 2026
44e6639
fix jsdom crash
haschek Aug 19, 2026
2f2b493
add fallback that can be enabled to get css custom property values if…
haschek Aug 19, 2026
b6aff9b
Merge pull request #411 from eccenca/bugfix/release26.1.0-customPrope…
haschek Aug 20, 2026
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
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,42 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [Unreleased]

### Added

- `utils`
- `useComputedStyleFallback` option for `CssCustomProperties`: if the CSSOM does not provide any property name for the used selector, e.g. because the declarations are part of a constructed and adopted stylesheet, then the names are read from the computed style of the matching element; disabled by default because the computed style also contains all inherited custom properties

### Changed

- `<CodeEditor />`
- `shouldHaveMinimalSetup`: even if set to `false`, the edit history feature is still enabled explicitly
- `<PropertyValuePair />`
- the two-column display is only used if the container is wide enough, this way property name columns do not get too small
- in narrower containers, property name and value are displayed as stacked rows
- make the breakpoint configurable via SCSS (`$eccgui-propertyvalue-size-column-breakpoint-small`)
- `utils`
- values of CSS custom properties are resolved via the computed style of a matching element now, so they always represent what the browser really applies, e.g. references to other custom properties are already replaced

### Fixed

- `<Tooltip />`
- inline `code` markup was hardly readable because of low contrast
- `<PropertyName />`
- fix width if it contains a `<Label />` with `<OverflowText />` children
- the label tooltip is displayed correctly inside the container
- `<HandleDefault />`
- default handle class names were removed as soon as an `intent` was given
- fix runtime error if the element holding the handle tools is not available
- `utils`
- CSS custom properties are also found if their rule is nested inside a cascade layer (`@layer`) or another grouping rule like `@media`, `@supports` or `@container`; this affects `textToColorHash()`, `getEnabledColorsFromPalette()`, `getEnabledColorPropertiesFromPalette()` and `getColorConfiguration()`
- CSS custom properties are also found if the given selector is only one part of the selector list of a rule, e.g. `:root, :host`
- stylesheets that are loaded from another origin do not break the collection of CSS custom properties anymore
- collecting CSS custom properties does not throw an error anymore in test environments where the style declaration of a CSS rule is not an iterable object, e.g. in jsdom
- empty results are not cached anymore, this way they are read again if the stylesheets are loaded later on
- `minimalColorDistance` is part of the cache key of `getEnabledColorsFromPalette()` and `getEnabledColorPropertiesFromPalette()` now

## [26.0.0] - 2026-07-08

This is a major release, and it might not be compatible with your current usage of our library. Please read about the necessary changes in the migration section below.

### Migration from v25 to v26
Expand Down
15 changes: 12 additions & 3 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": "26.0.0",
"version": "26.1.0",
"license": "Apache-2.0",
"homepage": "https://github.com/eccenca/gui-elements",
"bugs": "https://github.com/eccenca/gui-elements/issues",
Expand Down Expand Up @@ -180,12 +180,21 @@
},
"resolutions": {
"**/@blueprintjs/core": "6.8.1",
"node-sass-package-importer/**/postcss": "^8.5.10",
"node-sass-package-importer/**/postcss": "^8.5.18",
"stylelint-order/**/postcss": "^8.5.12",
"stylelint/**/postcss": "^8.5.18",
"hast-util-from-parse5": "8.0.0",
"**/lodash": "^4.18.1",
"**/minimatch": "^3.1.4",
"**/serialize-javascript": "^7.0.5",
"**/ws": "^8.21.0"
"**/ws": "^8.21.0",
"babel-jest/**/js-yaml": "^3.15.1",
"stylelint/**/js-yaml": "^4.3.1",
"@eslint/eslintrc/**/js-yaml": "^4.3.1",
"**/nanoid": "^3.3.18",
"**/fast-uri": "^3.1.3",
"sass/**/immutable": "^5.1.8",
"**/brace-expansion": "^1.1.18"
},
"husky": {
"hooks": {
Expand Down
63 changes: 63 additions & 0 deletions src/common/utils/CssCustomProperties.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import CssCustomProperties from "./CssCustomProperties";

describe("CssCustomProperties in jsdom", () => {
beforeEach(() => {
const style = document.createElement("style");
style.textContent = `
:root { --eccgui-color-palette-blue-500: #1c6ecb; }
.config { --note-yellow: #ffde8f; }
`;
document.head.appendChild(style);
});

it("reads property names of a style rule without iterating the declaration", () => {
expect(
CssCustomProperties.listLocalCssStyleRuleProperties({
selectorText: ":root",
propertyType: "custom",
}),
).toEqual([["--eccgui-color-palette-blue-500", "#1c6ecb"]]);
});

it("does not throw for scoped selectors", () => {
expect(() =>
new CssCustomProperties({ selectorText: ".config", returnObject: false }).customProperties(),
).not.toThrow();
});

describe("useComputedStyleFallback", () => {
beforeEach(() => {
// the property is not part of any stylesheet, so the CSSOM does not know its name
const element = document.createElement("div");
element.classList.add("without-stylesheet");
element.style.setProperty("--only-computed", "#c0ffee");
document.body.appendChild(element);
});

it("is disabled by default", () => {
expect(
new CssCustomProperties({
selectorText: ".without-stylesheet",
}).customProperties(),
).toEqual({});
});

it("reads the names from the computed style if the CSSOM does not provide any", () => {
expect(
new CssCustomProperties({
selectorText: ".without-stylesheet",
useComputedStyleFallback: true,
}).customProperties(),
).toEqual({ "only-computed": "#c0ffee" });
});

it("is not used if the CSSOM provides names", () => {
expect(
new CssCustomProperties({
selectorText: ".config",
useComputedStyleFallback: true,
}).customProperties(),
).toEqual({ "note-yellow": "#ffde8f" });
});
});
});
Loading
Loading