Commit Graph

1300 Commits

Author SHA1 Message Date
Kirill Bulatov
6809b92e34 Disable synthetic drag on drag and drop
Otherwise, conflicting MouseMove events are generated and page regions start to flicker.
2024-01-10 11:18:45 +02:00
Conrad Irwin
5d3f5611e5
guest promotion (#3969)
Release Notes:

- Adds the ability to promote read-only guests to read-write
participants in calls
2024-01-09 22:21:13 -07:00
Conrad Irwin
2ca462722c Fix some tests (mostly more run_until_parked's...) 2024-01-09 22:14:11 -07:00
Mikayla Maki
45baad2825
Remove or fix stale todos (#3990)
The software equivalent of dusting

Release Notes:

-
2024-01-09 18:37:35 -08:00
Mikayla
e786e22121
And a few more todos 2024-01-09 16:41:17 -08:00
Mikayla
9ce7ef8949
Remove the last of the major todos 2024-01-09 16:14:54 -08:00
Conrad Irwin
276bfa0fab Merge branch 'main' into guest-promotion 2024-01-09 16:28:42 -07:00
Mikayla
ed263a7b5c
Resolve more todos 2024-01-09 15:08:05 -08:00
Mikayla
80790d921d
Fix / remove small todos 2024-01-09 14:16:46 -08:00
Mikayla Maki
447bfca942
Add a test to catch keybinding bounds issue (#3966)
Add a test to catch regressions to
https://github.com/zed-industries/zed/pull/3964

Thanks for the idea @ConradIrwin 

TODO:

- [ ] Fix immediate stack overflow in test

Release Notes:

- N/A
2024-01-09 12:03:48 -08:00
Mikayla
1728c4eacc
Fixed test 2024-01-09 11:52:03 -08:00
Julia
5b1894a9b1
Take into account multiple scroll deltas within a single frame (#3982)
Release Notes:

- Fixed an issue where all but the last scroll event would be dropped if
there were multiple within a single frame.
2024-01-09 14:51:26 -05:00
Marshall Bowers
74dadd68d2
Clean up references in doc comments (#3983)
This PR cleans up a number of references in doc comments so that
`rustdoc` will link and display them correctly.

Release Notes:

- N/A
2024-01-09 14:48:48 -05:00
Julia
463270ed36 Take into account multiple scroll deltas within a single frame
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-09 14:32:43 -05:00
Nathan Sobo
42cbd103fb Even more docs
Co-authored-by: Conrad <conrad@zed.dev>
2024-01-09 12:02:12 -07:00
Nathan Sobo
458c672a72 Add more API docs
Co-Authored-By: Conrad <conrad@zed.dev>
2024-01-09 11:16:56 -07:00
Nathan Sobo
59f41acb82 Add a bunch of docs
Co-Authored-By: Conrad <conrad@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>
2024-01-09 11:02:57 -07:00
Marshall Bowers
f0ef63bfa0
gpui: Add SharedUrl type (#3975)
This PR adds a `SharedUrl` type to GPUI.

It's just like a `SharedString`, but for denoting that the contained
value is a URL.

Mainlined from @nathansobo's GPUI blog post:
https://github.com/zed-industries/zed/pull/3968/files#diff-7ee75937e2daf7dd53f71b17698d8bd6d46993d06928d411781b9bd739b5f231R9-R12

Release Notes:

- N/A
2024-01-09 10:55:49 -05:00
Kirill Bulatov
625c9d8980 Remove some todo!'s 2024-01-09 11:36:36 +02:00
Conrad Irwin
844d161c40 Allow adding write access to guests 2024-01-08 22:02:56 -07:00
Mikayla
27d4d727c3
Attempt to write test 2024-01-08 18:21:54 -08:00
Mikayla
0684369734
Fix off by 1 error when computing available key bindings 2024-01-08 17:30:24 -08:00
Piotr Osiewicz
53564fb269
Bring back zed.rs tests (#3907)
At present 3 tests still fail; 2 are related to keymap issues that (I
believe) @maxbrunsfeld is working on. The other one
(`test_open_paths_action`) I'll look into. edit: done
This PR also fixes workspace unregistration, as we've put the code to do
that behind `debug_assert`
(https://github.com/zed-industries/zed/pull/3907/files#diff-041673bbd1947a35d45945636c0055429dfc8b5985faf93f8a8a960c9ad31e28L649).
Release Notes:
- N/A
2024-01-08 12:29:54 +01:00
Piotr Osiewicz
d475f1373a
gpui: Further docs refinement & moved some reexports into 'private' module (#3935)
This commit mostly fixes invalid URLs in docstrings. It also
encapsulates crates we reexport (serde stuff + linkme) into a public
module named "private" in order to reduce the API surfaced through docs.
Moreover, I fixed up a bunch of crates that were pulling serde_json in
through gpui explicitly instead of using Cargo manifest.

Release Notes:
- N/A
2024-01-07 14:14:21 +01:00
Kirill Bulatov
8ff05c6a72 Prepare for external file drop in pane 2024-01-07 01:17:49 +02:00
Piotr Osiewicz
dc7f9bbc54
gpui: Sweep through cargo doc output and mark dubious items as non-public (#3932)
I essentially went through the publicly exported items and marked these
that are e.g. leaky reexports as pub(crate). I expect that'd be done on
Tuesday anyways.

Release Notes:
- N/A
2024-01-06 23:47:51 +01:00
Nathan Sobo
aaada7d508 Implement From<Rgba> for Fill 2024-01-05 17:33:22 -07:00
Conrad Irwin
709682e8bc Tidy up TestContext lifecycle
Co-Authored-By: Max <max@zed.dev>
2024-01-05 16:31:41 -07:00
Conrad Irwin
204ef451d0 Merge branch 'main' into following-tests 2024-01-05 16:14:12 -07:00
Conrad Irwin
f239a8292e More following tests 2024-01-05 16:13:40 -07:00
Max Brunsfeld
7e810d7e0d
Restore the ability to disable key bindings by setting them to null in your keymap (#3921)
* Fix an incorrect use of `Any::type_id` that prevented the disabling of
key bindings
* Restructured the representation of disabled key bindings so that they
handle context predicates correctly. Previously, to disable key binding,
you needed to supply the exact same context predicate (e.g. `Editor &&
mode == "full"`) as the binding that you are trying to disable. Now, the
context predicates of disabled key bindings are evaluated just like any
other context predicate (with the current context) to see if they apply.

Release Notes:

- Fixed an issue where disabling key bindings didn't work. To disable a
key binding, set it to `null` in your keymap.
2024-01-05 13:51:47 -08:00
Max Brunsfeld
8a96562adf Handle contexts correctly for disabled key bindings 2024-01-05 13:06:59 -08:00
Piotr Osiewicz
254a52d0a1
gpui: Remove dependency on sqlez (#3871)
This removes one of the path dependencies in gpui that's only really
needed by `workspace` (which can work around lack of these
implementations by itself). In theory it should also improve build
scheduling (as gpui doesn't have to wait for main dependency of sqlez -
libsqlite3 - to finish it's 25 seconds-long build in release), though in
practice I didn't notice a substantial improvement.
Moreover `sqlez` was unused by `settings` too, so that's removed
as well.

Release Notes:

- N/A
2024-01-05 19:36:55 +01:00
Conrad Irwin
3c0052850c Merge branch 'main' into channel-guests 2024-01-05 10:05:59 -07:00
Conrad Irwin
df0076a4eb
Better TestWindow support (#3876)
Adding guest roles led us down a rabbit hole where we'd have liked to
rely on a
side-effect of activating a window in tests; but the test window didn't
implement that.

Looking into that, I realized our TestWindow wasn't doing a great job of
emulating the MacWindow, so this makes the two more similar.
2024-01-05 09:59:48 -07:00
Conrad Irwin
06ab986599 fmt 2024-01-05 09:52:39 -07:00
Kirill Bulatov
92d6a8c253
Return back git status colors for tab labels (#3906) 2024-01-05 13:52:51 +02:00
Piotr Osiewicz
a984a158fc gpui: Use async-task 4.7 2024-01-05 11:42:28 +01:00
Kirill Bulatov
3070a6ef26 Return back git status colors for tab labels 2024-01-05 12:38:42 +02:00
Conrad Irwin
fff415e3e9 Improve deactivate simulation 2024-01-04 22:06:52 -07:00
Conrad Irwin
5037cca7ec Add LeakDetector for gpui2
Co-Authored-By: Julia <julia@zed.dev>
2024-01-04 20:29:44 -07:00
Julia
a86f401a7c
Moar terminal bugs de2ified (#3894)
Release Notes:

- N/A
2024-01-04 18:40:55 -05:00
Max Brunsfeld
5e3d4885bf
Fix some bugs in keymap handling (#3895)
- `base_keymap` setting was not respected, now it is
- without a `~/.config/zed/keymap.json` file, we would fail to load the
*default* keymap

Co-authored-by: Marshall <marshall@zed.dev>
2024-01-04 16:04:17 -05:00
Julia
bf8f3e3d68 Unbork test relying on old keystroke behavior
Previously it would both send the keydown *and then* the action, now
it send the action, and then because there was an action, does not send
the keydown

Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2024-01-04 15:07:46 -05:00
Marshall Bowers
2da314fb79
Fix font resolution for UI text so we render with the fallback font (#3893)
This PR updates the font resolution for shaped text to use the new
`resolve_font` method on the text system.

This makes it so we use the fallback font if the desired font cannot be
found rather than rendering nothing.

Release Notes:

- Fixed an issue where nothing would render when the font set in
`ui_font_family` was not found.
2024-01-04 14:26:08 -05:00
Marshall Bowers
e4aa7ba4f2
Try to load fallback fonts instead of panicking when a font is not found (#3891)
This PR adjusts our font resolution code to attempt to use a fallback
font if the specified font cannot be found.

Right now our fallback font stack is `Zed Mono`, followed by `Helvetica`
(in practice we should always be able to resolve `Zed Mono` since we
bundle it with the app).

In the future we'll want to surface the ability to set the fallback font
stack from GPUI consumers, and potentially even support specifying font
stacks in the user settings (as opposed to a single font family).

Release Notes:

- Fixed a panic when trying to load a font that could not be found.
2024-01-04 14:10:46 -05:00
Julia
09b32e6a0e Attempt to run keystroke actions before attempting key listeners 2024-01-04 14:01:01 -05:00
Antonio Scandurra
3ab2062614 Fix border rendering
After implementing it a while ago, our previous interpolation scheme
didn't really make sense to me and was causing borders to be rendered
incorrectly. We don't really draw backgrounds and borders as part of
the same draw call anymore, but it seemed reasonable to have a correct
implementation in the shader anyway.

This commit uses Porter-Duff compositing (i.e., `over`) to produce
a color that is the result of superimposing the border on top of the
background. Then, we linearly interpolate towards the background color
as we slide out of the border and into the background.
2024-01-04 16:27:20 +01:00
Conrad Irwin
5c32dd5688 Better TestWindow support 2024-01-04 08:00:40 -07:00
Antonio Scandurra
b78497bf54 Clip List items that partially overflow 2024-01-04 15:12:25 +01:00