Commit graph

61 commits

Author SHA1 Message Date
Keavon Chambers
354a68911e
Improve hotkeys with canonical flag, more industry-standard mappings, and fix GRS menu bar labels (#2827)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-07-04 04:58:52 -07:00
Keavon Chambers
dc0ae74cab Fix double-click event firing when dragging number input fields in Chromium 2025-06-22 03:11:57 -07:00
Firestar99
6b69a75391 Bulk rename gcore -> gstd in editor (#2729)
* remove `gcore` dependency from `editor`

* editor: bulk rename `gcore` -> `gstd`, cargo fmt
2025-06-19 20:28:17 -07:00
Keavon Chambers
899ed5ad85 Tidy up the Layers panel with a new bottom bar 2025-05-21 04:14:01 -07:00
Keavon Chambers
471ef87801 Add reference point input to the Mirror node 2025-04-24 05:33:20 -07:00
James Lindsay
43275b7a1e
Add the Spreadsheet panel to inspect node output data (#2442)
* Inspect node ouput stub

* Fix compile error in tests

* Create a table

* Clickable tables

* Add vector data support

* Checkbox to enable the panel

* Remove Instances table ID column; style the spreadsheet

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-18 23:06:05 -07:00
Keavon Chambers
6292dea103
Refactor many usages of Color to natively store linear not gamma (#2457) 2025-03-18 05:37:20 -07:00
Dennis Kobert
beb1c6ae64
Upgrade to the Rust 2024 edition (#2367)
* Update to rust 2024 edition

* Fixes

* Clean up imports

* Cargo fmt again

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-12 17:29:12 -07:00
Keavon Chambers
ec8c8d6485
Polish and add aborting to several input widgets: no Esc closing parent menus; color picker axis align; repeat on arrow buttons (#2276)
* Remove color input outline; reduce antialiasing compositing artifacts in color widgets

* Rename ColorButton to ColorInput

* Add features and aborting to several other widgets

- Prevent Esc from closing parent floating menus when aborting
- Fix missing icon regression
- Gutter resizing abort
- Color picker aborts, Shift axis alignment, improve click/drag behavior for gradient spectrum
- Scrollbar abort, repeat when held, fix directional arrows when viewport is zoomed
- Number input abort, repeat when held

* Move ColorInput into the inputs folder

* Fix tiny logo
2025-02-10 05:46:41 -08:00
Keavon Chambers
0037f5158c Add new icons to all menu bar entries 2025-02-07 19:08:06 -08:00
Keavon Chambers
9eb544df74 Rename "options/top bar" terminology to "control bar" and update comments 2025-01-07 17:33:45 -08:00
Keavon Chambers
de366f9514 Add Brush tool warning; move font list loading to document creation time 2024-11-09 12:27:09 -08:00
James Lindsay
5aa6716910
Add a node insertion button and layer renaming from the Properties panel (#2072)
* Add node button

* Improve css a bit

* Add layer renaming to the Properties panel and move New Layer to that, plus add unpinning to properties sections

* Add tooltip

* Re-add layer itself in listing

* Final code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-25 23:58:34 -07:00
Dennis Kobert
212f08c6c8
Restore functionality of GPU infrastructure (#1797)
* Update gpu nodes to compile again

Restructure `gpu-executor` and `wgpu-executor`

And libssl to nix shell

Fix graphene-cli and add half percision color format

Fix texture scaling

Remove vulkan executor

Fix compile errors

Improve execution request deduplication

* Fix warnings

* Fix graph compile issues

* Code review

* Remove test file

* Fix lint

* Wip make node futures send

* Make futures Send on non wasm targets

* Fix warnings

* Fix nested use of block_on

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-15 13:14:48 +00:00
Raminder Singh
62f73df048
Fix a lot of Clippy warnings (#1808)
* fix a lot of clippy warnings

* fix more clippy warnings

* fix yet more clippy warnings

* bump msrv to 1.70.0 to silence warnings

* fix a lot of clippy warnings

* fix more clippy warnings

* fix yet more clippy warnings

* fix a few more warnings

* fix a clippy warning

* remove a commented out line

* silense too many arguments error

* fix more clippy warnings

* prefix underscore to unused vars/functions to fix warnings

* use filter instead of map

* move raw-rs-tests feature flat to module level to fix unused imports warnings

* fix a couple of unused result warnings

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-09 05:02:52 -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
6d74abb4de
Node network subgraph editing (#1750)
* Breadcrumb visualization, nested network consistency, create definitions for Merge internal nodes

* Add index to network inputs, remove imports usage from flatten network

* Replace NodeOutput with NodeInput::Node

* Fully remove imports field, remove unnecessary identity nodes, move Output node to encapsulating network

* Replace previous_outputs with root_node, fix adding artboard/layer to empty network

* Import/Export UI nodes

* Display input/output types dynamically from compiled network

* Add LayerNodeIdentifer::ROOT_PARENT

* Prevent .to_node() on ROOT_PARENT

* Separate NodeGraphMessage and GraphOperationMessage

* General bug fixes with nested networks

* Change layer color, various bug fixes and improvements

* Fix disconnect and set node input for proto nodes and UI export node

* Dashed line to export for previewed node

* Fix deleting proto nodes and nodes that feed into export

* Allow modifications to nodes outside of nested network

* Get network from Node Id parameter

* Change root_node to previous_root_node

* Get TaggedValue from proto node implementation type when disconnecting

* Improve preview functionality and state

* Artboard position and delete children fix

* Name inputs/outputs based on DocumentNodeDefinition or type, fix new artboard/layer insertion

* replace "Link" with "Wire", adjust previewing

* Various bug fixes and improvements

* Modify Sample and Poisson-Disk points, fix incorrect input index and deleting currently viewed node

* Open demo artwork

* Fix opening already upgraded documents and refactor FrontendGraphDataType usages

* Fix deleting within network and other bugs

* Get default node input from compiled network when copying, fix previews, tests, demo artwork

* Code cleanup

* Hide EditorApi and add a comment describing unresolved Import node input types

* Code review

* Replace placeholder ROOT_PARENT NodeId with std::u64::MAX

* Breadcrumb padding

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-06-02 08:01:56 +00: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
7845302c50 Store overlays, snapping, and grid state in saved documents and toggle them with hotkeys 2024-05-06 22:08:53 -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
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
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
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
Keavon Chambers
4405e01f55 Fix displayed ordering of keyboard shortcuts 2024-02-28 21:51:49 -08:00
zhiyuan
9530e55ace
Split widget callbacks into update and commit so only the latter adds a history state (#1584)
* feat: split commit and update layout

* feat: add on_commit callback

* Code review

* fix: refactor

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-05 01:32:15 -08:00
Keavon Chambers
d602603d46 Remove unused DocumentIsDirty 2024-01-15 02:51:40 -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
dcd38f2e4c Remove all references to legacy layers (#1523)
* Remove visible field from LegacyLayer

* Remove LegacyLayer wrapper around LegacyLayerType

* Remove FolderLegacyLayer and LayerLegacyLayer wrappers around their data

* Remove legacy layers
2023-12-19 20:50:45 -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
29222700f4
Fix the blend mode and opacity widgets of the Layers panel (#1506)
* Fix blend mode and opacity

* Cleanup and bug fixes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-12-12 09:27:23 +00:00
Keavon Chambers
719c96ecd8
Rename and reorganize several widgets (#1462)
* Rename SwatchPairInput -> WorkingColorsButton

* Remove unnecessary Svelte each-loop keys

* Rename (and migrate) MenuBarInput -> MenuListButton

* Rename PivotAssist -> PivotInput

* Rename PersistentScrollbar -> ScrollbarInput and CanvasRuler -> RulerInput

* Rename DIalogModal -> Dialog

* Rename WidgetRow -> WidgetSpan
2023-11-18 04:34:30 -08:00
Keavon Chambers
e3f5e7001f Redesign ColorInput widget and rename it to ColorButton 2023-11-16 18:38:39 -08:00
Yuri Astrakhan
3d4e3a74e5
A few minor lints and docs (#1436)
* A few minor lints and docs

* Added required packages to compile on Debian-style linux
* Inlined some format args, and removed some `&` in args (they cause about 6% slowdown that compiler cannot inline)
* a few spelling mistakes

* fix fmt
2023-10-18 23:33:10 -07:00
Keavon Chambers
88bdf9580f Make RadioInput accept optional selected_index 2023-09-11 15:40:05 -07:00
Keavon Chambers
a112ab27cf
Dialog redesign and content revamp (#1409)
* Revamp the content and design of dialogs

* Add the Licenses dialog
2023-09-01 01:58:20 -07:00
Keavon Chambers
0dcfafbf64 Add demo artwork 2023-08-22 03:26:59 -07:00
Keavon Chambers
185106132d Move node graph from panel to overlay on viewport 2023-08-19 01:21:37 -07:00
nat-rix
dc4b16aead
Curves image adjustment node (#1214)
* Create ValueMapperNode and use it for brightness/contrast

* move spline code into seperate module

* Add GenerateCurvesNode

* add a `LuminanceMut`-trait
* add `lerp` to `Channel`

* Add frontend code to handle the curves widget's inputs

* Rename spline module to curve

* Make messages in CurveInput pass

* Improve curves widget design and fix sizing issue

* Implement proper bezier handling

* Use bezier_rs's intersections function instead of own cubic root solver

* Debounce CurveInput events and change how debouncer works

the first event issued to the debouncer was unneccessarily delayed.
Instead now the debouncer fires it instantaneously but blocks events
that come in until a timeout was reached.

* Make curve editing more user friendly

* Change code to use project terminology

* sample -> manipulator group or manipulator
* marker -> handle

* Fix small documentation mistake in bezier-rs

* Add find_tvalues_for_x function to bezier-rs

also integrate the function into curves node

* Add tests for find_tvalues_for_x in bezier-rs

* Fix formatting

* Revert BrightnessContrastNode changes

* Frontend cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2023-08-13 01:07:11 -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
Keavon Chambers
b9e49623a3 Rename PropertyHolder to LayoutHolder 2023-08-01 00:46:30 -07:00
Dhruv
743803ce04 Add Snapping Options to the Snap Dropdown Menu (#1321)
* [wip]feat: add snapping options

* [wip]fix: use svelte component for optionsWidget

* fix: use apt PopoverButton types

* refactor: minor formatting improvements

* Fix popover layout

* [wip]feat: attempt implementing CheckboxInputData struct

* fix: use correct Checkbox struct 's default method

* fix: revert adding CheckboxInputData struct

- This reverts commit 2a481887fc.

* feat: use checkboxes for snapping options

* feat: add label to dropdown checkbox elements

* fix: separate Snap dropdown menu elements
- move each element into separate row

* [wip]feat: modularize snapping states
- maintain individual snapping states for document

* fix: snapping checkboxes' behavior
- checkboxes now update internal snapping state

* refactor: update snap states individually
- this prevents out-of-sync states
- enables reusing existing snap state object

* feat: snap to boxes and nodes conditionally

* [wip]feat: attempt to invert checkbox on update
- attempt implementing mutable WidgetCallback struct
- attempt using above struct to invert checkbox state on update

* Fix widget diffing

* refactor: remove unused code

* feat: align checkboxes consistently with labels

* feat: use separators to stylize snapping menu
- removes need for custom CSS and label property
- ensures consistency across the application

* refactor: remove unneeded css

---------

Co-authored-by: hypercube <0hypercube@gmail.com>, TrueDoctor <dennis@kobert.dev>
2023-07-15 15:07:18 +05:30
Keavon Chambers
3f17207a32 Replace responses.push() with responses.add() everywhere (#1186) 2023-04-27 17:25:19 -07:00
0HyperCube
ef93f8442a Migrate text layers to nodes (#1155)
* Initial work towards text to node

* Add the text generate node

* Implement live edit

* Fix merge error

* Cleanup text tool

* Implement text

* Fix transforms

* Fix broken image frame

* Double click to edit text

* Fix rendering text on load

* Moving whilst editing

* Better text properties

* Prevent changing vector when there is a Text node

* Push node api

* Use node fn macro

* Stable ids

* Image module as a seperate file

* Explain check for "Input Frame" node

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-04-27 03:07:43 +01:00
Keavon Chambers
202b0ee6ed Remove Color struct from document-legacy (#1012) 2023-02-07 17:31:50 -08:00
Keavon Chambers
7ab601c0c6 Clean up arg order in process_message() so data is last 2023-01-29 04:07:41 -08:00
0HyperCube
d742b05d3a Diff simple layout changes to avoid excessive DOM replacements (#910)
* Add UI diffs to rust

* Clean up some js

* Fix lints

* Fix test

* Remove one unnecessary keyword

* Rename to widget path

* Rename new_val to new_value

* Rename newVal to layoutGroup in createLayoutGroup

* Extract get_widget_path to a function

* Base skipping on the layout rather than the target

* Rename to ResendActiveWidget

* Switch info to trace

* Add a link to the documentation about Object.assign

* knitpick js changes

* Add more comments to diff functions

Co-authored-by: mfish33 <maxmfishernj@gmail.com>
2022-12-25 18:56:35 +00:00
Keavon Chambers
49b9b8cfec Rename the legacy Graphene crate to document-legacy (#899)
* Rename /graphene to /document-legacy

* Update names in code
2022-12-22 02:12:05 -08:00
0HyperCube
9d40539dc7 Nested networks UI (#885)
* Initial UI for nested nodes

* Clean up deleting nodes

* Print address of nested network

* Add exiting network message

* Implement the breadcrumb trail

* Remove whitespace

* Fix double click not registering in Chromium

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-17 15:38:29 +00:00