Commit graph

991 commits

Author SHA1 Message Date
Nathan Sobo
3e0d0e5c01 WIP 2023-08-07 13:54:47 -06:00
Nathan Sobo
d4d32611fe WIP 2023-08-06 18:57:02 -06:00
Nathan Sobo
adc50469ff WIP 2023-08-06 12:45:31 -06:00
Nathan Sobo
dcf8b00656 WIP 2023-08-05 18:00:44 -06:00
Nathan Sobo
2d96388be3 Use WindowHandles in a couple places 2023-08-03 17:46:34 -06:00
Nathan Sobo
485c0a482e Don't refcount window handles 2023-08-03 17:11:47 -06:00
Nathan Sobo
afcc0d621b WIP 2023-08-03 17:03:39 -06:00
Nathan Sobo
3c938a7377 WIP 2023-08-03 08:10:16 -06:00
Nathan Sobo
8e36da1382 Get tests passing 2023-08-02 15:02:55 -06:00
Nathan Sobo
884cee6dfd Get tests compiling returning WindowHandle<V: View> from add_window 2023-08-02 14:05:03 -06:00
Nathan Sobo
60e190e500 WIP 2023-08-02 12:08:56 -06:00
Nathan Sobo
300ce61bd0 WIP 2023-08-02 08:25:40 -06:00
Nathan Sobo
b695c42e11 WIP: Return WindowHandle<V: View> from AppContext::add_window 2023-08-01 22:28:04 -06:00
Kirill Bulatov
646dabe113 Add buffer search history 2023-08-01 01:31:28 +03:00
Mikayla Maki
354c020612
Block extra drag events in original drag handlers 2023-07-26 14:57:46 -07:00
Mikayla Maki
a58c9ed7d3
fmt 2023-07-26 09:39:35 -07:00
Mikayla Maki
429a2fc623
Add drag end events
Fix left dragging cascade
WIP: Implement right dragging, WIP: use drag end events to set and reset state around initial flex orientation
2023-07-23 13:28:30 -07:00
Julia
0b6155609d
In macOS platform layer map a ctrl-click to a right click (#2755)
Maps a ctrl left down event into a ctrl-less right down and then up pair
and filters out ctrl left up. Hopefully this ensures that mouse down/up
events remain balanced and somewhat matching.

Release Notes:
- Added the ability to ctrl-click in place of right click to summon
context menus
([#1150](https://github.com/zed-industries/community/issues/1150)).
2023-07-20 14:54:55 -04:00
Kirill Bulatov
a5e63fbf77 Properly display keybindings in context menus 2023-07-20 12:18:04 +03:00
Julia
2e3aa703d9 In macOS platform layer map a ctrl-click to a right click 2023-07-19 15:43:45 -04:00
Kirill Bulatov
a4bf19c5bd Simplify NoAction filtering logic
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-17 20:42:35 +03:00
Kirill Bulatov
4cc06748c9 Ignore keybindings with NoAction in config overrides 2023-07-17 18:34:39 +03:00
Kirill Bulatov
eaa8224076 Use id instead of type_id for actions
Currently, both are the same thing, so the logic is not changed.
2023-07-17 12:24:56 +03:00
Mikayla Maki
26b9be628e
Add the math for pane resizing 2023-07-12 22:35:51 -07:00
Antonio Scandurra
318deed25b Skip key down event if preceded by its key equivalent version
Previously, we would only track whether the previous key down event
was a key equivalent. However, this could cause issues when pressing
certain keystrokes in rapid succession, e.g.:

- Pressing `shift-right` (to select a character)
- Pressing a character (with or without `shift` held down)

This would cause GPUI to ignore the second event because it was
preceded by a key equivalent event. With this commit, we track the
last key equivalent event, and skip the key down event only if it
matches the last key equivalent event.
2023-07-07 12:02:08 +02:00
Nate Butler
76873c508a
Z-2276/Z-2275: Project & Branch switchers (#2662)
This PR adds project and branch switchers in top left corner. 

Release Notes:
- Added a project & branch switcher under project name.
2023-07-05 13:09:40 -04:00
Piotr Osiewicz
85add260f6 Track regions instead of clicks.
Get rid of superfluous params in RenderParams related to hover & click state.

Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 16:48:52 +02:00
Piotr Osiewicz
cc88bff1ff Fix click-through behaviour of git panel
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 15:25:33 +02:00
Antonio Scandurra
25564ea058 Introduce a WindowContext::focus method that implies the window id 2023-07-05 09:39:04 +02:00
Kirill Bulatov
4c51ab8a25 Accept null as a valid action, to disable a keystroke
co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-07-04 21:11:28 +03:00
Mikayla Maki
6ffa6afd20
fmt 2023-06-28 16:35:57 -07:00
Mikayla Maki
e0d618862c
Add click out handler
Make all context menus on button click toggles instead of re-shows
2023-06-28 16:23:07 -07:00
Mikayla Maki
18dd3102bf
WIP: Add click out event to fix context menus 2023-06-28 09:29:49 -07:00
Mikayla Maki
ce52d90a9d
Collab UI v2 (#2618)
This PR implements
https://www.figma.com/file/pLq7dvhx2mFeWFOedXpUQ5/Project-%E2%80%93-Collaboration-UI?type=design&node-id=666%3A8610&t=XFGk6KEtTCFXBvCQ-1

Release notes:
- [x] Redesigned collaboration UI
- [x] Added voice support
2023-06-28 09:14:39 -07:00
Nathan Sobo
8f8a99d788 Bind cmd-? to assistant::toggle_focus
Bypass system help menu shortcut at the app delegate level to achieve this.

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-28 11:43:24 +02:00
Piotr Osiewicz
625814d30a Merge branch 'main' into collab-titlebar-2 2023-06-27 15:40:43 +02:00
Antonio Scandurra
edc7f30660 Add assistant icons to the toolbar
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-06-26 16:49:33 +02:00
Antonio Scandurra
00e37bc2a2 Merge remote-tracking branch 'origin/main' into save-conversations 2023-06-26 15:59:19 +02:00
Nathan Sobo
bede668b14 Add a derive macro for Element
To turn any struct into a composite element, you can implement a render method
with the following signature:

fn render<V: View>(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> AnyElement<V>;

Then add #[derive(Element)] to the struct definition.

This will make it easier to introduce higher-level components that are expressed in
terms of other elements.
2023-06-25 07:51:50 -06:00
Antonio Scandurra
ed88f52619 Remove double constrained call 2023-06-23 09:23:52 +02:00
Antonio Scandurra
6f0efec146 Merge remote-tracking branch 'origin/main' into save-conversations 2023-06-23 09:09:42 +02:00
Piotr Osiewicz
b430be5bc6 cargo fmt 2023-06-22 17:59:56 +02:00
Piotr Osiewicz
af252888c4 Merge branch 'main' into sergey/z-2308-create-a-proof-of-concept-of-exporting-a-type-from-rust-and 2023-06-22 17:58:56 +02:00
Piotr Osiewicz
76366422a6 Merge branch 'main' into collab-titlebar-2 2023-06-22 13:48:16 +02:00
Nathan Sobo
3a61fd503f WIP: Trying to display the toolbar but tired. May be worth discarding this. 2023-06-20 20:11:37 -06:00
Mikayla Maki
cf4251fb55
Fix deafened -> enabled mistranslation
Fix mislocation of caller query in detach_and_log_error
Fix incorrect wording on livekit integration
Add share_mic action for manually enabling the microphone
Make mic sharing wait until the room has been fully established
2023-06-20 15:17:49 -07:00
Mikayla Maki
dbd95e35cf
fmt 2023-06-20 12:36:36 -07:00
Mikayla Maki
b828a74ad6
Add deafen controls 2023-06-20 12:34:32 -07:00
Nathan Sobo
03993ea719
Rename SumTree::push_tree to ::append (#2626)
This is something I've been meaning to rename in SumTree. Was looking at
the code and figure why not now.
2023-06-20 08:37:55 -06:00
Julia
dc07b60e40 Avoid assigning NSCursor style when it already is that style
This avoids a high cost which appears to be the system rasterizing the
cursor every time we call this, fixes a slowdown when scrolling rapidly
while mouse motion continually attempted to assign the style

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-06-20 09:31:30 -04:00