An open-source, cross-platform terminal for seamless workflows
Go to file
Evan Simkowitz 0a45311f30
Implement outer drop direction, add rudimentary drag preview image rendering (#29)
This PR adds support for Outer variants of each DropDirection.

When calculating the drop direction, the cursor position is calculated
relevant to the box over which it is hovering. The following diagram
shows how drop directions are calculated. The colored in center is
currently not supported, it is assigned to the top, bottom, left, right
direction for now, though it will ultimately be its own distinct
direction.

![IMG_3505](https://github.com/wavetermdev/thenextwave/assets/16651283/a7ea7387-b95d-4831-9e29-d3225b824c97)

When an outer drop direction is provided for a move operation, if the
reference node flexes in the same axis as the drop direction, the new
node will be inserted at the same level as the parent of the reference
node. If the reference node flexes in a different direction or the
reference node does not have a grandparent, the operation will fall back
to its non-Outer variant.

This also removes some chatty debug statements, adds a blur to the
currently-dragging node to indicate that it cannot be dropped onto, and
simplifies the deriving of the layout state atom from the tab atom so
there's no longer another intermediate derived atom for the layout node.

This also adds rudimentary support for rendering custom preview images
for any tile being dragged. Right now, this is a simple block containing
the block ID, but this can be anything. This resolves an issue where
letting React-DnD generate its own previews could take up to a half
second, and would block dragging until complete. For Monaco, this was
outright failing.

It also fixes an issue where the tile layout could animate on first
paint. Now, I use React Suspense to prevent the layout from displaying
until all the children have loaded.
2024-06-11 13:03:41 -07:00
.storybook Integrate Faraday layout system (#16) 2024-06-04 13:05:44 -07:00
.vscode Integrate Faraday layout system (#16) 2024-06-04 13:05:44 -07:00
build waveterm.lock, and new appicon 2024-05-20 15:28:47 -07:00
cmd wsh rpc client 2024-05-29 23:17:23 -07:00
db Break layout node into its own Wave Object (#21) 2024-06-05 17:21:40 -07:00
frontend Implement outer drop direction, add rudimentary drag preview image rendering (#29) 2024-06-11 13:03:41 -07:00
pkg Automatically Detect Monaco Syntax Highlighting (#20) 2024-06-06 14:52:01 -07:00
public debounce resize handler, fix useEffect() in term.tsx 2024-06-04 23:47:18 -07:00
.editorconfig Fix prettier formatting 2024-05-28 12:12:28 -07:00
.gitignore Add configs from Faraday repo 2024-05-24 17:44:41 -07:00
.prettierignore Undo formatting of minified files (#9) 2024-05-28 12:24:49 -07:00
.yarnrc.yml Fix prettier formatting 2024-05-28 12:12:28 -07:00
eslint.config.js Fix prettier formatting 2024-05-28 12:12:28 -07:00
go.mod working on waveobj -- oids 2024-05-25 18:37:05 -06:00
go.sum working on waveobj -- oids 2024-05-25 18:37:05 -06:00
main.go save/restore window size 2024-06-07 10:56:55 -07:00
package.json Implement outer drop direction, add rudimentary drag preview image rendering (#29) 2024-06-11 13:03:41 -07:00
prettier.config.js Fix prettier formatting 2024-05-28 12:12:28 -07:00
README.md delete block and close tab working 2024-05-27 16:33:31 -07:00
Taskfile.yml Fix broken taskfile 2024-05-24 17:59:58 -07:00
tsconfig.json Integrate Faraday layout system (#16) 2024-06-04 13:05:44 -07:00
vite.config.ts integrate codeedit loader (just hello world for now) 2024-06-03 11:35:06 -07:00
vitest.config.ts Fix prettier formatting 2024-05-28 12:12:28 -07:00
yarn.lock Implement outer drop direction, add rudimentary drag preview image rendering (#29) 2024-06-11 13:03:41 -07:00

The Next Wave

To build you need to have wails3 installed. You need to check out the repo, switch to the v3-alpha branch, then install the wails3 command. you should also install the "task" command (wails3 uses a Taskfile.yml file).

Install task:

brew install go-task/tap/go-task

Install wails3:

git clone git@github.com:wailsapp/wails.git
cd wails
git checkout v3-alpha
cd v3/cmd/wails3
go install

To test if wails3 is installed correctly you can run wails3 doctor (it should say "success" at the bottom).

Now, this directory must live as a sibling to thenextwave repo (because we have a special replace directive in the go.mod file).

# move back to the *parent* directory of your wails clone
git clone git@github.com:wavetermdev/thenextwave.git
cd thenextwave

Now to run the dev version of the app:

wails3 dev

You should see the app!

Now to build a MacOS application:

task build
task create:app:bundle

now in your ./bin directory you should see bin/NextWave (a standalone executable), and you'll also see bin/NextWave.app which is a MacOS application. You can run bin/NextWave directly, or run the app using open bin/NextWave.app (or click on it in the finder).