Commit Graph
100 Commits
Author SHA1 Message Date
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 e91ecec8cd fix modal exchange (#3620)
- Fix opening GoToLine from Command
- Extend test to cover go_to_line behavior too

Release Notes:

- N/A
2023-12-12 21:30:34 -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
Conrad Irwin 979db25e91 Extend test to cover go_to_line behavior too
(It's also been broken and fixed a few times along the way)
2023-12-12 20:53:54 -07:00
Conrad Irwin a2f0accb74 Fix opening GoToLine from Command
This was broken because of the async hop introduced by should_dismiss.

Change that API to instead be syncronous, and require that implementors
(of which there is only one) to call dismiss again if they want to.
2023-12-12 20:46:27 -07:00
Conrad Irwin c94c6614ed vim2 (#3619)
Fix vim command tests by restoring the spawn in command palette's
confirm


Release Notes:

- N/A
2023-12-12 19:40:54 -07:00
Conrad Irwin 630997db28 And restore the command palette spawn behaviour 2023-12-12 19:27:09 -07:00
Conrad Irwin b65129437f vim2 (#3618)
- Uncomment editor event tests
- Uncomment vim search tests

Just command left

Release Notes:

- N/A
2023-12-12 19:19:08 -07:00
Conrad Irwin 1a86e4ff96 Fix vim toggle on welcome 2023-12-12 19:03:54 -07:00
Conrad Irwin a9349267ec hah, oops 2023-12-12 18:54:35 -07:00
Conrad Irwin a656d11fed Fix vim2 search tests 2023-12-12 18:39:42 -07:00
Conrad Irwin 3088cbea68 Uncomment vim search tests 2023-12-12 15:29:17 -07:00
Conrad Irwin c43969eaed Uncomment editor event tests 2023-12-12 15:29:10 -07:00
Conrad Irwin 149e90c3d9 vim2 (#3597)
- MOAR TESTS

[[PR Description]]

Release Notes:

- N/A
2023-12-11 16:42:03 -07:00
Conrad Irwin 3779316e4e Fix scroll tests
For some reason in gpui2, the window contains an extra 59px of space..
2023-12-11 16:12:17 -07:00
Conrad Irwin 2d59492aac Most tests now... 2023-12-11 15:25:30 -07:00
Conrad Irwin e37173fe97 And some more 2023-12-11 15:14:13 -07:00
Conrad Irwin 3baf125f4a All the easy tests? 2023-12-11 15:13:11 -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
Conrad Irwin 303189e086 Fix warnings 2023-12-11 14:54:58 -07:00
Conrad Irwin 4942b1962b Moar tests 2023-12-11 14:21:21 -07:00
Conrad Irwin d1805d8ada First round of vim tests 2023-12-11 14:16:25 -07:00
Conrad Irwin fcbc18a380 vim-flight entertainment (#3574)
- vim2 compiling (but mostly commented out)
- More code written, similar lack of workingness so far

Still todo:
[ ] Figure out the focus/blur stuff
[ ] Uncoment more code
[ ] Fix VimTestContext
[ ] Uncomment the tests

Release Notes:

- N/A
2023-12-11 12:11:13 -07:00
Conrad Irwin f35453caad COmment out tests again for now 2023-12-11 11:40:54 -07:00
Conrad Irwin 8ed642dc16 Clear out easy todo!()s 2023-12-11 11:00:55 -07:00
Conrad Irwin dd42adc4e5 Remove warnigns 2023-12-11 10:45:27 -07:00
Conrad Irwin af7c93b8d5 Merge branch 'main' into vim2 2023-12-11 10:19:18 -07:00
Conrad Irwin c97c9f98c0 Revert actions! changes 2023-12-11 10:19:03 -07:00
Conrad Irwin 59d0feafc5 actions3 (#3586)
- Fix action registrations

Release Notes:

- N/A
2023-12-11 09:48:57 -07:00
Conrad Irwin b66b4915cf Merge branch 'main' into vim2 2023-12-11 09:38:23 -07:00
Conrad Irwin d678efe7dd Fix some action registrations 2023-12-11 09:29:10 -07:00
Conrad Irwin cea26c9d10 actions3 (#3578)
- Restore impl_actions! and remove derive(Action)

Originally in gpui2 we inferred the action's namespace from the module
it was
defined in. This worked most of the time (ignoring the "remove_the_2"
hack),
but caused unintended (and mostly invisible) behavior in crates with
multiple
modules.

#3577 restored the namespace parameter to actions!, and this PR
reintroduces
`impl_actions!` to do the same for non-unit structs.

I considered trying to keep the struct-attribute API work, because it
does feel
more stylistically appropriate for rust, but two problems lead to it
feeling less good than `impl_actions!` in practice:
1. You have to repeat the namespace for each struct (and usually you're
defining them all in the same namespace)
2. You can't pass an argument to a derive macro inline, you need to use
an attribute instead.


Release Notes:

- N/A
2023-12-10 19:59:53 -07: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 62d6a85a71 Restore namespace parameter to actions! (#3577)
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.

Although automatically deriving the namespace worked in many situations,
it was
unclear what to do with nested modules. Vim wanted all actions to be
registered
under vim, while collab_ui wanted one namespace per action.

It seems better to make the implicit explicit, and give the flexibility
to hide
implementation details from the end-users.

Release Notes:

- N/A
2023-12-09 15:27:17 -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
Conrad Irwin a4ea7bf928 More code written, similar lack of workingness so far 2023-12-08 17:45:17 -07:00
Conrad Irwin 32837d67be vim2 compiling (but mostly commented out) 2023-12-08 18:47:14 +00:00
Conrad Irwin 45992b0d63 Fix project panel context menu (#3495)
Release Notes:

- N/A
2023-12-05 00:51:07 +00:00
Conrad Irwin 9162f299a7 Fix project panel context menu 2023-12-05 00:41:00 +00: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 1c9b984738 Remove cx param 2023-12-04 23:35:31 +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
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
Conrad Irwin aa3c9b8568 In-flight entertainment (#3484)
- +language_selector2
- Language Selector 2 working!
- Prevent languages showing in wrong order first
- copilot_menu2 (though only tested offling, which is insufficient)
- Dismiss tooltips at capture
- Get ChannelModal opening

[[PR Description]]

Release Notes:

-  N/A
2023-12-03 13:06:29 -07:00
Conrad Irwin 859f2d2862 Get ChannelModal opening 2023-12-02 00:57:41 -07: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 1da18ebe9a copilot_menu2 (though only tested offling, which is insufficient) 2023-12-01 23:43:02 -07:00
Conrad Irwin 6426997abb Prevent languages showing in wrong order first 2023-12-01 21:26:23 -07:00
Conrad Irwin 6a5b5f022d Language Selector 2 working! 2023-12-01 21:23:20 -07:00
Conrad Irwin 2de6758443 +language_selector2 2023-12-01 21:23:20 -07:00
Conrad Irwin 0441b4805a Show cursor position in status bar (#3464)
Passes the compiler so it must work!

(though it doesn't show up until we fix pane focus)

Release Notes:

- N/A
2023-11-30 16:40:42 -07:00
Conrad Irwin e1c8369b3d Rename menu_handle to right_click_menu and child to trigger
This makes things more in-line with `popover_menu`.
2023-11-30 16:39:43 -07:00
Conrad Irwin ebbbeca9a6 Flesh out a popover control 2023-11-30 16:13:44 -07:00
Conrad Irwin 75afb65b26 Show cursor position in status bar 2023-11-30 10:16:24 -07:00
Conrad Irwin 02174084ca Collab panel2: Now with scrolling and keyboard (#3455)
Also introducing: .track_scroll() for non-uniform lists.

Release Notes:

- N/A
2023-11-30 00:13:52 -07:00
Conrad Irwin 90b8acfb34 Allow toggling subchannel visiblity without joining channel 2023-11-29 23:55:14 -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 Irwin 012543052b Add filtering support 2023-11-29 20:58:15 -07:00
Conrad Irwin 481e42ade9 collab panel2 (#3447)
[[PR Description]]

Release Notes:

- N/A
2023-11-29 16:38:35 -07:00
Conrad Irwin 4c27f4453c Merge branch 'main' into collab-panel2 2023-11-29 16:32:25 -07:00
Conrad Irwin cd60d466b1 Merge branch 'main' into collab-panel2 2023-11-29 15:40:16 -07:00
Conrad Irwin 0eef4d03ed Scrollyscrolly 2023-11-29 15:30:50 -07:00
Conrad Irwin 4f040208c6 Fix mouse interaction on contact subsections 2023-11-29 15:26:19 -07:00
Conrad Irwin 3bdd51cb2a Availability indicators 2023-11-29 15:06:58 -07:00
Conrad Irwin 4ebae4d8bd Make LeftSlot take an element 2023-11-29 14:20:26 -07:00
Conrad Irwin fb377aed73 Context menu, Dragon Drop, for collab panel (#3441)
Release Notes:

- N/A
2023-11-29 13:40:46 -07:00
Conrad Irwin 6ab3825ab1 No moar toggleable 2023-11-29 13:25:29 -07:00
Conrad Irwin 87cf0cf5ac Merge branch 'main' into collab-panel2 2023-11-29 13:09:57 -07:00
Conrad Irwin 139708d486 Merge branch 'main' into collab-panel2 2023-11-29 12:37:29 -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 IrwinandMax e377bd805b Add channel drag'n'drop
Co-Authored-By: Max <max@zed.dev>
2023-11-29 12:24:04 -07:00
Conrad Irwin 41e7653906 Channel Context Menu 2023-11-29 11:39:26 -07:00
Conrad Irwin ee260a5e24 Progress 2023-11-29 11:06:24 -07:00
Conrad Irwin c23a610d52 Move padding on uniform list inside the scrollable area (#3437)
Release Notes:

- N/A
2023-11-29 10:43:04 -07:00
Conrad Irwin 35481e2c79 Move padding on uniform list inside the scrollable area 2023-11-29 10:05:31 -07:00
Conrad Irwin 5d59108b97 Inviting/Responding/Creating Channels... etc. (#3433)
Release Notes:

- n/a
2023-11-29 09:29:25 -07:00
Conrad Irwin 5fbc60d8da Inviting/Responding/Creating Channels... etc. 2023-11-28 22:47:04 -07:00
Conrad Irwin 396ecefa4f use the right click event for buttons (#3432)
Previously we used mouse down

Release Notes:

- N/A
2023-11-28 21:27:42 -07:00
Conrad Irwin 0d4839b973 use the right click event for buttons 2023-11-28 21:14:48 -07:00
Conrad Irwin 9e7a90a3d4 Fix stateful elements in Components (#3430)
No more wrapper divs for buttons

Release Notes:

- N/A
2023-11-28 20:59:58 -07:00
Conrad Irwin db5ded0252 Remove useless method
We need to move state from layout to paint in any case
2023-11-28 20:53:46 -07:00
Conrad Irwin 8d1518d70c Fix stateful elements in Components
Previously a component assumed its element was stateless, this was
incorrect!
2023-11-28 20:47:11 -07:00
Conrad Irwin 7677998470 Channel joining (#3428)
- Remove debugging
- Basic channel joining!

[[PR Description]]

Release Notes:

- N/A
2023-11-28 17:00:21 -07:00
Conrad Irwin 60ce75c34a Togglable channels, the greatest since sliced bread 2023-11-28 16:52:12 -07:00
Conrad Irwin 4c2348eb53 Fix tests, notify errors 2023-11-28 16:20:54 -07:00
Conrad Irwin af3fa4ec0b Basic channel joining! 2023-11-28 16:10:18 -07:00
Conrad Irwin 75891e83f3 Fix mouse events when element is occluded (#3417)
This commit adds a depth map to the frame so we can find the "top most"
opaque layer by stacking order for a given point.

This lets us determine whether the element being hovered was part of the
given layer in the previous frame, which fixes the hover issue.

Still to do:
* [ ] Fix up mouse events too (I tried this, but it's not working yet,
and I want to understand why)

Release Notes:

- N/A
2023-11-28 15:57:22 -07:00
Conrad Irwin b13638fa76 Remove debugging 2023-11-28 15:33:44 -07:00
Conrad Irwin 450f2bf6b6 More progress on collab panel (#3426)
Release Notes:

- n/a
2023-11-28 15:30:51 -07:00
Conrad Irwin a85e0db1f4 More progress on collab panel 2023-11-28 14:40:32 -07:00
Conrad Irwin 132ad5989c Add logged out collab panel (#3412)
Release Notes:

- N/A
2023-11-28 11:49:09 -07:00
Conrad Irwin 01d3432a40 Merge branch 'main' into collab-panel2 2023-11-28 11:40:58 -07:00
Conrad Irwin a761e6ca0e More mouse occlusion work 2023-11-28 09:59:58 -07:00