Commit graph

11740 commits

Author SHA1 Message Date
Mikayla
6730ff3624
Merge branch 'main' into terminal-element 2023-12-01 16:21:38 -08:00
Mikayla
b0f9144167
Compiling layout!
co-authored-by: Max <max@zed.dev>
2023-12-01 16:21:12 -08:00
Nathan Sobo
0edd89a92f Bind CloseWindow and Open actions on workspace
Co-Authored-By: Max <max@zed.dev>
2023-12-01 16:17:48 -07:00
Nathan Sobo
6f7995c150 Enable workspace::Open global action 2023-12-01 16:08:57 -07:00
Nate Butler
2bf48872b6 Progress on diagnostic multibuffer
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-01 16:53:09 -05:00
Nate Butler
03ebf0a5a9 Implement FixedWidth for all button types
[no-ci]

Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-01 16:20:39 -05:00
Max Brunsfeld
6b0457c52f Bump RPC protocol version in zed2 to match zed1 2023-12-01 13:08:45 -08:00
Piotr Osiewicz
d81fb3680e Uncomment copilot2 tests 2023-12-01 22:04:43 +01:00
Nate Butler
c07455efa7 Update path header style
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-01 15:53:17 -05:00
Max Brunsfeld
d85db44552 Fix retrieval of app version in auto_update2 2023-12-01 12:52:26 -08:00
Nate Butler
89aa6a3726 Re-add diagnostic headers 2023-12-01 15:30:01 -05:00
Nate Butler
f5679f98d6 Update diagnostics style 2023-12-01 14:52:17 -05:00
Piotr Osiewicz
be509a5ce0 test_clipboard 2023-12-01 20:50:30 +01:00
Max Brunsfeld
5dd9db3607 collab 0.29.1 2023-12-01 11:50:05 -08:00
Max Brunsfeld
aace0d816d
Prevent moving a channel into its descendant (#3480)
This fixes a bug where it was possible to put the channel tree into a
bad state by accidentally dragging a channel into itself or one of its
descendants.
2023-12-01 11:47:39 -08:00
Max Brunsfeld
4479628342 Prevent moving a channel into its descendant 2023-12-01 11:41:38 -08:00
Piotr Osiewicz
0a1765b01f test_following_with_multiple_excerpts (passes) 2023-12-01 20:32:12 +01:00
Marshall Bowers
c3e7732eab
Add support for optional icon to Button (#3479)
This PR extends `Button` with support for an optional icon to be
displayed next to the label.

As part of this, the functionality for displaying an icon within a
button has been factored out into an internal `ButtonIcon` component.
`ButtonIcon` is now used by both `IconButton` and `Button` to
encapsulate the concerns of an icon that is rendered within a button.

Release Notes:

- N/A
2023-12-01 14:30:38 -05:00
Piotr Osiewicz
a985b7aab4 test_following (passes :)) 2023-12-01 20:25:47 +01:00
Piotr Osiewicz
20ae58eddd Bunch of new tests 2023-12-01 20:23:34 +01:00
Piotr Osiewicz
9408eecb6e test_navigation_history (pass) 2023-12-01 20:17:41 +01:00
Piotr Osiewicz
2ab84b81da test_edit_events 2023-12-01 20:16:40 +01:00
Piotr Osiewicz
e821e1fc35 Display map tests (3 flaky tests for chunks) 2023-12-01 20:14:14 +01:00
Piotr Osiewicz
237efc841e Another batch of tests 2023-12-01 19:39:53 +01:00
Marshall Bowers
4b23c5c658
Add selected_label to Button (#3478)
This PR adds a new `selected_label` method to `Button`.

This can be used to set a different label that should be rendered when
the `Button` is selected.

Release Notes:

- N/A
2023-12-01 13:29:11 -05:00
Piotr Osiewicz
1c52b936bc Uncomment flaky tests 2023-12-01 19:21:30 +01:00
Marshall Bowers
12b58f5b60 Add selected_icon to IconButton 2023-12-01 13:10:53 -05:00
Marshall Bowers
f09d9ef723 Clean up some ButtonLike doc comments 2023-12-01 13:09:35 -05:00
Piotr Osiewicz
53f3f960d2 Another batch of tests 2023-12-01 18:43:44 +01:00
Julia
6f9e08ceea Merge branch 'main' into zed2-breadcrumbs 2023-12-01 12:28:36 -05:00
Nate Butler
85d72f63c1
Add Tinted button style placeholder and document ButtonLike (#3476)
- Adds a placeholder `ButtonStyle::Tinted`.
  - Note: Using this now will just give you a block of `gpui::red()`
- Documents ButtonLike and ButtonStyle to hopefully help make choosing a
button style easier.

Release Notes:

- N/A
2023-12-01 12:18:35 -05:00
Piotr Osiewicz
4c4ec221af Uncomment a bunch of tests in the editor 2023-12-01 18:11:27 +01:00
Julia
910aeb4f56 I'm a dunce 2023-12-01 11:47:04 -05:00
Piotr Osiewicz
e0ccaa60ff editor tests: Reintroduce block_on_ticks.
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-01 17:24:47 +01:00
Piotr Osiewicz
a40a5fb212 Revert "editor tests: Reintroduce block_on_ticks."
This reverts commit aed11ee8cb.
2023-12-01 17:24:20 +01:00
Piotr Osiewicz
aed11ee8cb editor tests: Reintroduce block_on_ticks.
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-01 17:22:12 +01:00
Julia
13f4cc563c Merge branch 'main' into zed2-breadcrumbs 2023-12-01 11:02:34 -05:00
Nate Butler
ab75dbe7af Update collab_titlebar_item.rs 2023-12-01 10:52:11 -05:00
Nate Butler
88188b0c30 Merge branch 'main' into collab-ui-refinement 2023-12-01 10:50:25 -05:00
Julia
ce16e5b54a Unbreak toolbar layout & improve disabling ButtonLike 2023-12-01 10:33:44 -05:00
Antonio Scandurra
5fefc121bf Add mouse context menu to editor2
Co-Authored-By: Piotr <piotr@zed.dev>
2023-12-01 16:01:56 +01:00
Antonio Scandurra
f0c205be5d Respond to modifiers changed event in editor2 and set cursor 2023-12-01 14:26:49 +01:00
Antonio Scandurra
f0bc4a04bd Uncomment git gutter painting 2023-12-01 13:45:14 +01:00
Antonio Scandurra
1abc876c15 Merge remote-tracking branch 'origin/main' into no-more-todos-in-editor
# Conflicts:
#	crates/editor2/src/items.rs
2023-12-01 12:40:48 +01:00
Antonio Scandurra
8e4f2fb25a Remove all todos in Editor's Item implementation 2023-12-01 12:32:30 +01:00
Antonio Scandurra
faa896343b Register NewFile and NewFileInDirection from Editor 2023-12-01 12:11:54 +01:00
Antonio Scandurra
a8a5785ec5 Re-enable opening excerpts in Editor 2023-12-01 12:03:21 +01:00
Antonio Scandurra
c9be637b6b
Re-introduce auto-height in editor2 (#3471)
Release Notes:

- N/A
2023-12-01 12:02:45 +01:00
Antonio Scandurra
0b7e324d86 🔥 2023-12-01 11:53:47 +01:00
Antonio Scandurra
8c59a2d2c0 Delete commented out code for editor element 2023-12-01 11:52:40 +01:00
Antonio Scandurra
21d3ae603d Remove stray dbg statements 2023-12-01 11:49:25 +01:00
Antonio Scandurra
1b07fd6a70 Fix edits not being reported when rewrapping 2023-12-01 11:48:21 +01:00
Joseph T. Lyons
a75f1a4a95 Close feedback modal when clicking cancel 2023-11-30 22:07:10 -05:00
Joseph T. Lyons
eef6c3729e
Fix bug preventing spaces from being used in filename (#3454)
This bug was my fault, something I changed months ago to be more
consistent with VS Code - really strange that it took months for someone
to find out spaces couldn't be used in the project panel.

~I didn't apply this fix to zed2 because I dont think the facilities are
in place to do so (@maxbrunsfeld, @mikayla-maki, is there a system in
place for this that I missed?). I did leave a TODO.~

Fix is now in zed 2.

Release Notes:

- Fixed a bug where spaces could not be inserted when editing file names
in the project panel
([#2308](https://github.com/zed-industries/community/issues/2308)).
2023-11-30 21:44:48 -05:00
Joseph T. Lyons
9849a0a6d8 Move project panel's dispatch_context() to render() 2023-11-30 21:37:41 -05:00
Marshall Bowers
6d62e6c562
Respect label_color for Buttons (#3469)
This PR makes `Button`s respect the `label_color` that is specified,
provided they are not disabled or selected.

Release Notes:

- N/A
2023-11-30 20:36:59 -05: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
Max Brunsfeld
4f74d65d0c
Restore some workspace functionality, enable workspace tests (#3468)
* Pane history navigation
* Autosave on focus change
* Setting the window title based on the active path
2023-11-30 15:26:44 -08:00
Conrad Irwin
ebbbeca9a6 Flesh out a popover control 2023-11-30 16:13:44 -07:00
Max Brunsfeld
cb11c1282c Re-introduce active path tracking in workspace 2023-11-30 14:58:14 -08:00
Max Brunsfeld
a003a91212 Restore auto-save on focus change, re-enable workspace tests 2023-11-30 14:45:27 -08:00
Nate Butler
bac39e85a8
Add some text to clarify no api key state (#3462)
This PR is a quick-and-dirty approach to clarify what is happening when
a user doesn't have an API key so the assistant opens with the key
editor.

- Adds some text explaining how to close the panel
- Explains that other subscriptions don't cover the assistant, it needs
an api key.
- Helps people understand where to go to get an API key.

This is a Zed 1 change only, a bandaid. Zed 2 will have a better
solution: [Working
issue](https://github.com/zed-industries/zed/issues/3461)

Release Notes:

- N/A
2023-11-30 17:26:50 -05:00
Nate Butler
e228422f14 Update feedback modal UI
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
2023-11-30 16:42:58 -05:00
Nate Butler
8b7be8f614 Get feedback2 compiling
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-11-30 16:07:54 -05:00
Marshall Bowers
e5a5b1e84c
Rework ListHeader to be more open (#3467)
This PR reworks the `ListHeader` component to be more open.

The `meta` method can now be used to append meta items of any element to
the `ListHeader`, and they will be rendered with the appropriate spacing
between them.

Release Notes:

- N/A
2023-11-30 15:55:31 -05:00
Nate Butler
5098fafa02 Add v_stack and h_stack to the UI prelude
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-11-30 15:28:18 -05:00
Nate Butler
f987a640fd init feedback2
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com>
2023-11-30 15:23:42 -05:00
Max Brunsfeld
c63ca09eed Reintroduce pane navigation history in zed2 2023-11-30 12:10:25 -08:00
Nate Butler
164084c61c Update collab_titlebar_item.rs 2023-11-30 14:55:59 -05:00
Nate Butler
180ba42456 WIP update popover_menu 2023-11-30 14:54:44 -05:00
Joseph T. Lyons
f922ad9f7f Fix bug preventing spaces from being used in filename (zed2)
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-11-30 14:24:00 -05:00
Mikayla
39887be7d0
WIP: layout compiling 2023-11-30 11:01:36 -08:00
Julia
d516ae0d8a Pane context menus & focus shenanigans
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-30 14:01:09 -05:00
Marshall Bowers
3ffcb97da2
Implement Selectable for list components (#3465)
This PR implements the `Selectable` trait for the `ListItem` and
`ListHeader` components.

These components already had their own selectable behavior, but weren't
formally adhering to the interface defined by the trait.

Release Notes:

- N/A
2023-11-30 13:37:29 -05:00
Marshall Bowers
e78538e162 Implement Selectable for ListItem and ListHeader 2023-11-30 13:26:12 -05:00
Marshall Bowers
865baaa1a1 Remove unused GraphicSlot enum 2023-11-30 13:25:26 -05:00
Nate Butler
5fdfdb046c Remove unused import 2023-11-30 13:13:22 -05:00
Nate Butler
5eb89781e3 Clean up left side titlebar buttons 2023-11-30 13:11:20 -05:00
Mikayla Maki
b34b197d89
Update main.rs 2023-11-30 10:06:08 -08:00
Nate Butler
679851e349 Add render_project_name and render_project_branch
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-11-30 12:51:55 -05:00
Nate Butler
8d4652a4db Scaffold out render_project_owner
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-11-30 12:41:17 -05:00
Julia
21dfe58ad9 Missing return 2023-11-30 12:23:55 -05:00
Conrad Irwin
75afb65b26 Show cursor position in status bar 2023-11-30 10:16:24 -07:00
Marshall Bowers
0a8a84f656
Rename button-related enums (#3463)
This PR renames the `ButtonStyle2` and `ButtonSize2` enums to
`ButtonStyle` and `ButtonSize`, respectively.

Release Notes:

- N/A
2023-11-30 12:04:23 -05:00
Antonio Scandurra
0e1597d385 WIP 2023-11-30 18:00:41 +01:00
Julia
428c517693 Merge branch 'main' into zed2-breadcrumbs 2023-11-30 11:38:29 -05:00
Nate Butler
81098312ef Add some text to clarify no api key state
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
2023-11-30 11:20:51 -05:00
Antonio Scandurra
5243401afa Pass a WindowContext in request_measured_layout
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-11-30 17:12:40 +01:00
Julia
591299b4c7 Start getting pane focus code ported 2023-11-30 10:47:28 -05:00
Antonio Scandurra
d9b8c07b1e Lift Send and Sync restriction for measurements 2023-11-30 16:37:57 +01:00
Nate Butler
e20309f560 Update collab_titlebar_item.rs
[no ci]
2023-11-30 09:44:33 -05:00
Nate Butler
daf6201deb Start plugging selected states into collab ui 2023-11-30 09:35:37 -05:00
Kirill Bulatov
b64fe04803
Trim file_finder input queries (#3459)
Addresses a small bit of influencer's feedback

Release Notes:

- Fixed file finder query's whitespaces not being trimmed
2023-11-30 16:22:14 +02:00
Nate Butler
82b3efa16c Update collab button styles 2023-11-30 09:12:39 -05:00
Kirill Bulatov
1b39916438 Trim file_finder input queries 2023-11-30 16:05:45 +02:00
Kirill Bulatov
091d93533d Port to gpui2 2023-11-30 15:46:35 +02:00
Kirill Bulatov
69bfd47cf9 Exclude gitignored files' diagnostics from project panel and its indicator.
The diagnostics are collected and available still, since that might become a settings/UI toggle later.
Also, buffer diagnostics are still updated for gitignored files.
2023-11-30 15:46:30 +02:00
Kirill Bulatov
7b76db4b50
Fix TypeScript diagnostics (#3457)
Deals with https://github.com/zed-industries/community/issues/2124

* sends more ClientCapabilities LSP data, diagnostics capabilities in
particular: those are now required by typescript-language-server LSP to
start publishing diagnostics
* sends more parameters during eslint workspace initialization, so it is
able to correctly look up project's typescript config
Presumably, it's not enough and some convoluted project set ups may
break still, but let's wait for examples and feedback.

Release Notes:

- Fixed typescript-language-server diagnostics not appearing for newer
server versions; fixed eslint diagnostics using wrong directory for
typescript config lookup
2023-11-30 13:25:25 +02:00
Antonio Scandurra
fac029b808 Fix errors in theme2 2023-11-30 12:08:00 +01:00
Kirill Bulatov
f052329a6b Port to gpui2 2023-11-30 13:07:47 +02:00
Antonio Scandurra
d2c1897385 Fix error in tests 2023-11-30 11:45:10 +01:00
Kirill Bulatov
14993e0876 Declare more supported client capabilities 2023-11-30 12:22:23 +02:00
Antonio Scandurra
624ea58f2e Polish screen sharing 2023-11-30 11:22:01 +01:00
Antonio Scandurra
cc0bc444b1 Merge remote-tracking branch 'origin/main' into surfaces
# Conflicts:
#	crates/ui2/src/components/avatar.rs
2023-11-30 10:48:20 +01:00
Kirill Bulatov
f9cd45269a Fix eslint diagnostics by passing worktree root during workspace init 2023-11-30 11:38:16 +02: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
Nate Butler
92d2048aa4 WIP 2023-11-30 00:28:05 -05: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
Joseph T. Lyons
1a1451a943 Fix bug preventing spaces from being used in filename 2023-11-29 22:04:41 -05:00
Max Brunsfeld
e49325080c Implement activity indicator in zed2 2023-11-29 17:18:21 -08:00
Max Brunsfeld
c95a7c7387
Address some TODOs in editor2 crate (#3445)
* Fix crash when jumping to definition
* Enabling resolution of completions
* Make links in interactive text clickable
* Enable code paths that use `select_anchors`
2023-11-29 16:32:02 -08:00
Marshall Bowers
bda1dc7721
Use ButtonLike for breadcrumb (#3452)
This PR updates the (placeholder) breadcrumb to use the new `ButtonLike`
component.

Eventually this will need custom styling (e.g., syntax highlighting for
the symbol children), which is why we're using a `ButtonLike` as opposed
to a regular `Button`.

Release Notes:

- N/A
2023-11-29 19:21:34 -05:00
Marshall Bowers
9d53287341
Implement Selectable for buttons (#3451)
This PR implements the `Selectable` trait for `ButtonLike`, `Button`,
and `IconButton`.

Release Notes:

- N/A
2023-11-29 18:46:41 -05:00
Max Brunsfeld
27a6761afc Fix crash when jumping to a definition in the same buffer 2023-11-29 15:36:22 -08:00
Conrad Irwin
4c27f4453c Merge branch 'main' into collab-panel2 2023-11-29 16:32:25 -07:00
Marshall Bowers
04bbd107c1
Fix the selected state for the panel icons in the status bar (#3450)
This PR fixes a bug where the selected state for the panel icons in the
status bar was not correctly reflecting whether the panel was open.

It was erroneously using the `is_open` state for the context menu.

Release Notes:

- N/A
2023-11-29 18:20:08 -05:00
Marshall Bowers
b357ae4dc3
Add new Button and IconButton components (#3448)
This PR adds new `Button` and `IconButton` components built on top of
our new button abstractions.

Both of these buttons are built from the common `ButtonLike` base, and
implement the `ButtonCommon` (name TBD) trait in order to provide a
common interface.

There are still some visual tweaks that we'll need to make to the new
buttons, but those should be straightforward to make after we land this.

Release Notes:

- N/A
2023-11-29 17:41:44 -05: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
Max Brunsfeld
0b8f9067ff Implement highlighting of go-to-definition links 2023-11-29 14:30:31 -08:00
Conrad Irwin
4f040208c6 Fix mouse interaction on contact subsections 2023-11-29 15:26:19 -07:00
Max Brunsfeld
9451bd605d Implement completion-resolution in editor2
Enable the completion tests in editor2.
2023-11-29 14:20:47 -08: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
Marshall Bowers
df5de47a78
Make toggle method accept impl Into<Option<bool>> (#3446)
This PR makes the `toggle` method on the various list components accept
an `impl Into<Option<bool>>` instead of just an `Option<bool>`.

This allows a caller with just a `bool` avoid having to wrap the
`Option` themselves.

Release Notes:

- N/A
2023-11-29 16:13:41 -05:00
Max Brunsfeld
2bd428102b Use pointer cursor style for clickable ranges in InteractiveText 2023-11-29 12:42:09 -08:00
Max Brunsfeld
fc2251e7ed Implement SelectionsCollection::select_anchor_ranges 2023-11-29 12:41:22 -08:00
Conrad Irwin
fb377aed73
Context menu, Dragon Drop, for collab panel (#3441)
Release Notes:

- N/A
2023-11-29 13:40:46 -07:00
Marshall Bowers
d8ed7c0721
Move GraphicSlot out of components module (#3444)
This PR moves the `GraphicSlot` definition out of the `components`
module, as it doesn't contain a component.

Release Notes:

- N/A
2023-11-29 15:29:33 -05: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
Nate Butler
3c05d57e6a Style hover popover 2023-11-29 14:56:23 -05:00
Conrad Irwin
139708d486 Merge branch 'main' into collab-panel2 2023-11-29 12:37:29 -07:00
Conrad Irwin
7e5aa5ce77 More drag'n'drop fixes
Co-Authored-By: Max <max@zed.dev>
2023-11-29 12:35:25 -07:00
Marshall Bowers
e77846d2dc Rework Toggle into Toggleable and ToggleState 2023-11-29 14:33:52 -05:00
Conrad Irwin
e377bd805b Add channel drag'n'drop
Co-Authored-By: Max <max@zed.dev>
2023-11-29 12:24:04 -07:00
Marshall Bowers
6f5cc0af94 Rework Disclosure component 2023-11-29 14:07:48 -05:00
Conrad Irwin
41e7653906 Channel Context Menu 2023-11-29 11:39:26 -07:00
Marshall Bowers
c7b79c9aef Remove unnecessary constructor and Clone derives 2023-11-29 13:38:05 -05:00
Marshall Bowers
390b0d8d56 Reorganize list components 2023-11-29 13:34:50 -05:00
Conrad Irwin
ee260a5e24 Progress 2023-11-29 11:06:24 -07:00
Max Brunsfeld
960ef7116d
Add a context menu to the project panel (#3393)
This PR adds a context menu to the project panel in Zed2.

* [x] Allow the context menu to extend outside of the project panel's
bounds
* [x] Add keyboard shortcuts to the context menu
* [x] Dismiss the context menu
    * [x] when running an action
    * [x] when changing selection in the project panel

Release Notes:

NA
2023-11-29 10:04:41 -08:00
Marshall Bowers
3e2c517dd1
Add Disableable trait (#3439)
This PR adds a new `Disableable` trait to use for elements that are
capable of being disabled.

Release Notes:

- N/A
2023-11-29 13:01:26 -05:00
Max Brunsfeld
dbfc7d3555 Merge branch 'main' into project-panel-context-menu 2023-11-29 09:45:31 -08: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
Max Brunsfeld
233aac5573 Make DismissEvent a unit struct
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-29 09:42:54 -08:00
Marshall Bowers
043cef89eb
Remove unneeded wrapping divs in ListItem left content (#3438)
This PR removes some unneeded wrapping `div`s around the left content in
`ListItem`s.

Release Notes:

- N/A
2023-11-29 12:40:35 -05:00
Max Brunsfeld
ac34229118 Add keyboard control over context menus
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-29 09:39:20 -08:00
Marshall Bowers
912c30c05b Remove unneeded .clones 2023-11-29 12:35:39 -05:00
Marshall Bowers
97e6fd295a Remove unneeded wrapping divs in ListItem left content 2023-11-29 12:29:48 -05:00
Nate Butler
a8bf0834e6
Button2 – Part1 (#3420)
## TODO

- [x] Remove `InteractionState`
- [ ] `Selectable` should use `Selection` instead of a boolean
- [x] Clean out ui2 prelude
- [ ] Build out button2 button types
- [ ] Port old buttons

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-29 12:23:09 -05:00
Antonio Scandurra
a4035f15af WIP 2023-11-29 18:18:15 +01: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
Joseph T. Lyons
f735f5287e v0.116.x dev 2023-11-29 11:08:32 -05:00
Kirill Bulatov
d92153218c Log prettier installation start & success 2023-11-29 13:44:19 +02:00
Kirill Bulatov
3e3b64bb1c Fix the tests 2023-11-29 12:10:41 +02:00
Kirill Bulatov
3796e7eecb Port to gpui2 2023-11-29 11:52:26 +02:00
Kirill Bulatov
6e44f53ea1 Style fixes 2023-11-29 11:33:29 +02:00
Kirill Bulatov
f1314afe35 Simplify default prettier installation function 2023-11-29 10:58:22 +02:00
Kirill Bulatov
96f6b89508 Clear failed installation task when error threshold gets exceeded 2023-11-29 10:58:22 +02:00
Kirill Bulatov
acd1aec862 Properly determine default prettier plugins to install 2023-11-29 10:58:22 +02:00
Kirill Bulatov
64259e4a0b Properly increment installation attempts 2023-11-29 10:58:22 +02:00
Kirill Bulatov
43d28cc0c1 Ignore initialized LSP request in prettier wrapper 2023-11-29 10:58:22 +02:00
Kirill Bulatov
465e53ef41 Always install default prettier 2023-11-29 10:58:22 +02:00
Kirill Bulatov
46ac82f498 Do not attempt to run default prettier if it's not installed yet 2023-11-29 10:58:22 +02:00
Kirill Bulatov
938f2531c4 Always write prettier server file 2023-11-29 10:58:22 +02:00
Kirill Bulatov
eab3476304 Split prettier code off to a separate module 2023-11-29 10:58:22 +02:00
Kirill Bulatov
e7e56757dc Limit prettier installation and start attempts 2023-11-29 10:58:22 +02:00
Kirill Bulatov
c288c6eaf9 Use enum variants for prettier installation and startup phases 2023-11-29 10:58:22 +02:00
Kirill Bulatov
d010f5f98d Exctract the common code 2023-11-29 10:58:22 +02:00
Conrad Irwin
5fbc60d8da Inviting/Responding/Creating Channels... etc. 2023-11-28 22:47:04 -07:00
Conrad Irwin
0d4839b973 use the right click event for buttons 2023-11-28 21:14:48 -07:00
Marshall Bowers
e36c7dd301
Remove ID hack in ListItem (#3431)
This PR removes the ID hack in `ListItem`, since the underlying issue
was fixed in #3430.

Release Notes:

- N/A
2023-11-28 23:11:29 -05: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
Max Brunsfeld
77acba9e4c Right-align key bindings in context menus
Remove extra div in `List` that prevented list items from
filling the available space.

Co-authored-by: Marshall <marshall@zed.dev>
2023-11-28 17:23:49 -08:00
Mikayla Maki
fbe440250e
Restore welcome page (#3429)
Also restores the theme selector and base keymap selector. This does not
include a UI port.

Release Notes:

- N/A
2023-11-28 16:34:41 -08:00
Max Brunsfeld
6bf7ad71eb Show action key bindings in context menus 2023-11-28 16:07:42 -08: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
Mikayla
a41c857855
Merge branch 'main' into welcome2 2023-11-28 15:38:51 -08:00
Mikayla
ed8e62cd18
Restore welcome page and several pickers 2023-11-28 15:25:28 -08:00
Conrad Irwin
4c2348eb53 Fix tests, notify errors 2023-11-28 16:20:54 -07:00
Mikayla
d927c2f497
Implement all but the UI 2023-11-28 15:18:19 -08:00
Max Brunsfeld
bcf449d3fe Add a basic context menu to the project panel 2023-11-28 15:12:46 -08: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
Marshall Bowers
5666066db4 Merge branch 'main' into collab-panel2 2023-11-28 17:07:40 -05:00
Marshall Bowers
ee027bc112
Fix tooltips not showing on IconButtons (#3427)
This PR fixes tooltips not showing on `IconButton`s.

The "fix" here is the same hack that we used to fix `on_click` handlers
for `ListItem`s, where we introduce another layer of wrapping with an
element with an ID set.

This PR also adds a story for the `IconButton` so this issue can be
tested/observed in isolation.

Release Notes:

- N/A
2023-11-28 17:01:53 -05:00
Conrad Irwin
a85e0db1f4 More progress on collab panel 2023-11-28 14:40:32 -07:00
Marshall Bowers
8ee84249ec
storybook2: Unsuppress and fix warnings (#3425)
This PR unsupresses the warnings in `storybook2` and summarily fixes
them.

Release Notes:

- N/A
2023-11-28 15:43:43 -05:00
Marshall Bowers
64376ad37a
ui2: Reference theme2 and settings2 crates without the 2 (#3424)
This PR updates the `ui2` crate to reference the `theme2` and
`settings2` crates without the `2` the way we do in our other crates.

Release Notes:

- N/A
2023-11-28 15:30:29 -05:00
Nate Butler
b24a3b8fcb Unused imports 2023-11-28 15:17:09 -05:00
Nate Butler
525fe70de6 Fix missing arrows 2023-11-28 15:15:49 -05:00
Nate Butler
21755c7d20 Update keybinding.rs 2023-11-28 15:12:40 -05:00
Nate Butler
3855413725 Merge branch 'main' into refine-keybindings 2023-11-28 15:12:22 -05:00
Nate Butler
40bbbd3226 Update command_palette.rs 2023-11-28 15:06:37 -05:00
Marshall Bowers
070674a4fd
ui2: Unsuppress and fix warnings (#3423)
This PR unsupresses the warnings in `ui2` and summarily fixes them.

Release Notes:

- N/A
2023-11-28 14:44:19 -05:00
Nate Butler
a9cb6589dd Update keybinding.rs 2023-11-28 14:40:26 -05:00
Marshall Bowers
874fde09ab
Add inset variant to ListItem (#3422)
This PR adds an inset variant to the `ListItem` component.

We're now using this inset variant for the `ListItem`s we render in
pickers.

Release Notes:

- N/A
2023-11-28 14:27:19 -05:00
Nate Butler
f33cd3d463 Merge branch 'main' into refine-keybindings 2023-11-28 14:00:09 -05:00
Conrad Irwin
01d3432a40 Merge branch 'main' into collab-panel2 2023-11-28 11:40:58 -07:00
Marshall Bowers
9411898720
Use ListItems in the project panel (#3421)
This PR reworks the project panel to render its items using the
`ListItem` component.

There are a few hacks in here in order to get click handlers working for
the `ListItem`, but we'll want to get these fixed in GPUI.

Release Notes:

- N/A
2023-11-28 13:11:43 -05:00
Conrad Irwin
a761e6ca0e More mouse occlusion work 2023-11-28 09:59:58 -07:00
Kirill Bulatov
5451db9c96 Use proper npm arguments and clean its inherited env vars 2023-11-28 18:39:03 +02:00
Antonio Scandurra
3ac545088a WIP: preserve aspect ratio of images 2023-11-28 17:33:11 +01:00
Marshall Bowers
ecb3bd7f59 Use ListItems in Picker story 2023-11-28 10:52:17 -05:00
Antonio Scandurra
600b564bbf Introduce surface rendering
Co-Authored-By: Julia <julia@zed.dev>
2023-11-28 16:47:31 +01:00
Marshall Bowers
1ee109cec7 Use ListItem when rendering picker matches 2023-11-28 10:44:57 -05:00
Marshall Bowers
63bd4ac999 Allow render_match to return an Option to represent no matches 2023-11-28 10:33:13 -05:00
Piotr Osiewicz
9fb3cb6a69 fixup! Add contact finder, change ui::List's on_click handler signature 2023-11-28 14:37:53 +01:00
Piotr Osiewicz
6c37393dd1 Add contact finder, change ui::List's on_click handler signature 2023-11-28 14:16:51 +01: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
Conrad Irwin
26121713b3 Show channels and users in the sidebar 2023-11-27 19:57:55 -07:00
Mikayla Maki
eac4b2d076
Add Uiua language and Nu LSP (#3416)
Adds support for Uiua to my favorite editor in advance of AOC and
integrates the new nushell lsp. Change made to both zed1 and zed2.

Release Notes:

- Added support for the integrated Nushell LSP
- Added support for the Uiua language
2023-11-27 18:55:51 -08:00
Mikayla
8faa1f6e58
Merge branch 'main' into welcome 2023-11-27 18:55:23 -08:00
Mikayla
a760508080
Add uiua and nu languages 2023-11-27 18:46:56 -08:00
Nate Butler
84ee833d0c
🚧 Completion & Popover Styles 🚧 (#3406)
TODO:

- [ ] Add y axis padding to list instead of popover container
- [x] Combined max-width between completions list and docs
- [ ] Allow docs to be taller than completion list
- [x] Use the workspace bounds to set doc position
- [ ] Clean up markdown styles
- [x] (🐜) Changing items should set doc scroll position to the top
- [x] (🐜) popovers should render on top of all panes
- [ ] (extra) Try adding code block backgrounds to md rendering
- [ ] (extra) Use ui font for markdown text, buffer font for markdown
code.
- [ ] (extra) Try lining up inline code in completions menu

[[PR Description]]

Release Notes:

- N/A
2023-11-27 21:08:21 -05:00
Conrad Irwin
2a8f4f19d6
Scaffolding for update notification too (#3410)
Release Notes:

- N/A
2023-11-27 19:05:15 -07:00
Nate Butler
979ff70196 Update popover.rs 2023-11-27 20:12:20 -05:00
Nate Butler
ca2052b0c1 Merge branch 'main' into completions-styles 2023-11-27 19:22:07 -05:00
Conrad Irwin
eca49ef02e
remove zed1 notification mess (#3415)
Accidentally added while testing zed2

Release Notes:

- N/A
2023-11-27 16:52:51 -07:00
Conrad Irwin
f3d142b7e9 remove zed1 notification mess 2023-11-27 16:27:02 -07:00
Conrad Irwin
4a25fae51e TEMP 2023-11-27 16:22:01 -07:00
Max Brunsfeld
369803cbc8
Upgrade Tree-sitter for stack-overflow bugfix (#3413)
Fixes https://github.com/zed-industries/community/issues/2290

This PR bumps Tree-sitter for
https://github.com/tree-sitter/tree-sitter/pull/2788.

Release Notes:

- Fixed a crash that could happen when opening certain large markdown
files.
2023-11-27 15:13:55 -08:00
Max Brunsfeld
6468fe737e Use 'any-match?' predicate in elixir embedding query 2023-11-27 15:06:20 -08:00
Conrad Irwin
e6aab57656 Merge branch 'main' into collab-panel2 2023-11-27 15:57:09 -07:00
Conrad Irwin
ccfc4fc0b9
Fix esc in command palette (#3414)
Also: add editor.register_action

Release Notes:

- N/A
2023-11-27 15:47:01 -07:00
Conrad Irwin
47b4d9942f Fix panic on quit 2023-11-27 15:33:47 -07:00
Conrad Irwin
107c3d7f67 Fix esc in command palette
Also: add editor.register_action
2023-11-27 14:32:22 -07:00
Max Brunsfeld
1c62abbf79 Upgrade Tree-sitter for stack-overflow bugfix 2023-11-27 13:16:50 -08:00
Julia
d551b41aae zed2: Mostly port breadcrumbs & improve StyledText api
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-11-27 16:09:31 -05:00
Piotr Osiewicz
f8614b5909 fixup! Await toggle of mute 2023-11-27 21:46:03 +01:00
Piotr Osiewicz
b0d9e3c8fa Await toggle of mute 2023-11-27 21:44:53 +01:00
Marshall Bowers
24f3034106
Add ListItem story (#3411)
This PR adds a story for the `ListItem` component, so we can work on it
in isolation.

Release Notes:

- N/A
2023-11-27 15:24:41 -05:00
Piotr Osiewicz
52119ca203 call: Restore mute_on_join behaviour 2023-11-27 21:06:06 +01:00
Conrad Irwin
6f839a1b48 Add logged out collab panel 2023-11-27 13:00:12 -07:00
Conrad Irwin
4f885252ab
[Zed2] Collab UI (#3403)
Release Notes:

- N/A
2023-11-27 12:40:59 -07:00
Marshall Bowers
19ecccb107 Add ListItem story 2023-11-27 14:20:33 -05:00
Marshall Bowers
feb7753a73 Fix typo in uniform_list's doc comment 2023-11-27 14:20:27 -05:00
Conrad Irwin
e31a8f0536 Scaffolding for update notification too 2023-11-27 12:07:26 -07:00
Conrad Irwin
82f6f77117 Use editor's overlay implementation 2023-11-27 11:49:51 -07:00
Conrad Irwin
212d9254e1 Merge branch 'main' into completions-styles 2023-11-27 11:49:39 -07:00
Conrad Irwin
7a8aba329b Break content mask for hoverables 2023-11-27 11:43:14 -07:00
Piotr Osiewicz
1c2f906e48 Position incoming call notification on right hand side.
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-27 19:37:04 +01:00
Antonio Scandurra
e9e621518f
Introduce hover popover in editor2 (#3408)
<img width="1245" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/ba35e43c-82a6-493e-938b-8798352e636d">

Release Notes:

- N/A
2023-11-27 19:28:14 +01:00
Antonio Scandurra
3ea12ad0d7 Remove commented out code 2023-11-27 19:19:56 +01:00
Antonio Scandurra
fc4b621b32 Use element_hover instead of red 2023-11-27 19:16:06 +01:00
Antonio Scandurra
8c53f1b9c2 Uncomment hover popover tests 2023-11-27 19:14:58 +01:00
Antonio Scandurra
1e6214440d Show diagnostic hover popover 2023-11-27 19:08:25 +01:00
Piotr Osiewicz
b2b5df4428 close notification handler proper on accept/decline
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-27 18:57:25 +01:00
Antonio Scandurra
a5951df21f Start on hover popover 2023-11-27 18:56:37 +01:00
Nate Butler
ab83f4319b revert popover changes
[no ci]
2023-11-27 11:51:42 -05:00
Conrad Irwin
fd165206bf
gpui2: Notifications (#3407)
Release Notes:

- N/A
2023-11-27 09:22:31 -07:00
Nate Butler
8a35a02863 Checkpoint - try using overlay for completions popover
[no ci]
2023-11-27 11:22:19 -05:00
Nate Butler
1acc6b462f Start on completions styles 2023-11-27 10:29:29 -05:00
Kirill Bulatov
cd4ea344a6 Slightly less errors in terminal_element2 2023-11-27 16:55:48 +02:00
Piotr Osiewicz
8ca9f4e12a Fix some more warnings 2023-11-27 15:49:47 +01:00
Piotr Osiewicz
30af3ffaf3 fixup! Use AppContext instead of AsyncWindowContext to quit 2023-11-27 15:47:00 +01:00
Piotr Osiewicz
44876062c9 Use AppContext instead of AsyncWindowContext to quit
Fixes refcell-related panic
2023-11-27 15:44:19 +01:00
Nate Butler
56d3d663a5
UI progress (#3405)
[[PR Description]]

- Start outlining unfinished elements in `gpui::red()`
- Update tabs so they don't jump when activated
- Mock out a number of ui elements we haven't started yet.

Release Notes:

- N/A
2023-11-27 09:25:52 -05:00
Antonio Scandurra
0d1d01687b
Finish autocomplete (#3404)
![image](https://github.com/zed-industries/zed/assets/482957/f1f40bec-4e8b-457b-8801-ce10ecb6fc80)


TODO:

- [x] Respect max height imposed by editor element
- [x] Ensure mouse down event handler in `EditorElement` doesn't prevent
links from being clicked

Release Notes:

- N/A
2023-11-27 15:24:59 +01:00
Antonio Scandurra
3ba5dbb9e8 Prevent mousedown on docs from being propagated to the editor 2023-11-27 15:15:57 +01:00
Piotr Osiewicz
a71180257d Add deafening support 2023-11-27 15:12:13 +01:00
Nate Butler
c40ab3c3da Update theme2.rs 2023-11-27 09:11:51 -05:00
Piotr Osiewicz
bf4211b03a Use facepile for avatars 2023-11-27 14:56:51 +01:00
Antonio Scandurra
eb647be685 Pass max height manually 2023-11-27 14:56:46 +01:00
Piotr Osiewicz
714b45157b Replace unrendered frame with a frame counter
Move facepile to the left hand side
2023-11-27 13:02:21 +01:00
Piotr Osiewicz
9590f253a9 Fix warnings 2023-11-27 12:46:07 +01:00
Piotr Osiewicz
5cbe8deb50 Fix up tests 2023-11-27 12:33:44 +01:00
Piotr Osiewicz
4c1514edc4 fixup! Remove shared_screen from workspace 2023-11-27 12:10:07 +01:00
Piotr Osiewicz
fad1f8db96 Remove shared_screen from workspace 2023-11-27 12:09:36 +01:00
Conrad Irwin
039c933d8e gpui2: Notifications 2023-11-26 22:28:53 -07:00
Nate Butler
2e61a84bd6 Update tab borders 2023-11-24 16:57:50 -05:00
Nate Butler
48a9f2be4c Update one theme colors 2023-11-24 16:57:35 -05:00
Antonio Scandurra
682712f132 Account for previous line lengths when returning index 2023-11-24 18:32:48 +01:00
Antonio Scandurra
047cfe5108 Fix painting when underlines and quads appeared after a wrap boundary 2023-11-24 18:23:08 +01:00
Antonio Scandurra
f227c3284d Consume newline from run if it spans it 2023-11-24 17:53:48 +01:00
Piotr Osiewicz
481c19fbaf WIP, frames are being sent to the other end 2023-11-24 17:31:47 +01:00
Antonio Scandurra
0baa9a782b Start on wiring up render_parsed_markdown 2023-11-24 17:28:59 +01:00
Antonio Scandurra
d31b53b912 Extract a gpui::combine_highlights function 2023-11-24 16:31:38 +01:00
Nate Butler
d965ddba27 Start debugging tab borders 2023-11-24 09:33:44 -05:00
Nate Butler
6a3925c3e1 Add copilot icons 2023-11-24 09:22:31 -05:00
Nate Butler
31565a810d Outline statusbar items 2023-11-24 09:16:19 -05:00
Piotr Osiewicz
6ebe5d5053 Add mute handling 2023-11-24 15:16:03 +01:00
Antonio Scandurra
e5b6b0ee9e WIP 2023-11-24 15:05:04 +01:00
Nate Butler
3c46e81533 More outlines 2023-11-24 09:03:14 -05:00
Nate Butler
7e61d340ce Outline some unfinished elements 2023-11-24 08:58:49 -05:00
Antonio Scandurra
19bfed165b Show single-line docs in autocomplete and apply completion on mousedown 2023-11-24 13:22:25 +01:00
Antonio Scandurra
54357d6553 Syntax highlight completions 2023-11-24 13:10:56 +01:00
Antonio Scandurra
bf39968105 Return TextRuns in combine_syntax_and_fuzzy_match_highlights 2023-11-24 13:00:20 +01:00