Skip to content

Fix: don't write node color unless changed#38

Open
CoralCorvusCortex wants to merge 1 commit intomainfrom
hydra/issue-37-avoid-writing-unchanged-color
Open

Fix: don't write node color unless changed#38
CoralCorvusCortex wants to merge 1 commit intomainfrom
hydra/issue-37-avoid-writing-unchanged-color

Conversation

@CoralCorvusCortex
Copy link
Collaborator

@CoralCorvusCortex CoralCorvusCortex commented Feb 13, 2026

Fixes #37.

When editing a node, we were always writing color back into node data even if the user only changed the name. That caused the DOT export to include a color=... attribute that the user never explicitly set.

Change:

  • Track whether the node colour was explicitly set on the node, and whether the user changed it in the edit dialog.
  • Only persist color when it was already explicit or the user edited it.

Checks:

  • npm test
  • npm run lint

@cloudflare-workers-and-pages
Copy link

Deploying polycule-graph with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2f659ff
Status:🚫  Build failed.

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: color is applied as a node attribute even if I didn't change it

1 participant