Commit Graph
109 Commits
Author SHA1 Message Date
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
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
Conrad Irwin 63b65b2b2e Dismiss tooltips at capture
(Otherwise they stay open when you hover over the editor, which
stops mouse move events propagating)
2023-12-01 23:51:06 -07:00
Conrad Irwin 4fbbb28da2 Restore logical offset preservation behaviour 2023-11-29 23:51:31 -07:00
Conrad Irwin 54cfcef0aa Keybaord shortcut context menu 2023-11-29 23:04:33 -07:00
Conrad Irwin a37f86f294 Scroll the collab panel when keyboard focusing 2023-11-29 22:39:15 -07:00
Conrad Irwin 8638fc4149 Add a ScrollHandle to gpui2 for the collab panel 2023-11-29 22:20:06 -07:00
Conrad IrwinandMax 7e5aa5ce77 More drag'n'drop fixes
Co-Authored-By: Max <max@zed.dev>
2023-11-29 12:35:25 -07:00
Conrad Irwin a761e6ca0e More mouse occlusion work 2023-11-28 09:59:58 -07:00
Conrad Irwin ca0dcf741f Use layers to correct mouse event handling too 2023-11-28 00:07:26 -07:00
Conrad Irwin 17b5f9294c Fix hover state when element is occluded 2023-11-27 23:18:25 -07:00
Nathan Sobo c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Mikayla 6985b70859 fix gpui2 2023-11-20 11:55:27 -08:00
Conrad Irwin 25ed7c57c1 WIP 2023-11-20 12:34:08 -07:00
Conrad Irwin d0dd44faad Merge branch 'main' into callback-handles 2023-11-20 12:21:42 -07:00
Conrad Irwin 0798cfd58c Merge branch 'main' into derive-element-redux 2023-11-20 09:15:38 -07:00
Mikayla 88024ca7c9 Remove V parameter on elements 2023-11-19 18:32:31 -08:00