Antonio Scandurra
6dddb72e82
WIP: Create infrastructure for testing element layout
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 15:20:23 +02:00
Antonio Scandurra
6129bda068
Fix boxed cloning of AnyAction
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-23 14:45:13 +02:00
Antonio Scandurra
ab2977c65c
Pass action instead of action argument to handlers
2021-08-23 12:00:31 +02:00
Nathan Sobo
86effd64a2
Get project compiling with type-safe actions
2021-08-22 21:02:48 -06:00
Nathan Sobo
638b533fc7
WIP
2021-08-22 13:29:54 -06:00
Nathan Sobo
24639ec900
WIP
2021-08-22 11:58:19 -06:00
Max Brunsfeld
a7ac37a318
Make titlebar_height available during render
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-20 10:45:42 -07:00
Max Brunsfeld
c7c7a197d1
Merge remote-tracking branch 'origin/sexy' into chat-theme-prep
2021-08-20 09:50:58 -07:00
Antonio Scandurra
98f691d16d
Make database interactions deterministic in test
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-20 16:24:33 +02:00
Nathan Sobo
a4882169c2
Fetch messages when joining a channel
2021-08-19 15:25:20 -06:00
Nathan Sobo
541f58e12c
Start on subscribing to messages in channel entity instances
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-18 11:45:29 -06:00
Nathan Sobo
149fb574c7
Expose titlebar_height in LayoutContext
2021-08-06 09:11:16 -06:00
Nathan Sobo
34eb2c446f
Start on custom titlebar
2021-08-05 11:48:35 -06:00
Nathan Sobo
4c53470800
Notify all views when a theme is selected
2021-08-02 16:57:10 -06:00
Max Brunsfeld
b30d0daabf
Add a theme picker
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 14:55:27 -07:00
Max Brunsfeld
8785f1f9c6
Use deterministic executor in randomized synchronous tests
...
Remove App::test function
2021-07-30 14:07:37 -07:00
Max Brunsfeld
4c3f97d123
Fix type of Workspace::open_new_file context parameter
...
Fixes #118
2021-07-30 10:11:46 -07:00
Nathan Sobo
6efadd19dd
Reuse FontCache across randomized tests
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Antonio Scandurra
b647e3ee71
Make WrapMap
and DisplayMap
models
...
This removes the need for a lock around in `WrapMap` and also removes
`WrapMap::notifications` because gpui already has a standard way of
notifying when a model updates.
2021-07-26 13:02:31 +02:00
Nathan Sobo
f81f043058
WIP
2021-07-23 12:25:09 -06:00
Nathan Sobo
11285f3762
Pass a MutableAppContext to Element::layout and ::dispatch_event
...
We need to mutate the app in these cases to relay layout state, so this just makes things easier. We won't be able to perform layout in parallel but it's questionable whether we'll ever actually do that. If we do, we can revisit.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-23 10:52:08 -06:00
Antonio Scandurra
1ba9e48271
Start on adding a randomized test for BackgroundWrapper
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-16 17:53:23 +02:00
Antonio Scandurra
c4e37dc47c
Use the same background executor for spawning CPU intensive tasks
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-07-13 18:13:25 +02:00
Antonio Scandurra
f836a25500
Use an executor::Background
in AppContext::thread_pool
2021-07-13 14:06:38 +02:00
Antonio Scandurra
58bae3a9a7
Ensure root view is always rendered when opening a window
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-12 17:44:10 +02:00
Max Brunsfeld
eeebc761b6
Restructure Peer to handle connections' messages in order
2021-07-09 16:27:34 -07:00
Max Brunsfeld
140c8833fe
Start work on a deterministic executor for tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-08 13:39:24 -07:00
Max Brunsfeld
f46c0a790e
Improve support for gpui tests that need multiple contexts
...
If a test function takes multiple contexts, pass it however many
distinct contexts are needed. Construct each one with a different
starting entity id so that they do not share any entity ids.
2021-07-07 17:18:42 -07:00
Max Brunsfeld
58eefcd331
Add ModelHandle::spawn_weak, fix worktree leak from spawn call
2021-07-05 17:55:52 -07:00
Antonio Scandurra
e80439daaa
Merge branch 'main' into rpc
2021-06-29 10:25:42 +02:00
Nathan Sobo
2257abd7dd
Add Entity release hooks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-25 10:35:06 -06:00
Max Brunsfeld
ce2f3f664a
Consolidate more logic for joining worktree in Worktree::remote
...
This way we can use this method in tests and avoid
needing to construct a Workspace.
2021-06-23 18:07:09 -07:00
Max Brunsfeld
6a166554e8
Add public method for connecting to RPC server with a given address
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-23 18:05:03 -07:00
Max Brunsfeld
a57cb2b189
Add a public gpui::TestAppContext::new method
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-23 16:34:36 -07:00
Max Brunsfeld
dc8e216fcb
WIP - Maintain a set of open buffers on a LocalWorktree
2021-06-22 12:29:58 -07:00
Max Brunsfeld
cabf6b1f58
Emit a diff event when worktree's snapshot is updated
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-06-21 17:07:56 -07:00
Max Brunsfeld
7a88e44264
Add menu command to join worktree using URL on clipboard
...
Introduce rpc::Client struct that wraps zed_rpc::Peer
2021-06-17 20:42:36 -07:00
Antonio Scandurra
8112efd522
Replace callback-based requests/messages with streams
2021-06-16 14:26:54 +02:00
Max Brunsfeld
8b66e0aa7e
WIP - Allow RpcClient to register handlers for incoming messages
2021-06-15 17:22:48 -07:00
Max Brunsfeld
20542f54ef
Start work on connecting to RPC endpoint
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-06-10 22:12:04 -07:00
Nathan Sobo
66c76d5469
Test creating a new empty workspace and fix test compile errors
2021-06-09 16:38:32 -06:00
Nathan Sobo
3a932cc9bf
Rename MainThreadPlatform to ForegroundPlatform and fix crash on quit
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-07 17:42:49 -06:00
Nathan Sobo
6daddf5146
Allow platform references to be sent to background threads
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-07 17:35:27 -06:00
Nathan Sobo
ebbe517bfa
Move path prompting methods to MainThreadPlatform
...
They need to call back into the main thread, meaning the callbacks can't be Send + Sync.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-07 17:32:03 -06:00
Nathan Sobo
7b98994d1f
Rename PlatformLifecycle to MainThreadPlatform
...
Don't love it, but at least it's accurate.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-06-07 17:21:34 -06:00
Nathan Sobo
14b519f78d
Extract a platform::Lifecycle trait
...
This will allow us to make platform::Platform be Send + Sync and keep the lifecycle on the main thread.
2021-06-07 17:02:24 -06:00
Max Brunsfeld
6ef447866a
Rename context parameters to cx
in gpui
2021-05-28 15:32:35 -07:00
Antonio Scandurra
d7f5587d84
Revert "Temporary: ensure CI env variable is being set"
...
This reverts commit 074dc55ab7
.
2021-05-19 15:20:33 +02:00
Antonio Scandurra
074dc55ab7
Temporary: ensure CI env variable is being set
2021-05-19 15:19:07 +02:00
Antonio Scandurra
65cf9b7c1d
Remove condition_with_duration
for ModelHandle
...
Also, use a 2s timeout on CI for both `ModelHandle::condition` and
`ViewHandle::condition`.
2021-05-19 14:50:28 +02:00