Commit Graph

341 Commits

Author SHA1 Message Date
Evan Simkowitz
a3a576bd6d
Don't show the placeholder if the action will be a no-op (#58)
Update the computeMove function to only set pendingAction if the action
is not a no-op (i.e. it will not place the node adjacent to itself at
the same level). Also clears the pendingAction if the user hovers over
the node that is being dragged.
2024-06-18 16:03:00 -07:00
Mike Sawka
4ded6d94b6
stickers and terminal serialization (#57) 2024-06-17 22:38:48 -07:00
Red J Adaya
b6c85e38f6
DnD tabs (#44) 2024-06-17 21:50:33 -07:00
Evan Simkowitz
9adecebbf2
remove unnecessary useCallback in Widgets component 2024-06-17 14:23:57 -07:00
Evan Simkowitz
bd93504314
Add comments for swapNode 2024-06-17 14:18:27 -07:00
Evan Simkowitz
48d4611a05
Add Swap Node functionality (#56)
Adds the ability to swap nodes by dragging to the center of a tile.

Also fixes a bug where moving a node to a new lesser index under the
same parent would produce a no-op.
2024-06-17 14:14:09 -07:00
sawka
b71ae8e6e8 move terminal into its own directory under view 2024-06-17 10:18:38 -07:00
Mike Sawka
e46906d423
wsh rpc working (#55)
lots of iterations on an RPC protocol. getting wsh working with a
getmeta/setmeta command in addition to html mode.
2024-06-17 09:58:28 -07:00
Sylvie Crowe
d0c4f5c46f
Support Windows Builds (#54)
This adds support for windows builds. With it, the app can successfully
run on windows and unix systems. Note that the terminal still only works
on unix systems at this time.
2024-06-15 14:59:14 -07:00
sawka
014c6fb2ec redo ptybuffer, move to wshutil to help with stdin processing. change wsh to use cobra 2024-06-14 14:43:47 -07:00
sawka
8a3a527343 setup cobra for wsh 2024-06-14 12:19:36 -07:00
sawka
9743395eb7 some styling for the block close button 2024-06-14 11:15:36 -07:00
sawka
f0fb70ef9c get pdf preview working 2024-06-14 11:10:54 -07:00
sawka
29c2b6bc7f working on a hover state for the headers 2024-06-14 10:46:03 -07:00
sawka
ab785aa992 move DeleteZone to its own go routine -- crazy bug where we used the wrong DB conn 2024-06-14 10:09:28 -07:00
sawka
b7b813a4a7 Cmd-ESC now toggles both ways 2024-06-14 00:15:09 -07:00
Mike Sawka
8e3540f754
working on ijson and wsh magic (#53) 2024-06-13 23:54:04 -07:00
Evan Simkowitz
ac53c1bb87
add ElectronViteConfig type import 2024-06-13 23:19:32 -07:00
Evan Simkowitz
0b80dbcb72
Fix preview rendering in TileLayout storybook 2024-06-13 23:08:11 -07:00
Evan Simkowitz
0d4be9cb88
Fix Vite CJS deprecation warning when using Storybook (#52)
This was a weird one, apparently Storybook still uses CJS but Vite has fully deprecated CJS support. So we need to dynamically import the electron.vite.config.ts file for Storybook, but this breaks because Typescript doesn't resolve and properly compile the dynamic import. To get around this, I am using the `tsx` package, which can dynamically compile typescript imports.
2024-06-13 23:03:57 -07:00
Evan Simkowitz
3d532f1b61
reformat package.json 2024-06-13 19:51:18 -07:00
Evan Simkowitz
e3c5d4de48
Upgrade Storybok and yarn 2024-06-13 19:50:27 -07:00
Evan Simkowitz
043788cc1c
Fix Storybook 2024-06-13 19:46:31 -07:00
Evan Simkowitz
1f9dada759
Rename LeafNode to DisplayNode 2024-06-13 19:36:06 -07:00
Evan Simkowitz
ca0b875ac9
Adding more verbose docstrings for the TileLayout (#51) 2024-06-13 19:33:06 -07:00
Evan Simkowitz
205afe9998
Remove reference to old Wails binding (#50)
This is now covered by gotypes.d.ts so we don't need the Wails binding ref anymore
2024-06-13 18:31:42 -07:00
Evan Simkowitz
514500bb72
Get version for Taskfile from version.js (#49)
Make version.js runnable to output the current version, get the VERSION variable in the Taskfile from this script.
2024-06-13 18:11:21 -07:00
Evan Simkowitz
3ec62fd6d2
Simplify frontend/wave path in index.html (#48) 2024-06-13 17:00:07 -07:00
Evan Simkowitz
8ad109dc03
Remove unnecessary await in emain (#47) 2024-06-13 16:53:52 -07:00
Evan Simkowitz
b2b1f9b9df
Switch to using electron-vite instead of WebPack (#45)
This sets us back up to use Vite via the electron-vite package. This
will let us continue to build our testing suite on Vitest and take
advantage of Vite features like Hot Module Reloading, etc.

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-06-13 16:49:25 -07:00
Mike Sawka
0f992c535d
working on wave OSC escapes, modes for the terminal (#46) 2024-06-13 14:41:28 -07:00
sawka
336dd0c0e3 unify the logging between electron and wavesrv (emain now proxies the wavesrv logs) 2024-06-12 19:33:44 -07:00
sawka
391c4f20d5 add a stdin watcher that also leads to a shutdown 2024-06-12 18:17:56 -07:00
sawka
8a71180f20 implement wscommand using type union interface, send resize events there 2024-06-12 14:18:03 -07:00
sawka
083e00227e update BlockService to use the new type union feature of tsgen. strongly type the arguments to BlockService.SendCommand 2024-06-12 13:47:13 -07:00
sawka
605b9ea048 remove wails deps 2024-06-12 11:58:17 -07:00
sawka
c139a33954 remove dependency on SysProcAttr 2024-06-12 11:33:45 -07:00
sawka
dab48497c1 updated README with new build/run instructions 2024-06-12 10:46:22 -07:00
Mike Sawka
1874d9a252
port to electron (#33) 2024-06-11 17:42:10 -07:00
Evan Simkowitz
9f32a53485
Fix preview getting unset when app is idle (#43)
I found that the drag preview images would get unset when the app went idle. I am now caching the preview image and resetting it every time a user hovers over a TileNode. I am also updating the logic for the placeholder slightly to reduce the number of variables floating around.
2024-06-11 16:28:41 -07:00
Evan Simkowitz
1b52160794
Remove unnecessary generic definition (#42) 2024-06-11 16:19:17 -07:00
Evan Simkowitz
8b61c4d62b
Add webkit-prefixed user-select attributes (#41)
It turns out that WebKit uses its own prefix for user-select so I'm adding this everywhere we currently define user-select, as well as a few new places
2024-06-11 16:16:52 -07:00
Evan Simkowitz
9809414eb0
Fix order of operations when moving nodes (#40)
Insert the node at the new location before removing it from its old location. With the old order, removing a node from its parent could change the indexing of the parent node, if moving a node to a new location under the same parent.
2024-06-11 15:10:20 -07:00
Evan Simkowitz
cff7a54507
Ensure previews don't wrap text (#39) 2024-06-11 14:51:35 -07:00
Evan Simkowitz
525f20ba81
Disable text selection on tab bar and block headers (#38) 2024-06-11 14:33:24 -07:00
Evan Simkowitz
4293c749c4
Only generate a preview image on first onPointerEnter event (#37)
This resolves a noticeable delay when the first paint required generating multiple preview images
2024-06-11 14:28:17 -07:00
Evan Simkowitz
1be376c679
Remove debugging statement when generating drag previews (#36) 2024-06-11 13:25:21 -07:00
Evan Simkowitz
92dc82967c
Replace lets with const where possible (#35) 2024-06-11 13:19:29 -07:00
Evan Simkowitz
97ca430884
Fix missing null check in block header component (#34) 2024-06-11 13:06:05 -07:00
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