Conrad Irwin
a055a4c163
Make overlay positioning more robust
...
Previously we would either switch anchor or snap, now we first try switching
anchor (if desired) and then snap to window regardless.
2023-12-12 21:28:58 -07:00
Conrad Irwin
fa36adbf1f
Fix typo in overlay positioning code
2023-12-12 21:14:48 -07:00
Antonio Scandurra
c0846d6f74
Set cursor style only if we're the active window ( #3607 )
...
Release Notes:
- N/A
2023-12-12 16:56:32 +01:00
Antonio Scandurra
b87c45e6f5
Set cursor style only if we're the active window
2023-12-12 16:32:45 +01:00
Kirill Bulatov
4684440202
Fix focus issues with gpui2 docks ( #3606 )
...
* Fixed dock toggling not focusing the terminal element
* Fixed loosing focus on dock close (e.g. cmd-d on the last terminal in
the dock)
* Removed element stateless focus API since it would not work when the
element is not rendered, update all API usages to the stateful one via
`gpui::Subscription`
Release Notes:
- N/A
2023-12-12 17:26:39 +02:00
Kirill Bulatov
0140bb862e
Fix the tests
...
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-12 17:19:12 +02:00
Kirill Bulatov
ca8e8d1065
Finish removing all dangerous focus APIs
2023-12-12 16:11:14 +02:00
Antonio Scandurra
6159a59534
Fix assertions now that we use different hash functions
2023-12-12 14:59:51 +01:00
Kirill Bulatov
2cde1a2e15
Re-focus window on workspace on corresponding window blur
...
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-12 15:36:20 +02:00
Kirill Bulatov
717b2885f8
Attempt to remove the dangeous element focus API
2023-12-12 15:07:27 +02:00
Antonio Scandurra
43b8d65fee
Transfer focus to the workspace when window focus is lost
2023-12-12 15:07:27 +02:00
Antonio Scandurra
b871f906d6
Use FxHashMap
and FxHashSet
in hot code paths
...
We can also use these maps and sets in place of `SeaHasher` because
they are also deterministic. Note that we're not swapping std's
`HashMap` and `HashSet` wholesale inside of `collections` because
on the server we need cryptographically secure collections.
2023-12-12 13:35:22 +01:00
Antonio Scandurra
385c830bef
Make each DispatchNode smaller by allocating more
2023-12-12 13:16:09 +01:00
Antonio Scandurra
f312c58b30
Reduce the stack size of Interactivity
at the cost of more allocations
2023-12-12 11:57:44 +01:00
Antonio Scandurra
e7094cc98d
Don't move interactivity
unnecessarily during layout
2023-12-12 09:43:33 +01:00
Max Brunsfeld
6f5b1064ee
Fix detection of topmost region under the dragged item
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-12-11 16:50:44 -08:00
Conrad Irwin
149e90c3d9
vim2 ( #3597 )
...
- MOAR TESTS
[[PR Description]]
Release Notes:
- N/A
2023-12-11 16:42:03 -07:00
Conrad Irwin
d12eb0581a
vim2 ( #3594 )
...
- First round of vim tests
Add `observe_keystrokes` back to gpui2
Allow multiple actions to match a given key event
[[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-11 15:06:51 -07:00
Conrad Irwin
1e89092d62
MOAR TESTS
2023-12-11 15:06:33 -07:00
Mikayla Maki
927d18b0f3
Add support for resizing splits and docks, as well as utilities ( #3595 )
...
Making this PR to upstream changes to util and GPUI2, resizing exists
but isn't working yet.
Release Notes:
- N/A
2023-12-11 13:32:06 -08:00
Mikayla
f03c0f6e63
Add double click handling
2023-12-11 13:17:42 -08:00
Conrad Irwin
d1805d8ada
First round of vim tests
2023-12-11 14:16:25 -07:00
Max Brunsfeld
fdcb413e33
Fix unused field warning
2023-12-11 12:56:18 -08:00
Max Brunsfeld
fbfe108317
Avoid double borrow in tests by drawing windows explicitly in flush_effects
...
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-11 12:37:10 -08:00
Antonio Scandurra
9b94f1483a
Redraw the window at the end of flush_effects
in tests
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-11 20:10:27 +01:00
Antonio Scandurra
f1ebad22db
Defer drawing the scene until macOS's display_layer
callback
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-11 19:55:55 +01:00
Mikayla
3198eb6c6d
Merge branch 'main' into splits
2023-12-11 10:16:32 -08:00
Antonio Scandurra
76cea3e7e8
Fire click event only when using left button ( #3584 )
...
Release Notes:
- N/A
2023-12-11 18:00:13 +01:00
Conrad Irwin
d678efe7dd
Fix some action registrations
2023-12-11 09:29:10 -07:00
Antonio Scandurra
0b7072bf67
Fire click event only when using left button
2023-12-11 16:20:46 +01:00
Conrad Irwin
c5367e3085
Correct docs re:Debug
2023-12-10 19:52:17 -07:00
Conrad Irwin
9ce7395b74
Restore impl_actions! and remove derive(Action)
2023-12-10 19:33:38 -07:00
Conrad Irwin
4290c67b6a
Restore namespace parameter to actions!
...
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.
2023-12-09 15:18:31 -07:00
Mikayla
fd34d1da31
Add back semi-funcitonal pane resizing code
2023-12-08 16:29:42 -08:00
Max Brunsfeld
fce0c1f4d0
Dedup actions in WindowContext::available_actions
2023-12-08 13:02:14 -08:00
Max Brunsfeld
c739906413
Make chat message list fill the available space
2023-12-08 12:31:07 -08:00
Max Brunsfeld
c7d8169cab
Get the chat panel wired up again
2023-12-08 12:31:07 -08:00
Nathan Sobo
213ed2028c
Get more of chat panel compiling, but lots of todos
2023-12-08 12:31:07 -08:00
Max Brunsfeld
6955579f19
Start work on chat panel and non-uniform list
...
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-08 12:30:49 -08:00
Joseph T. Lyons
f4c93abad5
🚧 Feedback modal UI 🚧 ( #3536 )
...
[[PR Description]]
TODO:
- [x] Add placeholder text to editor
- [x] Add external link icon to "Community repo" button
- [x] Show `not-allowed` cursor for disabled buttons
- [ ] Add `Headline` ui component
- [ ] Finish UI pass
- [ ] Fix `IconPosition` on button (should swap the icon side)
- [ ] Add conditional tooltip for disabled "Send feedback" button.
- [ ] Add common/top feedback link.
- [ ] Add `vw`/`vh` units to allow sizing the modal based on viewport
size.
Release Notes:
- N/A
2023-12-08 13:30:42 -05:00
Mikayla
25df11dd26
Begin porting the PaneAxis element
2023-12-07 17:16:19 -08:00
Max Brunsfeld
282e4398a0
In titlebar, render followers and allow following people
2023-12-07 13:09:18 -08:00
Joseph T. Lyons
439df24526
Merge branch 'main' into feedback-modal-ui
2023-12-07 12:58:53 -05:00
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