Commit Graph
124 Commits
Author SHA1 Message Date
Mikayla Maki 05cb68eff1 Merge branch 'main' into perf-2 2023-12-14 16:39:10 -08:00
Mikayla Maki 8418f25d0a Merge branch 'main' into perf-2 2023-12-14 16:25:40 -08:00
Max Brunsfeld d6383ab0c6 Fix stickiness of main pane drag target
Reimplement the pane drag targets using on_drag_move
2023-12-14 16:23:15 -08:00
Mikayla Maki 0b4b81fa0c Fix dock resizing (#3663)
This fixes some bugs in the display and tracking of dock resizes

Release Notes:

-
2023-12-14 16:20:29 -08:00
Nathan Sobo f4a954db4f Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 17:15:44 -07:00
Nathan Sobo 02606d1fb9 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 16:56:36 -07:00
Marshall Bowers bc3e6649f8 Fix warning in release mode (#3662)
This PR fixes a warning that was present in release mode, which was
preventing the nightly builds from running:

```
error: variable does not need to be mutable
   --> crates/gpui2/src/elements/div.rs:547:9
    |
547 |     let mut div = Div {
    |         ----^^^
    |         |
    |         help: remove this `mut`
    |
    = note: `-D unused-mut` implied by `-D warnings`
```

Release Notes:

- N/A
2023-12-14 18:52:14 -05:00
Mikaylaandconrad 4c63c74f92 Fix bug in drag move dispatch
co-authored-by: conrad <conrad@zed.dev>
2023-12-14 15:23:24 -08:00
Nathan Sobo d13a21c238 Don't move in paint 2023-12-14 15:15:18 -07:00
Max Brunsfeld 8d994ce8c5 Enable dragging from project panel to panes (#3658)
Rework gpui2 drag API so that receivers need not specify the dragged
view type.
2023-12-14 13:32:40 -08:00
8791f7cefc Enable dragging from project panel to panes
Rework gpui2 drag API so that receivers need not specify the dragged view type.

co-authored-by: Max <max@zed.dev>
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:20:48 -08:00
Nathan Sobo fb3382bcc5 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 14:16:59 -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 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
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
Mikayla a807e798ec Add new drag API 2023-12-13 13:40:19 -08: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
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
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
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 ca8e8d1065 Finish removing all dangerous focus APIs 2023-12-12 16:11:14 +02:00
Kirill Bulatov 717b2885f8 Attempt to remove the dangeous element focus API 2023-12-12 15:07:27 +02: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 BrunsfeldandMikayla 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
Mikayla 3198eb6c6d Merge branch 'main' into splits 2023-12-11 10:16:32 -08:00
Antonio Scandurra 0b7072bf67 Fire click event only when using left button 2023-12-11 16:20:46 +01:00
Mikayla fd34d1da31 Add back semi-funcitonal pane resizing code 2023-12-08 16:29:42 -08:00
Mikayla 22cd62213b Tear out drag event listener 2023-12-06 16:22:25 -08:00
Mikayla fd31e429f5 Merge branch 'main' into terminal-element 2023-12-06 15:20:04 -08:00
MikaylaandNathan 12e7f61f62 Fix a porting bugs for terminal2
co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 15:11:49 -08:00
Piotr OsiewiczandAntonio 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
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
Mikayla ab140ee4c2 Add event based drag API to GPUI, continue binding mouse handlers to terminal 2023-12-05 12:07:17 -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