Commit Graph

642 Commits

Author SHA1 Message Date
Joseph T. Lyons
7c19650a40 Remove when_else
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-07 12:37:07 -05:00
Antonio Scandurra
7ad6d489a4
Fix clipping when rendering paths (#3537)
Release Notes:

- N/A
2023-12-07 18:23:19 +01:00
Antonio Scandurra
08c4e1abdc Fix clipping when rendering paths
Co-Authored-By: Nathan <nathan@zed.dev>
2023-12-07 17:48:00 +01:00
Kirill Bulatov
6c653b9c05 Activate Zed window on external file drop 2023-12-07 16:08:47 +02:00
Kirill Bulatov
b692b4c9c2 Do not expand terminal selections on active drag 2023-12-07 16:08:47 +02:00
Kirill Bulatov
f829120f51 Convert OS file drag and drop enter event into a mouse move, not mouse click 2023-12-07 16:08:47 +02:00
Antonio Scandurra
a40515dbb3 Rework frame rendering
This commit replaces the old `previous_frame` and `current_frame` with
a new pair of `rendered_frame` and `next_frame` that are swapped once
we are ready to draw a finished frame.

This makes it clearer when to use which: `rendered_frame` should be used
to query the existing state, whereas `next_frame` should be used and mutated when
redrawing a dirty window.

The change was prompted by a bug I encountered in `FocusHandle::contains`. The
implementation was reading `current_frame`, but that was the wrong field to
access if e.g. we were reading it inside of a `render` function or any other
time while drawing the window.
2023-12-07 12:10:49 +01:00
Joseph T. Lyons
d2362d7f12 Merge branch 'main' into feedback-2 2023-12-06 23:16:54 -05:00
Joseph T. Lyons
8fc15c05c5 Introduce when_else() 2023-12-06 22:34:14 -05:00
Mikayla
22cd62213b
Tear out drag event listener 2023-12-06 16:22:25 -08:00
Mikayla
c092cfbfb3
Fix bug with IME
Adjust how IME works in the terminal

co-authored-by: nathan <nathan@zed.dev>
2023-12-06 15:54:08 -08:00
Mikayla
fd31e429f5
Merge branch 'main' into terminal-element 2023-12-06 15:20:04 -08:00
Mikayla
12e7f61f62
Fix a porting bugs for terminal2
co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 15:11:49 -08:00
Max Brunsfeld
89c8a7c242 Enable buffer font size adjustment in zed2
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 13:52:33 -08:00
Max Brunsfeld
6bbb1642b8 Fix propagation of active item to followers
Enable channel buffer integration tests.
2023-12-06 12:18:48 -08:00
Nathan Sobo
d7473ad6e7
Document geometry module and replace zero method with default (#3515)
Nothing earth-shattering here, but all our geometry types are now fully
documented.

Release Notes:

- N/A
2023-12-06 12:52:41 -07:00
Nathan Sobo
ac07e230fa Document geometry 2023-12-06 12:28:44 -07:00
Antonio Scandurra
2aee3e3192 Make Node::context optional as well
This was an oversight in d09dfe0.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-06 18:02:45 +01:00
Antonio Scandurra
5e558e2a58 Make more menu-related platform methods no-ops 2023-12-06 17:57:18 +01:00
Antonio Scandurra
886ec79d58 Make TestPlatform::set_menus a no-op 2023-12-06 17:45:59 +01:00
Antonio Scandurra
c8ddc95caa Take a Keymap when setting app menus
For a brief period on this branch, we were taking a `DispatchTree`. Doing so
resulted in more accurate key bindings but it meant that we would have had to
recompute the app menus every time the key context changed.

We decided to err on the side of keeping things simple and work in the same
way they worked back in zed1.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-06 17:26:54 +01:00
Piotr Osiewicz
6549a9a091 Let WindowContext::dispatch_action handle global actions
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-06 16:52:52 +01:00
Piotr Osiewicz
e9002ab10a Merge branch 'main' into app-menus 2023-12-06 16:34:55 +01:00
Piotr Osiewicz
d09dfe01f5 Wire up global actions
Added an ephemeral root node so that even if there's no window/focused handle we still have something to dispatch to.

Co-authored-by: Antonio <antonio@zed.dev>
2023-12-06 16:15:53 +01:00
Piotr Osiewicz
1f538c5fdd Merge branch 'main' into copilot2 2023-12-06 15:13:13 +01:00
Mikayla
735f2029e9
Add more debugging 2023-12-05 17:31:33 -08:00
Mikayla
2ee0ecb677
Add back the main structure 2023-12-05 16:52:29 -08:00
Nathan Sobo
d2fe9f8f9b Merge remote-tracking branch 'origin/main' into app-menus 2023-12-05 16:54:38 -07:00
Nathan Sobo
82534b6612 Get app menus basically working
- Everything is still disabled when there is no active window.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-05 16:37:01 -07:00
Nathan Sobo
79567d1c87 Add AppContext::dispatch_action and use it for app menu actions
Co-Authored-By: Marshall <marshall@zed.dev>
Co-Authored-By: Julia <julia@zed.dev>
2023-12-05 15:49:06 -07:00
Max Brunsfeld
f2faa70f73 Make Window::on_next_frame work in tests 2023-12-05 13:34:12 -08:00
Joseph T. Lyons
78e1c0f9c3 Implement feedback actions
CopySystemSpecsIntoClipboard
RequestFeature
FileBugReport
2023-12-05 15:48:41 -05:00
Nathan Sobo
631e264e3c Start on app menus 2023-12-05 13:17:59 -07:00
Mikayla
ab140ee4c2
Add event based drag API to GPUI, continue binding mouse handlers to terminal 2023-12-05 12:07:17 -08:00
Max Brunsfeld
38d41acf9b Fix rendering of shared screens in collab panel 2023-12-05 10:29:19 -08:00
Max Brunsfeld
5e79807f6f Fix tree branch rendering in collab panel 2023-12-05 10:14:40 -08:00
Nathan Sobo
dffe0ea058 Reintroduce menu-related platform callbacks 2023-12-05 09:23:24 -07:00
Antonio Scandurra
09db455db2 Port semantic_index to gpui2
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-12-05 15:38:36 +01:00
Piotr Osiewicz
b73ccc8180 Start out Copilot2;
Add hidden_action_types to CommandPaletteFilter.
WindowContext.available_actions now returns global actions as well.

Co-authored-by: Antonio <antonio@zed.dev>
2023-12-05 14:57:20 +01:00
Piotr Osiewicz
d433da1e70
Editor2 tests (#3486)
Release Notes:

- N/A
2023-12-05 14:52:20 +01:00
Max Brunsfeld
ae6ddceb67
Enable more collab UI features (#3496)
* Current Call section of the collab panel
* Improve the collab titlebar
* Add basic UI for following

Following only partially works, but the UI for following is now in
place.
2023-12-04 18:01:11 -08:00
Max Brunsfeld
eff3a72fb5 Start work on following in zed2
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-04 17:51:53 -08:00
Conrad Irwin
9162f299a7 Fix project panel context menu 2023-12-05 00:41:00 +00:00
Max Brunsfeld
63667ecf6f Start bringing back the current call section of the collab panel
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-04 15:46:56 -08:00
Conrad Irwin
13bb16577c
action dispatch target (#3494)
- Ensure the candidate keybinding matches the correct context
- Fix context key matching
- I was soooo close
- Dispatch actions on focused node

[[PR Description]]

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2023-12-04 23:43:26 +00:00
Conrad Irwin
c82fea375d Dispatch actions on focused node
Allows us to implement context menu matching nicely
2023-12-04 22:58:04 +00:00
Marshall Bowers
c10d8a8110
Fix cursor styles not displaying properly (#3493)
This PR fixes an issue where an element with a cursor style set would
not update the cursor when hovering over it.

Previously the cursor style would only appear by interacting with the
element in some way, for instance, by clicking on the element or by
having a `.hover` with some other style being applied.

Release Notes:

- N/A
2023-12-04 16:40:53 -05:00
Conrad Irwin
79773178c8 I was soooo close 2023-12-04 21:37:47 +00:00
Conrad Irwin
2c2e5144c9 Fix context key matching
* You need to check all layers of the context stack
* When in command, the context should be based on where focus was (to
  match `available_actions`.
2023-12-04 21:28:37 +00:00
Marshall Bowers
3627ff87f0 Ensure the candidate keybinding matches the correct context 2023-12-04 15:53:38 -05:00