Graphite/frontend/src/components
mTvare 72f1047a27
Display images in the SVG viewport renderer via canvases instead of base64 PNGs (#2903)
* add: move images as rendered canvases to node_graph_executor

* add: added the frontend message

* fix: bytemuck stuff

* fix: canvas element breaking

* fix: width issues

* fix: remove the old message

* npm: run lint-fix

* fix

* works finally

* fix transforms

* Fix self closing tag

* fix: reuse id

* fix: have it working with repeat instance

* cargo: fmt

* fix

* Avoid "canvas" prefix to IDs

* fix

* fix: vello issue from 6111440

* fix: gpu stuff

* fix: vello bbox

* Code review

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-24 17:14:38 -07:00
..
floating-menus Improve node creation menu and categorization (#2719) 2025-06-23 18:51:16 -07:00
layout Tidy up the Layers panel with a new bottom bar 2025-05-21 04:14:01 -07:00
panels Display images in the SVG viewport renderer via canvases instead of base64 PNGs (#2903) 2025-07-24 17:14:38 -07:00
views Port node graph wires to the backend and improve graph UI performance (#2795) 2025-07-04 22:53:37 -07:00
widgets Add pivot type selection with Custom Pivot, Origin (Average Point), and Origin (Active Object) to the Select tool (#2730) 2025-07-08 09:24:54 +00:00
window Tweak the design of the RadioInput widget 2025-05-24 16:07:01 -07:00
Editor.svelte Make the node graph unrenderable message less scary 2025-07-01 05:29:09 -07:00
README.md Rename and reorganize several widgets (#1462) 2023-11-18 04:34:30 -08:00

README.md

Overview of /frontend/src/components/

Each component represents a (usually reusable) part of the Graphite editor GUI. These all get mounted in Editor.svelte (in the /src directory above this one).

Floating Menus: floating-menus/

The temporary UI areas with dark backgrounds which hover over the top of the editor window content. Examples include menu lists, popovers, and dialogs.

Layout: layout/

Useful containers that control the flow of content held within.

Panels: panels/

The dockable tabbed regions like the Document, Properties, Layers, and Node Graph panels.

Widgets: widgets/

The interactive input items used to display information and provide user control.

Window: window/

The building blocks for the Title Bar, Workspace, and Status Bar within an editor application window.

Svelte tips and tricks

This section contains a growing list of quick reference information for helpful Svelte solutions and best practices. Feel free to add to this to help contributors learn things, or yourself remember tricks you'll likely forget in a few months.

Bi-directional props

The component declares this:

// The dispatcher that sends the changed value as a custom event to the parent
const dispatch = createEventDispatcher<{ theBidirectionalProperty: number }>();

// The prop
export let theBidirectionalProperty: number;

// Called only when `theBidirectionalProperty` is changed from outside this component via its props
$: console.log(theBidirectionalProperty);

// Example of a method that would update the value
function doSomething() {
	dispatch("theBidirectionalProperty", SOME_NEW_VALUE);
},

Users of the component do this for theCorrespondingDataEntry to be a two-way binding:

let theCorrespondingDataEntry = 42;
<DropdownInput
	theBidirectionalProperty={theCorrespondingDataEntry}
	on:theBidirectionalProperty={({ detail }) => { theCorrespondingDataEntry = detail; }}
/>