Add defaultStyling.json support for persistent per-type vertex and edge styling#1589
Open
jkemmererupgrade wants to merge 1 commit intoaws:mainfrom
Open
Add defaultStyling.json support for persistent per-type vertex and edge styling#1589jkemmererupgrade wants to merge 1 commit intoaws:mainfrom
jkemmererupgrade wants to merge 1 commit intoaws:mainfrom
Conversation
…ge styling Adds an optional defaultStyling.json file that can be mounted into the Docker container to provide per-type vertex and edge styling defaults. This addresses the need for persistent styling in environments where browser storage is cleared between sessions (e.g., AWS WorkSpaces Web). On startup, file values are merged into the user's per-type styling preferences (IndexedDB). Default values fill in properties the user hasn't explicitly set; existing user overrides are preserved. The file also serves as a reference for per-type "Reset to Default" in the Node/Edge Style dialogs. The Settings page adds Export/Import/Reset All styling controls: - Export: saves current styling as defaultStyling.json for sharing or Docker-mounting as team defaults - Import: merges a defaultStyling.json into user styling and updates the reset reference so reset-after-import restores imported values - Reset All: reverts all styling to defaults (from file or hardcoded) Supports lucide icon names (resolved to SVG data URIs at runtime via dynamic imports), custom icon URLs, colors, shapes, border styles, edge line styles, and arrow styles. Includes Zod validation with strict type checking for shapes and arrow styles. Includes 58 new tests with 100% line coverage on new modules, example file, and documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44da021 to
89910a2
Compare
Author
|
I also have a follow-on PR that will add a picker to the vertex/edge to filter and select one of the lucide icons. |
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.
Description
Add support for a defaultStyling.json file that provides persistent per-type vertex and edge styling defaults. When mounted into the Docker container, the file's values are merged into the user styling
store on startup, giving teams a consistent visual baseline across non-persistent browser sessions (e.g., AWS WorkSpaces Web).
Key capabilities:
Validation
Related Issues
Addresses #1265, #112, #173, #573, #689
Check List
pnpm checksto ensure code compiles and meets standards.pnpm testto check if all tests are passing.Changelog.md.