fix(stammbaum): raise dimmed opacity to 0.45 and bind tests to the constant (#703)
Bump DIMMED_OPACITY 0.4 -> 0.45 so dimmed outlines/labels stay legible against bg-surface in both themes (dark mode dims already-light mint, the riskier case). Import the constant into StammbaumTree.svelte.test.ts so the node-opacity assertions track it instead of a hard-coded '0.4'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, it, expect, vi } from 'vitest';
|
||||
import { render } from 'vitest-browser-svelte';
|
||||
import StammbaumTree from './StammbaumTree.svelte';
|
||||
import type { PanZoomState } from './panZoom';
|
||||
import { DIMMED_OPACITY } from './layout/highlightLineage';
|
||||
|
||||
const ID_A = '00000000-0000-0000-0000-000000000001';
|
||||
const ID_B = '00000000-0000-0000-0000-000000000002';
|
||||
@@ -962,7 +963,7 @@ describe('StammbaumTree lineage highlight (#703)', () => {
|
||||
if (!fill) throw new Error(`No card-fill rect rendered for ${displayName}`);
|
||||
return fill.getAttribute('opacity') === null && fill.getAttribute('fill-opacity') === null;
|
||||
}
|
||||
const DIM = '0.4';
|
||||
const DIM = String(DIMMED_OPACITY);
|
||||
|
||||
it('renders every node at full strength when nothing is selected (AC1)', () => {
|
||||
render(StammbaumTree, {
|
||||
|
||||
Reference in New Issue
Block a user