Add defaultStyling.json support for persistent per-type vertex and edge styling#1589
Add defaultStyling.json support for persistent per-type vertex and edge styling#1589jkemmererupgrade wants to merge 6 commits 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
Adds a searchable icon browser popover alongside the existing Upload button in the node style dialog. Users can browse ~1,900 Lucide icons with search filtering, capped at 50 visible results for performance. Icons are lazy-loaded using the existing lucideIconToDataUri helper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add Lucide icon picker to node styling dialog
|
A note on the Lucide Licensing: |
|
@jkemmererupgrade thanks for the submission, and I apologize for the slow response. This looks like a great set of features, and they are ones I've been really wanting for myself as a user. I won't have a chance to dive in to the details until next week at the earliest. Let me know if that works for you. |
Thank you @kmcginnes! Next week is great. Please let me know what else I can do to assist. |
|
@kmcginnes checking in on the review, how's the testing going? anything I can do to help? Thank you! |
|
Hi, @jkemmererupgrade. Sorry for the slow progress on this. Bandwidth for PR reviews has been non-existent the last few weeks. I now have a backlog of PRs to go through once my availability improves. Please hang in there and thanks for checking in. |
- Resolved Changelog.md conflict: kept Unreleased defaultStyling entry above Release 3.0.1 section - Resolved node-server.ts conflict: adopted createApp() refactor from main; moved /defaultStyling and /custom-icons endpoints into app.ts - All 1680 tests pass, TypeScript checks clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… feature/default-styling-1265
- Resolved Changelog.md conflict: kept Unreleased section above new Release 3.0.2 - Resolved docs/references/README.md conflict: kept Default Connection and Default Styling links - Resolved SettingsGeneral.tsx conflict: kept both defaultStylingAtom and diagnosticLoggingAtom imports - Added @vitest-environment happy-dom to PR test files that use browser globals - Added eslint-disable comments for react-hooks/set-state-in-effect in useInitCytoscape.tsx and Tabular.tsx (pre-existing intentional patterns, flagged by react-hooks v7) - All 1709 tests pass, TypeScript checks clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

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.