Repository navigation
Conversation
Layer: 1-style-dialog-drafts
Layer: 1-style-dialog-drafts
Layer: 1-style-dialog-drafts
Layer: 1-style-dialog-drafts
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The node and edge style dialogs wrote every edit to the stored styles as you made it, so each keystroke and each pause in a color drag restyled the graph, and there was no way to back out of a change.
User-facing: Style dialog edits now apply when you click Save, and the preview shows them first. Cancel throws them away. Escape, the close button, or a click outside the dialog asks "Discard Unsaved Changes?" when there are unsaved edits. Clear Customization is now Reset to Default, which fills the dialog with the default style until you save.
The forms use the
components/formparts, with three new ones:field.NumberInput,field.ColorPopover, andfield.Select. Numbers are checked against a Zod schema when you click Save, with the error under the field.Evidence
Before: every edit in the dialog wrote the stored styles right away. One session that changed opacity, border width, and one color wrote them 7 times, and Graph View restyled after each write.
After: the same session writes once, on Save. Cancel writes nothing.
The dialog with unsaved edits, the preview showing them, and Save enabled:
Closing it with unsaved edits:
Verified live: both dialogs in Chromium and Safari against the dev server, with a seeded sample connection:
Merge Danger
Door: two-way. The stored style shape is unchanged, so older builds still read anything this one saves.
Impact: behavior. Edits stop applying until Save. See Upgrade Notes.
Upgrade Notes
Related
🤖 Written by an AI agent on my behalf.