Nathan Sobo
fb3382bcc5
Merge remote-tracking branch 'origin/main' into perf-2
2023-12-14 14:16:59 -07:00
Nathan Sobo
0dd6c50a20
Use FxHashMap for element state
2023-12-14 14:06:19 -07:00
Nathan Sobo
3d1dae9a06
Make z_indices bigger in StackingOrder
2023-12-14 11:37:48 -07:00
Nathan Sobo
0d30b698a4
Don't allocate interactive bounds
2023-12-14 11:28:52 -07:00
Nathan Sobo
1ae25f52a1
WIP
2023-12-14 10:31:45 -07:00
Conrad Irwin
c2c7eead8a
Robustify checks for visibility
2023-12-14 10:02:54 -07:00
Conrad Irwin
17a80ca09b
Ignore invisible layers for mouse events
2023-12-14 09:44:04 -07:00
Nathan Sobo
6f17cf7337
WIP
2023-12-14 09:25:14 -07:00
Mikayla
53b1948c44
Remove inconsistency with how GPUI used to handle these events
2023-12-13 18:32:42 -08:00
Mikayla
d88fc27b79
Merge branch 'main' into fix-splits-bugs
2023-12-13 18:29:48 -08:00
Mikayla
0dd84924e4
add cmd-click-to-jump-to-element
2023-12-13 18:19:25 -08:00
Nathan Sobo
c863227dc2
Log frame timings
2023-12-13 18:44:21 -07:00
Max Brunsfeld
9059d70153
Ensure only top layer is styled with drag over style
2023-12-13 17:07:23 -08:00
Mikayla
a4024b297e
Add interactive debug info
2023-12-13 17:03:56 -08:00
Mikayla
04389939d3
Add debug and debug below methods for observing the bounds of divs
2023-12-13 16:47:55 -08:00
Nathan Sobo
1e4a7e6ef1
Don't notify when drawing
2023-12-13 16:05:34 -07:00
Mikayla
a807e798ec
Add new drag API
2023-12-13 13:40:19 -08:00
Max Brunsfeld
26a31b41b9
frame time
2023-12-13 14:22:34 -07:00
Mikayla
bfbbec0b01
Add fluent quad API
2023-12-13 13:21:48 -08:00
Antonio Scandurra
06b9055e27
Clear last_order when building Scene
2023-12-13 22:02:30 +01:00
Antonio Scandurra
801125974a
Optimize inserting lots of primitives with the same StackingOrder
2023-12-13 15:32:32 +01:00
Antonio Scandurra
13c064186a
Fix regressions in focus and active support ( #3622 )
...
Release Notes:
- N/A
2023-12-13 11:31:37 +01:00
Antonio Scandurra
d147db1db9
Don't mark interactive element as active if default prevented
2023-12-13 11:23:05 +01:00
Antonio Scandurra
5018072203
Automatically transfer focus on mouse down in Interactivity::paint
2023-12-13 09:57:18 +01:00
Conrad Irwin
19e842b860
fix overlay positions ( #3621 )
...
- Fix typo in overlay positioning code
- Make overlay positioning more robust
Release Notes:
- N/A
2023-12-12 22:13:56 -07:00
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
Max Brunsfeld
6362221363
Scroll the tab bar to show the active tab
...
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-12-12 15:42:33 -08:00
Max Brunsfeld
a579713a45
Allow dragging and dropping tabs
...
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-12-12 15:07:03 -08:00
Max Brunsfeld
a4a501603e
Start work on dragging tabs
2023-12-12 15:04:49 -08:00
Antonio Scandurra
e53b9f5ccf
Fix Div::active not working
...
Somehow a condition got inverted and caused the bug.
2023-12-12 17:40:22 +01:00
Antonio Scandurra
35670368a5
Remove focus_listeners
from Interactive
...
We're not using these anymore.
2023-12-12 17:39:07 +01: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