Mohamed Osama
3c839ffd2b
Clean up old usages of `NodeId(generate_uuid())` by replacing it with `NodeId::new()` ( #2009 )
...
Replace all `NodeId(generate_uuid())` with `NodeId::new()`
2024-10-25 19:43:46 -07:00
Keavon Chambers
904cf09c79
Add drag-and-drop and copy-paste file importing/opening throughout the UI ( #2012 )
...
* Add file importing by dragging and dropping throughout the UI
* Disable comment-profiling-changes.yaml
* Fix CI
2024-09-28 00:19:43 -07:00
adamgerhant
20470b566b
Fix many regressions introduced mostly in #1946 ( #1986 )
...
* Fix text tool
* Implement buffering to fix freehand tool
* Fix tools
* Fix clippy lints
* Small fixes
* Move vector modify back to Monitor nodes
* Code review
* Fix abort
* Fix svg import
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-26 15:37:03 -07:00
James Lindsay
06e11b6f46
Fix invalid segment crash when disolving point loop ( #1959 )
...
* Fix invalid segment crash
* Further improve robustness
2024-09-05 11:45:14 -07:00
adamgerhant
19541c9684
Fix broken SVG importing and crash when exporting ( #1953 )
...
* Fix importing SVG and crash when exporting
* Code improvements, prevent entering network after drag
2024-09-03 06:54:51 +00:00
adamgerhant
9adc640f19
Improve layer positioning in graph upon reordering; improve history system; add selection history ( #1945 )
...
* Improve layer positioning
* Collapse space when deleting
* Improve moving layers in layer panel
* Improved transactions
* Selection history
* Code review
* Select previous selection when aborting
* Fix crash and artboard select
* Add mouse forward/back button selection history bindings
Code review
* Menu buttons
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-01 02:34:18 -07:00
Keavon Chambers
6a2b0d74dc
Rename document_node_types.rs to document_node_definitions.rs
2024-08-15 17:48:57 -07:00
adamgerhant
2bd213f1aa
Improve layer panel positioning for upstream nodes ( #1928 )
...
* Improve layer panel positioning for upstream nodes
* highlight parents
* Final improvements
* Fill for selection box, bug fixes
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-14 03:27:42 -07:00
adamgerhant
0dbbabe73e
Add layer node chains, import/export edge connectors, and refactor graph editing to go thru a NodeNetworkInterface ( #1794 )
...
* WIP: NodeNetworkInterface
* Organize ModifyInputsContext to use network interface
* Improve ClickTarget and Position state
* Rework ClickTarget state
* Continue fixing NodeGraphMessageHandler
* Restructure network_metadata
* Final(?) NodeNetworkInterface struct
* Final(??) NodeNetworkInterface
* Final(???) NodeNetworkInterface. Separated persistent and transient data
* Final NodeNetworkInterface data structure. Implemented all basic getters
* Continue migrating functionality to network interface
* Migrate all NodeGraphMessage's to use network interface
* Fix all helper functions in NodeGraphMessageHandler
* Move document metadata to network interface, remove various cached fields
* Move all editor only NodeNetwork implementations to NodeNetworkInterface
* Fix all DocumentNodeDefinitions
* Rework and migrate GraphOperationMessages to network interface
* Continue migration to NodeNetworkInterface
* Save point before merging master
* Fix all errors in network_interface
* 850 -> 160 errors
* Fix all errors :D
* Render default document
* Visualize click targets
* merge conflicts
* Cache transient metadata separately, store entire interface in document history
* Start migration to storing selected nodes for each network
* Remove selected nodes from document message handler
* Move outward wires and all nodes bounding box to transient metadata
* Fix connecting/disconnecting nodes
* Layer stack organization for disconnecting/connecting nodes
* Basic chain locking
* Improve chain positioning
* Add copy/pasting
* Move upstream nodes on shift+drag
* merge conflict fixes
* Improve Graph.svelte code quality
* Final improvements to Graph.svelte
* Fix layer panel
* Performance optimizations
* Bug fixes and derived PTZ
* Chain organization improvement and bug fixes
* Bug fixes, remove all warnings
* Automatic file upgrade
* Final code review
* Fix editor tests
* Fix compile errors
* Remove select tool intersection check when panning
* WIP: Import/Exports
* Fix JS issues
* Finish simplified import/export UI
* Import/Export viewport edge UI
* Remove minimum y bound on import/export ports
* Improve performance while panning graph
* cargo fmt
* Fix CI code build
* Format the demo artwork graph with chains
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: dennis@kobert.dev <dennis@kobert.dev>
2024-08-04 06:47:13 -07:00
Keavon Chambers
44ffb635e9
Improve rendered SVG output syntax for better compatibility and terseness ( #1880 )
...
* Improve rendered SVG output syntax for better compatibility and terseness
* Fix CI failing on boolean operations without wasm32?
* Attempt 2
2024-07-30 08:28:49 -07:00
James Lindsay
fa1535d0bb
Update dependencies and lock files ( #1841 )
...
* Bump lock files
* Fix glam mismatch version
* Add tokio feature
* Update all deps
* Fix gpu-compiler not able to reference the root workspace
* Bump a few more deps
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-22 02:56:29 -07:00
Dennis Kobert
3657b37574
Deprecate LetNodes in favor of new scope API ( #1814 )
...
* WIP
* Start deprecating let nodes
* Replace WasmEditorApi network imports with new Scope input
* Add missing unwrap
* Add #[serde(default)] to scope_injections
* Restructure WasmEditorApi definition to be available as a TaggedValue
* Fix text node
* Use stable toolchain in nix shell again
* Code review
* FIx text node and remove all remaining warnings
* Require executor input to be 'static
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-10 14:18:21 +02:00
James Lindsay
97616e8019
Fix Pen and Freehand tool path extension ( #1809 )
...
Improve path tool extend
2024-07-07 17:23:44 -07:00
James Lindsay
1652c713a6
Add nondestructive vector editing ( #1676 )
...
* Initial vector modify node
* Initial extraction of data from monitor nodes
* Migrate to point id
* Start converting to modify node
* Non destructive spline tool (tout le reste est cassé)
* Fix unconnected modify node
* Fix freehand tool
* Pen tool
* Migrate demo art
* Select points
* Fix the demo artwork
* Fix the X and Y inputs for path tool
* G1 continous toggle
* Delete points
* Fix test
* Insert point
* Improve robustness of handles
* Fix GRS shortcuts on path
* Dragging points
* Fix build
* Preserve opposing handle lengths
* Update demo art and snapping
* Fix polygon tool
* Double click end anchor
* Improve dragging
* Fix text shifting
* Select only connected verts
* Colinear alt
* Cleanup
* Fix imports
* Improve pen tool avoiding handle placement
* Improve disolve
* Remove pivot widget from Transform node properties
* Fix demo art
* Fix bugs
* Re-save demo artwork
* Code review
* Serialize hashmap as tuple vec to enable deserialize_inputs
* Fix migrate
* Add document upgrade function to editor_api.rs
* Finalize document upgrading
* Rename to the Path node
* Remove smoothing from Freehand tool
* Upgrade demo artwork
* Propertly disable raw-rs tests
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Adam <adamgerhant@gmail.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2024-07-05 13:42:40 -07:00
Keavon Chambers
a9a4b5cd19
Move gradient picking into the color picker ( #1778 )
...
* Gradient picker
* Fix up color picker layout CSS problems
* Begin hooking up SpectrumInput for gradient in the ColorPicker
* Working gradient picking on the frontend only
* Plumb FillColorChoice into the backend
* Hook everything else up, just with a weird bug remaining
* Fix some svelty reactivity issues
* Add and remove stops
* Cleanup
* Rename type
* Fill node document format upgrading
* Fix lint
* Polish the color picker UX and fix a bug
---------
Co-authored-by: 0hypercube <0hypercube@gmail.com>
2024-06-09 22:55:13 -07:00
adamgerhant
4c3856833b
Code cleanup and refactor for generalized layers ( #1738 )
...
* Move functions to messages to fix undo bugs for UnGroup and Group
* Copy+Paste for generalized layer nodes
* Fix MoveSelectedLayersTo and GroupSelectedLayers by extracting functions into messages
* Fix tests, replace FrontendMessage:TriggerPaste with PortfolioMessage::PasteIntoFolder
* Formatting
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-05-04 22:11:48 -07:00
Sahil gill
5f4960db9b
Fix crash when Pen tool's in-progress point snaps along an angle with its previous anchor ( #1701 )
...
changes
2024-04-19 16:35:58 +01:00
Keavon Chambers
0a9bd41be1
Code cleanup and refactoring to enhance consistency ( #1695 )
...
- Move message handler payload data into structs
- Organize the file structure used by `editor/src/messages/portfolio/document` `/node_graph` and `/graph_operation`
- Make derive attributes use `serde::Serialize, serde::Deserialize` consistently instead of `use serde::{Deserialize, Serialize};` imports
- Various other code cleanup and refactoring
2024-03-20 21:28:51 -07:00
Elbert Ronnie
42c822020e
Make auto-panning speed uniform ( #1690 )
...
* Make auto-panning speed uniform
* Abstract time-delta calculation to `TimeInfo`
* Update docs and add additional check
* Apply code review changes
2024-03-16 06:36:22 +00:00
Keavon Chambers
5bca931813
Rename handle mirroring to colinear
2024-03-14 07:44:55 -07:00
Elbert Ronnie
ea4f3d8bba
Add auto-panning to all remaining tools ( #1682 )
...
* Add auto-panning to Gradient tool
* Add auto-panning to Path tool
* Add auto-panning to Pen tool
* Add auto-panning to Spline tool
* Add auto-panning to Line tool
* Add auto-panning to Rectangle tool
* Add auto-panning to Ellipse tool
* Add auto-panning to Polygon tool
* Hide `PointerOutsideViewport` in debug messages
* cargo fmt
* Code review cleanup
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-14 06:05:33 +00:00
milan-sedivy
9ac10cdcf8
Comprehensively polish up the input hints across all tools and states ( #1670 )
...
* Add missing keyhints to most tools
* Standardize hints further
* Improve GRS numerical display values
* Additional hints improvements
* Improve Path tool hints; add Ctrl+Shift+A point deselection
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-12 20:20:25 -07:00
milan-sedivy
aa9a3e648a
Fix cancellation of drag actions in all tools where it's missing ( #1664 )
...
* Change message sent from DocumentMessage::Undo to DocumentMessage::AbortTransaction while aborting select tool
* Fix NavigationTool not aborting
* Fix NavigationTool tilt
* Make gradient tool abortable
* Make PathTool drag actions abortable
* Make FreeHand Tool abortable
* Make BrushTool abortable
* Fix filename typo
* Make artboards also abortable
* Rearrange key bindings for consistency
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-09 16:19:56 -08:00
Karthik Prakash
0c60fd95fa
Remove `remain` alphabetical sorting enforcement macros ( #1647 )
...
remove `remain`
Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
2024-03-06 16:43:51 +00:00
Keavon Chambers
70dce1c230
Resolve most Clippy lint issues
2024-02-29 00:48:28 -08:00
zhiyuan
a4a2680ac4
Freehand tool: Allow extension of existing paths ( #1594 )
...
* feat: extend freehand path
* fix: rm logs
* fix: rename variable
2024-02-04 13:36:25 -08:00
zhiyuan
05b4582cd7
Properly handle pen tool undo and redo ( #1587 )
...
feat: properly handle pen tool undo and redo
2024-02-04 19:23:48 +00:00
0HyperCube
002151d9c0
SVG import ( #1579 )
...
* SVG import
* Fix error
* Transforms
* Code review nits
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-01-16 17:42:48 -08:00
Keavon Chambers
d602603d46
Remove unused DocumentIsDirty
2024-01-15 02:51:40 -08:00
0HyperCube
456ca170a4
Layer and grid snapping systems ( #1521 )
...
* Grid overlays
* Rectangle tool basic snapping
* Fix bezier demos
* Fix bézier crate tests
* Constrained snapping for circle & shape tool
* Line tool snapping
* Pen tool snapping
* Path tool snapping
* Snapping whilst dragging layers (not constrained)
* Constrained drag
* Resize snapping
* Normal and tangent
* Cleanup
* Grid snapping
* Grid snapping
* Fix imports
* Fix bug in artboard tool
* Fix hang on 0 size grid spacing
* Fix NaN when scaling
* Polishing
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-01-13 14:32:10 +00:00
Keavon Chambers
78a1bb17cd
Move selected node list from DocumentMetadata to the document ( #1565 )
2024-01-13 04:52:47 -08:00
Keavon Chambers
96b5d7b520
Many subtle improvements to the UI design system ( #1537 )
2023-12-28 04:35:20 -08:00
Keavon Chambers
34f952bad1
Convert u64 IDs to newtypes ( #1532 )
2023-12-22 03:24:13 -08:00
Keavon Chambers
7bfe0ce55b
Retire layer paths used throughout the code ( #1531 )
...
* Part 1
* Part 2
* Part 3
* Part 4
* Part 5
* Part 6
* Part 7
* Part 8
2023-12-21 19:32:46 -08:00
Keavon Chambers
92203f3576
Remove the whole document-legacy crate ( #1524 )
...
Remove the whole document-legacy crate
Closes #1520
2023-12-20 05:45:54 -08:00
Keavon Chambers
9a7d7de8fa
Remove most of document-legacy ( #1519 )
...
* Remove boolean ops and unused doc-legacy Operations
* Remove Shape legacy layers
* Remove legacy layer Properties panel code
* Remove additional unused doc-legacy Operations
* Removed unused rendering-related legacy-layer code
* Upgrade dep so CI builds
* Remove various additional unused functions and messages
* Remove the LayerData trait
* Remove RenderData struct and usages
* Banish the Operations system
* Further removals
2023-12-19 04:36:19 -08:00
0HyperCube
c42d030f18
New overlay system ( #1516 )
...
* Port gradient tool overlays
* Fix tests
* Text tool
* Artboard tool and some of select tool
* Port select tool drawing box
* Pen and path tool
* Remove overlays document
* Show the overlay refactor as done on the website roadmap
* Select tool bounds in layer space (first layer)
* Code review and fixes
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-12-18 11:17:43 +00:00
0HyperCube
f8b9c5db6d
Improve text transforms ( #1487 )
2023-12-04 14:57:44 -08:00
0HyperCube
8a1cf3ad5d
Migrate demo artwork and fix all failing CI tests ( #1459 )
...
* Initial work on fixing tests
* Fix formatting
* Remove dead code to satisfy rustc warnings
* Insert into an artboard
* Load updated artwork in editor
* Remove popup when importing image
* Fix up demo art
* Change transform app[lication method
* Reduce number of enums called BlendMode
* Finalize the demo artwork upgrade
* Code review pass
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-11-19 23:06:21 -08:00
Keavon Chambers
e3f5e7001f
Redesign ColorInput widget and rename it to ColorButton
2023-11-16 18:38:39 -08:00
0HyperCube
5827e989dc
Migrate the Select tool to the document graph ( #1433 )
...
* function for accessing document metadata
* Better select tool
* Fix render
* Fix transforms
* Fix loading saved documents
* Populate graph UI when loading autosave
* Multiple transform nodes
* Fix deep select
* Graph tooltips
* Fix flip axis icon
* Show disabled widgets
* Stop select tool from selecting artboards
* Disable (not hide) the pivot widget; remove Deep/Shallow select for now
* Code review changes
* Fix pivot position with select tool
* Fix incorrectly selected layers when shift clicking
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-10-17 11:09:32 -07:00
0hypercube
9a39c4a0cc
Fix gradient tool
2023-10-17 11:02:06 -07:00
0hypercube
6173662a40
Fix freehand and spline tool
2023-10-17 11:02:06 -07:00
hypercube
0d6bec837b
Fix path tool
2023-10-17 11:02:06 -07:00
0hypercube
4cd72edb64
Initial work migrating vector layers to document graph
...
* Fix pen tool (except overlays)
* Thumbnail of only the layer and not the composite
* Fix occasional transform breakages
* Constrain size of thumbnail
* Insert new layers at the top
* Broken layer tree
* Fix crash when drawing
* Reduce calls to send graph
* Reduce calls to updating properties
* Store cached transforms upon the document
* Fix missing node UI updates
* Fix fill tool and clean up imports and indentation
* Error on overide existing layer
* Fix pen tool (partially)
* Fix some lints
2023-10-17 11:02:06 -07:00
Omar Magdy
fd338c945f
Fix crash from overflowing values given to NumberInput widgets ( #1377 )
...
* Added hints for brush tool size
* Added hints for brush tool size
* Solved the user being able to crash the editor by overflowing NumberInputs
2023-08-11 12:26:37 -07:00
Dhruv
1c11ebcc4e
Correct snapping offsets after canvas transformation when using snap-reliant tools ( #1370 )
...
* fix: pen, spline tool incorrect snap offsets
- re-render snapping offsets if canvas transformed during line draw
* [wip]feat: add CanvasTransformed global message
* [wip]fix: synchronize line tool snap offsets
* fix: update offsets for shape tools on canvas transform
* chore: remove unneeded function parameter
* [wip]fix: use line tool at canvas level
* refactor: revert line tool changes
2023-08-11 12:26:19 -07:00
Keavon Chambers
3450d638a6
Layer-based nodes redesign, just the basics so far ( #1362 )
...
* Redesign the nodes
* Basic vertical stacking syntax sugar
* Fix node connections
* Primary output and line thickness
---------
Co-authored-by: 0hypercube <0hypercube@gmail.com>
2023-08-04 14:56:00 -07:00
Keavon Chambers
b9e49623a3
Rename PropertyHolder to LayoutHolder
2023-08-01 00:46:30 -07:00
Keavon Chambers
8e87e42f3e
Remove widgets built by methods on WidgetHolder
2023-07-31 23:36:12 -07:00