rename to WaveApp

This commit is contained in:
sawka
2024-11-14 14:04:25 -08:00
parent e41d771ae2
commit bca7581962
2 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
# VDOM Canvas Operations Guide
# WaveApp Canvas Operations Guide
The VDOM system provides a powerful way to interact with HTML Canvas elements through the `QueueRefOp` function. This guide explains how to use canvas operations effectively in your VDOM applications.
The WaveApp system provides a powerful way to interact with HTML Canvas elements through the `QueueRefOp` function. This guide explains how to use canvas operations effectively in your WaveApp applications.
## Basic Canvas Setup
@@ -35,7 +35,7 @@ vdom.QueueRefOp(ctx, canvasRef, vdom.VDomRefOperation{
## Reference Management
The VDOM canvas system has two key uses for references:
The WaveApp canvas system has two key uses for references:
1. **Capturing Canvas API Return Values**
Some canvas operations return objects (like gradients) that cannot be directly serialized. Use the `Ref` field to capture these return values:
@@ -255,4 +255,4 @@ var CanvasUpdater = waveapp.DefineComponent[CanvasUpdaterProps](
)
```
This guide covers the essential patterns for working with Canvas in VDOM applications. Remember that while Canvas operations are powerful, they should be used judiciously in terminal-based applications to maintain good performance.
This guide covers the essential patterns for working with Canvas in WaveApp applications. Remember that while Canvas operations are powerful, they should be used judiciously in terminal-based applications to maintain good performance.
+7 -7
View File
@@ -1,8 +1,8 @@
# VDOM System Guide
# WaveApp System Guide
Wave Terminal includes a powerful VDOM (Virtual DOM) system that lets developers create rich HTML/React-based UI applications directly from Go code. The system translates Go components and elements into React components that are rendered within Wave Terminal's UI. It's particularly well-suited for administrative interfaces, monitoring dashboards, data visualization, configuration managers, and form-based applications where you want a graphical interface but don't need complex browser-side interactions.
Wave Terminal includes a powerful WaveApp system that lets developers create rich HTML/React-based UI applications directly from Go code. The system translates Go components and elements into React components that are rendered within Wave Terminal's UI. It's particularly well-suited for administrative interfaces, monitoring dashboards, data visualization, configuration managers, and form-based applications where you want a graphical interface but don't need complex browser-side interactions.
This guide explains how to use the VDOM system to create interactive applications that run in Wave Terminal. While the patterns will feel familiar to React developers (components, props, hooks), the implementation is pure Go and takes advantage of Go's strengths like goroutines for async operations. Note that complex browser-side interactions like drag-and-drop, rich text editing, or heavy JavaScript functionality are not supported - the framework is designed for straightforward, practical terminal-based applications.
This guide explains how to use the WaveApp system (and corresponding VDOM, virtual DOM, component) to create interactive applications that run in Wave Terminal. While the patterns will feel familiar to React developers (components, props, hooks), the implementation is pure Go and takes advantage of Go's strengths like goroutines for async operations. Note that complex browser-side interactions like drag-and-drop, rich text editing, or heavy JavaScript functionality are not supported - the framework is designed for straightforward, practical terminal-based applications.
You'll learn how to:
- Create and compose components
@@ -15,7 +15,7 @@ The included todo-main.go provides a complete example application showing these
## Client Setup and Registration
The VDOM client should be created as a global variable using AppOpts:
The WaveApp client should be created as a global variable using AppOpts:
```go
// Create client at package level
@@ -377,7 +377,7 @@ Best Practices:
## State Management and Async Updates
While React patterns typically avoid globals, in Go VDOM applications it's perfectly fine and often clearer to use global variables. However, when dealing with async operations and goroutines, special care must be taken:
While React patterns typically avoid globals, in Go WaveApp applications it's perfectly fine and often clearer to use global variables. However, when dealing with async operations and goroutines, special care must be taken:
```go
// Global state is fine!
@@ -467,7 +467,7 @@ Key points for state management:
## File Handling
The VDOM system can serve files to components. Any URL starting with `vdom://` will be handled by the registered handlers:
The WaveApp system can serve files to components. Any URL starting with `vdom://` will be handled by the registered handlers:
```go
// Register handlers for files (in the main func)
@@ -510,7 +510,7 @@ Note that the system will attempt to detect the file type using the first 512 by
By default, files will not be cached. If you'd like to enable caching, pass an ETag. If a subsequent request comes and the ETag matches the system will used the cached content.
## VDOM Application Template
## WaveApp Template
```go
package main