Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit 8966a6d

Browse files
merge: #3472
3472: ENG-2417 Visualizer supports dark mode r=jobelenus a=jobelenus Flip-flopping the label color based on light or dark mode ![tom hardy bane GIF](https://github.com/systeminit/si/assets/69541/55a081d0-8d21-426c-bf0d-4acc6bca8a6d) Co-authored-by: John Obelenus <jobelenus@systeminit.com>
2 parents 47b55f5 + 2d67cf5 commit 8966a6d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/web/src/components/Workspace/WorkspaceVizSchemaVariant.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ import {
5252
reactive,
5353
ComputedRef,
5454
} from "vue";
55-
import { VormInput, Stack, Inline, VButton } from "@si/vue-lib/design-system";
55+
import {
56+
VormInput,
57+
Stack,
58+
Inline,
59+
VButton,
60+
useTheme,
61+
} from "@si/vue-lib/design-system";
5662
import { DirectedGraph } from "graphology";
5763
import Sigma from "sigma";
5864
import { NodeDisplayData, EdgeDisplayData, Coordinates } from "sigma/types";
@@ -64,6 +70,7 @@ import { useVizStore } from "@/store/viz.store";
6470
6571
const vizStore = useVizStore();
6672
const componentStore = useComponentsStore();
73+
const { theme } = useTheme();
6774
6875
const schemaVariant = ref();
6976
const schemaVariantOptions = computed(() => {
@@ -238,6 +245,7 @@ onMounted(async () => {
238245
const container = document.getElementById("vizDiv") as HTMLElement;
239246
renderer = new Sigma(graph, container, {
240247
allowInvalidContainer: true,
248+
labelColor: { color: theme.value === "dark" ? "#fff" : "#000" },
241249
});
242250
243251
const sensibleSettings = forceAtlas2.inferSettings(graph);

0 commit comments

Comments
 (0)