Commit graph

1445 commits

Author SHA1 Message Date
Keavon Chambers
d0c493cdb6 Fix and refactor website meta tags for better SEO and social media previews 2024-05-10 04:17:44 -07:00
0HyperCube
0c50d91516 Blog post: Graphite progress report (Q1 2024) (#1700)
* Draft for quarterly update blog post

* Complete post

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-05-09 15:33:19 -07:00
adamgerhant
cce1bc644e
Fix artboards not being included in Export menu's bounds list (#1748)
Show artboards when exporting
2024-05-09 05:08:02 +00:00
Keavon Chambers
6b0822d318 Add Isometric Fountain demo artwork 2024-05-08 19:00:31 -07:00
Keavon Chambers
de84e39c4e Improve backwards compatability robustness of serde-based document format 2024-05-08 17:45:31 -07:00
adamgerhant
bc33eabc3c
Add grid color customization and choice to display as dots (#1743)
* dot grid

* fix warning: unreachable pattern

* grid color select

* add color for all grid types

* Dot grid checkbox and remove prefixed Color functions

* Display dot grid as grid aligned pixels

* Dashed line comment

* Code review and UI design widget placement updates

* Isometric dotted grid

* Early return when cos = 0

* Add spacing, x offset, and color to dot grids

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-05-08 21:36:15 +00:00
Dennis Kobert
1bfbe306be
Fix image loading and remove resolve_empty_stacks() function (#1746)
* Fix Image loading and remove `resolve_empty_stacks()`

* Revert noise pattern change

* Add todo comment
2024-05-08 01:31:41 -07:00
Keavon Chambers
244c8ad10a Enable Merge nodes to take vector data inputs from the bottom, not just left
Known bug: click targets aren't calculated for bottom input vector data.
2024-05-07 16:41:44 -07:00
Dennis Kobert
ce96ae66f2
Loosen the Graphene type system to allow contravariant function arguments (#1740)
* Accept any input for nodes that expect () as input

* Add comments

* More comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-05-07 16:36:25 -07:00
Keavon Chambers
07fd2c2782 Add visibility and delete buttons to node sections in the Properties panel 2024-05-07 02:53:30 -07:00
Keavon Chambers
1ce3d59e0f Fix breakage of About Graphite dialog from editor instances refactor 2024-05-07 01:06:14 -07:00
Keavon Chambers
7845302c50 Store overlays, snapping, and grid state in saved documents and toggle them with hotkeys 2024-05-06 22:08:53 -07:00
adamgerhant
14262e1527
Fix duplicate selection when holding Alt and dragging with Select tool (#1739)
Fix duplicate selection when holding alt and dragging with select tool
2024-05-06 18:33:58 -07:00
Keavon Chambers
1fca813797
Add initial Graphene docs to the contributor guide (#1686)
* Graphene documentation

* Polishing edits
2024-05-06 18:21:15 -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
adamgerhant
8d83fa7079
Generalize layers as merge nodes to enable adjustment layers (#1712)
* WIP, backward traversal issues

* Fix some tool issues

* Remove debugging

* Change some indices

* WIP: new artboard node

* WIP: add artboard node

* WIP: Artboard node and create_artboard

* WIP: Artboard node implementation complete

* WIP: Artboards input for output node

* Complete Artboard node

* Generalize LayerNodeIdentifier,  monitor_nodes support for Artboard node, adjust ResizeArtboard/ClearArtboards, move alias validation to Rust

* Fix misaligned artboard click targets

* Generalize/clarify create_layer and insert_between

* non-negative dimensions for resize_artboard

* Show artboards in layer panel

* Generalize create_layer for layer output node

* Generalize delete_layer/delete_artboard to NodeGraphMessage::DeleteNodes. Fixed upstream flow Iter

* remove old primary_input function

* Vertical node visuals, remove is_layer function, rename Layer node to Merge node, toggle display as layer

exposed_value_count type fix

Vertical node visuals, remove is_layer function, rename Layer node to Merge node, toggle display as layer

* Fix demo artwork

* Layer display context menu

* Automatically select artboard, fix warnings

* Improvements to context menu and layer invariant enforcement

* Remove display_as_layer and update load_structure

* Improve load_structure to show more layers, improve FlowIter, improve layer naming, layer rearrangement validation.

* Clean up demo artwork using generalized layers

* Improve design of Layers panel and graph nodes

* MoveSelectedLayersTo rewrite to support generalized layer nodes

* Include artboards in deepest_common_ancestor, fix resize_artboard/delete_artboard, sync artboard tool to layer panel

* MoveSelectedLayersTo adjustments

* Sync non layer node visibility with metadata

* Include non layer nodes when moving/creating layer

* Fix group layers and get_post_node_with_index

* Include non layer nodes in UngroupSelectedLayers

* GroupSelected for all selected nodes, UnGroupSelected position adjustments

* Add grouping for layers in different folders

* Fix hidden layers

* Prevent node from connecting to itself, fix undo automatic node insertion,

* Fix undo CreateEmptyFolder, fix grouping nested layer nodes

* Formatting

* Remove test and check if node is layer from network

* Fix undo group layers

* Check off roadmap

* MoveUpstreamSiblingsToChild adjustments

* Replace tabs with spaces, remove mut from argument

* Final code review pass

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-04-30 23:03:42 -07:00
Elbert Ronnie
beb88d280c
Bezier-rs: Add calculations for area and centroid of subpaths (#1729)
* add code to calculate area and centroid of subpath

* change library to poly_it

* add a demo of area and centroid

* modify algorithm to consider negetive area as positive

* add code for manipulating polynomials in bezier-rs

* remove `poly_it` dependency and use custom Polynomial

* formatting floats to skip last zero

* add debug mechanism

* collect both intersection points instead of one

* fix test and cargo fmt

* apply minimum separation filtering in self_intersection and use better endpoint filtering algorithm

* remove debug mechanism and cargo fmt

* consider the subpath as closed for intersection calculation

* add documentation for polynomial.rs

* impl display for Polynomial

* make area always positive

* add missing docs

* fix test and cargo fmt

* Naming/formatting code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-04-29 19:19:12 -07:00
zhiyuan
e769f50877
DropdownInput preview support and ColorButton history improvements (#1598)
* DropdownInput support preview

* fix typo and rm logs

* Add previewable flag

* fix cr typos

* Improve color button history

* rename

* update dropdown preview behaviour

* Color picker preset color

* Another way to handle blend mode preview

* Apply suggestions from code review

* Use on_commit instead of on_update for some dropdowns

* Debugging progress

* add debug

* active not equal to highlight in some cases

* rm logs

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-04-29 17:03:58 -07:00
Tiger3018
282969df3d
Fix shallow/deep selection (#1725)
* fix: remove folder #1595 when clicked, except for shallow select.

This should also fix other tools, like Fill tool which hook Lmb hints.

* TODO: shallow select is not working when interval clicks.
* TODO: shallow hover is showed same as deep hover.

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-04-29 16:04:27 -07:00
Keavon Chambers
19eb6ce0ab Remove editor instances concept and clean up JS interop code 2024-04-29 04:17:09 -07:00
Keavon Chambers
597c96a7db Polish and fix small bugs with tilt and zoom navigation 2024-04-28 02:13:18 -07:00
Keavon Chambers
6a1a145d19 Update roadmap with new features and icons 2024-04-27 01:36:46 -07:00
Keavon Chambers
72ba4ddfe4 Add rotation to Repeat node 2024-04-26 15:06:36 -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
Haikal
1ccd8ae4ec
Insert duplicated layers directly above their selected source layers (#1726)
Make insert index of duplicated layer on top of layer that's being duplicated
2024-04-17 22:01:21 -07:00
Shyam Jayakannan
e55578a016
Fix interactive outlining of layers within the Select tool's box selection (#1727)
* changes made to correct outlining behavior

* Comment fixups

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-04-18 04:48:29 +00:00
Shyam Jayakannan
67ba5bcecf
Added fine-grained choices to Snapping options popover (#1730)
* Added Customised Snapping

* Fix snapping choice to Anchors; clean up popover menu code

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-04-18 04:24:15 +00:00
Karthik Prakash
3019cc7253
Add alpha to Extract Channel node and remove Extract Alpha node (#1731)
* add `TaggedValue::RedGreenBlueAlpha`

* add alpha to `ExtractChannelNode`

* remove `ExtractAlphaNode` from `Split Channels`

* remove `ExtractAlphaNode`
2024-04-17 15:44:14 -07:00
Karthik Prakash
438c45eb80
Add corner rounding to the Rectangle node (#1648)
* add skeleton implementation

* add corner rounding

* fix crash when `border_radius` is zero

* rename `Border Radius` to `Corner Radius`

* add clamped property

* add `TaggedValue::F64Array4`

* add frontend support for individual corner rounding

* added individual corner rounding

* fix rebase

* change default values when switching rounding type

* fix crash caused by negative scale

* remove `Any` trait

* add `Message::Batched`

* fix stale property bug

* add smarter clamping for individual rounding

* Rearrange widgets in properties panel

* update individual clamping algorithm

* add better variable names

* make variable names clearer

* Final code cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-04-06 05:09:55 +00:00
abundance-io
d09e7eaf86
Update contributor guide installation instructions for Fedora-based Linux OSs (#1718)
* added fedora based distribution instructions changed outdated npm optional install command

* removed vite temporary timestamp file

* Apply suggestions from code review

Nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-04-03 23:34:57 +00:00
Haikal
bf81a31ff9 Add layer locking feature (#1702)
* Add locking layer feature

* Update locked state data to adjust the refactor

* Make the locked layer cannot be selected using pointer and select all key

* Make locked layer cannot be moved and disable bounding box

* Add locked status selected node on CopyBuffer

* Make locked layer cannot be selected when selected all layers, and disabled GRS and nudging operation on locked layer

* Add refresh document metadata before update button on visible and locked

* Updated from master

* Fix icon logic on panel locked layer

* Make the child locked when the parent is locked, and the child cannot be unlocked if the parent is locked

* Revert "Make the child locked when the parent is locked, and the child cannot be unlocked if the parent is locked"

This reverts commit 7c93259bc2.

* Revert "Fix icon logic on panel locked layer"

This reverts commit 33939f2e84.

* Delete Make Lock button in the node graph top bar

* Add ToggleSelectedLocked to action_with_node_graph_open

* Fix parent and child locking behavior icon on panel

* Fix boolean operator on icon button locking layer

* Make bolean logic more readable in icon button locking layer

* Fix locking layer can be moved or resizing when selected with unlocking layer, disabled pivot widget on locking layer, disable all action on pivot point, alignment, flipping, and boolean operation for locking layer

* Fix axis align drag crash

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
2024-04-03 16:08:26 -07:00
Keavon Chambers
0f43a254af Update cargo dependencies to fix security advisories 2024-04-03 16:08:13 -07:00
Keavon Chambers
938a688fa0 Polish up the Layers panel design 2024-04-01 02:09:01 -07:00
Haikal
5bab38e173
Exclude hidden layers from Ctrl+A selection; prevent G/R/S/nudging hidden layers (#1697)
* Exclude hidden layer to be selected on Select All Layer

* Add hide layer action to history

* Fix error call the function

* Add hide layer action to history state

* Make hidden layer cannot be transform like G/R/S and nudges

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-31 07:48:17 +00:00
Muhammad Aqdas
e22db31738
Fix "contrain" typo (#1717)
Fix typo 'contrain' to true 'constrain

Fix typo 'contrain' to true 'constrain'
2024-03-31 06:15:57 +00:00
Keavon Chambers
291c580924 Fix number input dragging bug and hide floating point imprecision 2024-03-30 19:06:45 -07:00
Keavon Chambers
46a9fc031a Website home page and roadmap clarifications 2024-03-27 05:25:39 -07:00
Keavon Chambers
27f9e3f00e
Move node visibility flag from NodeNetwork to DocumentNode (#1708)
* protonode -> proto node

* Move node visibility flag from NodeNetwork to DocumentNode

* Add serde default for new field

* Logic improvements
2024-03-27 05:17:08 -07:00
Haikal
d3e3e19822
Fix hidden state missing from copy/paste, causing hidden layers to reappear when pasted or grouped (#1698)
Add data state visiblity of node when copy-paste
2024-03-25 13:27:30 -07:00
Elbert Ronnie
e9510c5fee
Fix Select tool's scale nudging with multi-layer selection (#1699)
* Fix scale nudging for multiple selection

* Use message discriminant for filtering where possible

* Remove unnecessary parameter from `selected_bounds_document_space`

* Fix the error `target.closest is not a function`

* Minor cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-25 13:20:30 -07: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
Nicolás Mayora
ed3f7acdd7
Fix the Path tool's point dragging getting offset when viewport is panned (#1693)
fix: moving a point with the path tool after panning

Co-authored-by: Nico Mayora <mayoranicolas0104@gmail.com>
2024-03-17 23:30:53 -07:00
Mohamed Osama
058aa7121c
Fix ungrouping bugs to preserve layer ordering and prevent incorrect layer deletion (#1672)
* Ungroup layer external consistency and fix bug

* no message

* no message

* no message

* no message

* fix-bug

* Code review: make code more idiomatic

* Fix layres reversed when ungroup with index != -1

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-16 11:44:30 -07:00
Keavon Chambers
d8255ebb72 Block page render when loading web fonts 2024-03-16 02:52:52 -07:00
Karthik Prakash
8bc389a3b4
Fix artboard deletion (#1651)
* Fix `Document > Clear Artboards`

* Fix `Artboard Tool > Delete`

* fix graph disconnection when deleting artboard

* fix empty artboard deletion

* Code readability improvements

* fix `Clear Artboards`

* add comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-16 01:56:39 -07:00
Keavon Chambers
1a2a0e8757 Minor code cleanup and spelling fix 2024-03-16 00:30:29 -07:00
Mohamed Osama
6630e2b964
Place new folders in the correct stack order relative to other selected layers (#1678)
* New folder placed directly above the topmost selected layer in the hierarchy (at the level of the least nested layer)

* fix bug

* Replace `.collect().contains()` with `.any()` and `if` statement with `.then_some()`

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-03-16 07:26:46 +00: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
shipp02
56f8ecacc9
Refresh graph view overlay if it's open when switching documents (#1691)
* Update Graph View Overlay if it is open when switching documents

* Resolve comments
2024-03-15 19:52:20 -07:00
Keavon Chambers
5bca931813 Rename handle mirroring to colinear 2024-03-14 07:44:55 -07:00