Graphite/frontend/src/components
0HyperCube 020f700c92 Image and text bug fixes (#685)
* Image and text bugfixes

* Mark only the required layer types as dirty

* Fix doctest

* Disable selection if empty

* Cleanup naming

* Simplify cache deleting on export

* Minor css style change

* Nit

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-06-30 02:18:01 +01:00
..
floating-menus Image and text bug fixes (#685) 2022-06-30 02:18:01 +01:00
layout Clean up web code's use of display CSS properties, using <LayoutRow>/<LayoutCol> where intended 2022-01-23 20:23:35 -08:00
panels Change MenuList checkbox to be an icon from a widget 2022-06-17 17:55:04 -07:00
widgets Fix DropdownInput repeated change emitting 2022-06-19 19:32:18 -07:00
window Reorganize Vue components and add documentation explaining each folder 2022-05-23 19:03:34 -07:00
README.md Reorganize Vue components and add documentation explaining each folder 2022-05-23 19:03:34 -07:00

README.md

Overview of /frontend/src/components/

Each component represents a (usually reusable) part of the Graphite Editor GUI. These all get mounted within the Vue entry point, App.vue, 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 popovers, dropdown menu selectors, and dialog modals.

Layout: layout/

Useful containers that control the flow of content held within.

Panels: panels/

The dockable tabbed regions like the Document, Properties, Layer Tree, 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.

Vue tips and tricks

This section contains a growing list of quick reference information for helpful Vue 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:

export default defineComponent({
	emits: ["update:theBidirectionalProperty"],
	props: {
		theBidirectionalProperty: { type: Number as PropType<number>, required: false },
	},
	watch: {
		// Called only when `theBidirectionalProperty` is changed from outside this component (with v-model)
		theBidirectionalProperty(newSelectedIndex: number | undefined) {

		},
	},
	methods: {
		doSomething() {
			this.$emit("update:theBidirectionalProperty", SOME_NEW_VALUE);
		},
	},
});

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

<DropdownInput v-model:theBidirectionalProperty="theCorrespondingDataEntry" />