Commit Graph

307 Commits

Author SHA1 Message Date
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
Evan Simkowitz
45a9a95e38
Fix nodeRefs dependency, since map is not a reliable dependency (#31) 2024-06-10 15:16:29 -07:00
Evan Simkowitz
4f878eb681
Don't open storybook when it starts the server (#30) 2024-06-07 14:56:45 -07:00
sawka
9d84c9b4b5 save/restore window size 2024-06-07 10:56:55 -07:00
sawka
5a29100ea7 fix weird http 501 error 2024-06-07 10:37:48 -07:00
Evan Simkowitz
57e5b7284f
Forgot to set generation atom (#28) 2024-06-06 18:07:00 -07:00
Evan Simkowitz
86109daeed
Record a generation when the layout node gets updated to optimize backend calls (#27) 2024-06-06 18:04:54 -07:00
Evan Simkowitz
441463b172
Add placeholder for layout drag and drop (#26) 2024-06-06 17:58:37 -07:00
Evan Simkowitz
2b456f9725
Remove ref dependencies on term (#25) 2024-06-06 15:08:39 -07:00
Evan Simkowitz
2866862253
Replace lots of separate ResizeObservers with a single one via useResizeObserver (#24) 2024-06-06 14:57:37 -07:00
Sylvie Crowe
ba7d2cf061
Automatically Detect Monaco Syntax Highlighting (#20)
This change passes the file name to monaco, so it can use its own
detection to determine highlighting of supported files. It also resolves
some of the mimetypes with more common use cases for a terminal.
2024-06-06 14:52:01 -07:00
Evan Simkowitz
b3b99402b8
Fix undefined error when unmounting resize observer (#23) 2024-06-06 11:27:33 -07:00
Evan Simkowitz
1bc4e0c594
Use resize observer to detect when the webview gets zoomed (#22)
I noticed that the display nodes weren't getting updated when the browser zoom level changed. I found that using ResizeObserver was a better mechanism to capture this signal.
2024-06-06 11:18:05 -07:00
Evan Simkowitz
f12e246c15
Break layout node into its own Wave Object (#21)
I am updating the layout node setup to write to its own wave object. 

The existing setup requires me to plumb the layout updates through every
time the tab gets updated, which produces a lot of annoying and
unintuitive design patterns. With this new setup, the tab object doesn't
get written to when the layout changes, only the layout object will get
written to. This prevents collisions when both the tab object and the
layout node object are getting updated, such as when a new block is
added or deleted.
2024-06-05 17:21:40 -07:00
Evan Simkowitz
28cef5f22f
Add ready param to determine when to render content (#19) 2024-06-05 11:56:04 -07:00
sawka
cf85ad0980 debounce resize handler, fix useEffect() in term.tsx 2024-06-04 23:47:18 -07:00
Sylvie Crowe
2f2ff8a1cb
Extra Mimetypes (#17)
Vastly expands the list of mimetypes we can detect from file extensions.
2024-06-04 17:58:29 -07:00
Evan Simkowitz
29e209e0b0
Make layouts flow horizontally by default (#18) 2024-06-04 16:35:32 -07:00
Evan Simkowitz
c3e71c5c7d
Integrate Faraday layout system (#16)
Co-authored-by: Mike Sawka <sawka@users.noreply.github.com>
Co-authored-by: sawka <mike.sawka@gmail.com>
2024-06-04 13:05:44 -07:00
Mike Sawka
15527397de
Merge pull request #15 from wavetermdev/sylvie/style-cleanup
clean up unused custom css properties
2024-06-04 11:02:17 -07:00
Sylvia Crowe
73d52b24f2 refactor: clean up unused custom css properties
This cleans up the unused/unnecessary css properties added around the
same time as the modal component. This mostly refers to variables that
started with --app. They have been removed and their uses have been
replaced with other defaults. The --warning-color and --success-color
properties still exist despite being unused since they seem to fit with
the --error-color which is already in use.
2024-06-04 10:30:27 -07:00
sawka
7429520d31 simple topic bus implementation -- creates topics on subscribe, deletes topics with no subscribers, extenal notification channel 2024-06-04 00:12:58 -07:00
sawka
0b464cecfe fix safari viewport zoom issue 2024-06-03 23:18:44 -07:00
sawka
6682fc9234 small change to tab bar 2024-06-03 22:26:12 -07:00
sawka
80f9447c21 remove some padding/margin, style scrollbars 2024-06-03 22:18:54 -07:00
sawka
0164851cf6 move ijson frontend/backend to nextwave 2024-06-03 18:25:12 -07:00
sawka
198b66ed7b some styling for the directory table 2024-06-03 18:22:26 -07:00
Mike Sawka
a51be0dc6a
Merge pull request #14 from wavetermdev/sylvie/backwards-nav
Preview Navigation Chrome
2024-06-03 16:25:35 -07:00
Sylvia Crowe
b12417101e Merge branch 'main' into sylvie/backwards-nav 2024-06-03 15:55:48 -07:00
Sylvia Crowe
28d02f760c feat: add background navigation bar
This allows traversal backwards in a preview block.
2024-06-03 15:50:51 -07:00
sawka
dcd6d04b0b rpc checkpoint 2024-06-03 14:10:36 -07:00
sawka
f90554e87e not found should return null 2024-06-03 13:43:50 -07:00
Sylvia Crowe
bf3a036df9 fix: recreate full directory path and fix hooks
This fixes two bugs. The first had to do with the path library not
working in prod. That involved making a simple version of it that works
in the meantime. The other is rendering a different number of hooks
which required moving hooks outside of an if statement.
2024-06-03 13:24:20 -07:00
sawka
f148d7fcf2 change to /wave/file, update blockid to zoneid 2024-06-03 13:22:44 -07:00
sawka
8f04e0163a add pdf preview 2024-06-03 13:13:41 -07:00