Commit Graph

408 Commits

Author SHA1 Message Date
Nathan Sobo
adc50469ff WIP 2023-08-06 12:45:31 -06:00
Nathan Sobo
d3c1966d96
WIP: Return WindowHandle<V: View> from AppContext::add_window (#2820)
Instead of returning a usize for the window id, I'm instead returning a
`WindowHandle<V: View>` where `V` is the type of the window's root view.
@as-cii helped me with a cool technique using generic associated types
where methods on `WindowHandle` can return either T or Option<T>
depending on the `BorrowWindowContext::Result` associated type.

Some example usage...

```rs
let window = cx.add_window(|cx| MyView::new(cx));
let my_view = window.root(cx); // If cx is TestAppContext, returns MyView. Otherwise returns Option<MyView>, because the window could be closed.
```


This isn't insanely beneficial on its own, but I think it will help
clean up our testing story. I'm planning on making `window` more useful
in tests for laying out elements, etc.

- [x] Rework tests that call `add_window` 😅 to expect only a window in
return.
- [x] Get tests passing
- [x] 🚬  test
2023-08-03 18:45:51 -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
Joseph T. Lyons
ee1b4a52cc
Add PathExt trait (#2823)
This PR adds a `PathExt` trait. It pulls in our existing `compact()`
function, as a method, and then adds a method, and testing, for
`icon_suffix()`. A test was added to fix:

- https://github.com/zed-industries/community/issues/1877

Release Notes:

- Fixed a bug where file icons would not be registered for files with
with `.` characters in their name
([#1877](https://github.com/zed-industries/community/issues/1877)).
2023-08-03 18:57:43 -04:00
Nathan Sobo
884cee6dfd Get tests compiling returning WindowHandle<V: View> from add_window 2023-08-02 14:05:03 -06:00
Max Brunsfeld
a555fa1ada Merge branch 'main' into collab-panel 2023-08-02 09:08:50 -07:00
Joseph T. Lyons
0bd6e7bac3 Fix comment 2023-07-28 23:13:36 -04:00
Joseph T. Lyons
b0e81c58dc Remove unused code in test 2023-07-28 23:06:40 -04:00
Joseph T. Lyons
2c47efcce9 Add a command to collapse all entires 2023-07-28 22:36:15 -04:00
Mikayla Maki
ac35dae66e
Add channels panel with stubbed out information
co-authored-by: nate <nate@zed.dev>
2023-07-28 13:21:39 -07:00
Joseph T. Lyons
40fcec1495 Follow naming convention for menu items 2023-07-26 14:35:23 -04:00
Joseph T. Lyons
bdd0b9f387
Add open file in project finder via space (#2785)
@mikayla-maki for 👀 

[This PR added in the ability to rename a file via
`enter`](https://github.com/zed-industries/zed/pull/2784). Previously,
`enter` was used to both open a file and confirm a rename, so this PR
changes the opening of a file to use `space`, which is what VS Code
uses. It also makes a bit more sense because now `enter` is just used to
start a rename and confirm the rename, vs being used for 2 different
actions.

N/A on the release notes, as I adjusted the release note in the
previously-tagged PR.

Release Notes:

- N/A
2023-07-24 16:35:01 -04:00
Kirill Bulatov
f05095a6dd Focus project panel on directory select 2023-07-23 00:12:25 +03:00
Kirill Bulatov
25ea07cd41
When renaming in project panel, select file names without extensions (#2776)
Closes
https://github.com/zed-industries/community/issues/1789#issuecomment-1646061712

<img width="196" alt="Screenshot 2023-07-21 at 23 23 47"
src="https://github.com/zed-industries/zed/assets/2690773/f5c7025b-6dc8-4f0c-81e5-3cc98a3a9c8b">
<img width="197" alt="Screenshot 2023-07-21 at 23 23 52"
src="https://github.com/zed-industries/zed/assets/2690773/596f8ab0-15e0-4285-be34-ce4c276b686f">

When renaming in project panel, select file names without extensions.

Release Notes:

- Improved project panel rename by selecting file names without
extensions
2023-07-21 23:30:55 +03:00
Kirill Bulatov
804da68af7 When renaming in project panel, select file names without extensions 2023-07-21 23:22:22 +03:00
Kirill Bulatov
595bc16749 Add search in directory action in the project panel 2023-07-21 22:47:57 +03:00
Mikayla Maki
6b95ac9b26
fmt 2023-07-20 13:45:19 -07:00
Derek Briggs
abb145da70
add indent size to project panel settings 2023-07-20 12:30:35 -06:00
Derek Briggs
0e068a644f
organize settings 2023-07-20 12:23:47 -06:00
Derek Briggs
13ae1249f5
Allow for folders or chevrons 2023-07-20 12:23:28 -06:00
Derek Briggs
8f0b24b264
Add moar icons 2023-07-20 12:01:41 -06:00
Mikayla Maki
9c9ce15afc
Add a few more spare associations 2023-07-19 11:14:31 -07:00
Mikayla Maki
e3f9a01f6b
fmt 2023-07-19 11:10:31 -07:00
Derek Briggs
f4413b0969
Fix files that don’t have a prefix 2023-07-19 11:10:30 -07:00
Mikayla Maki
aacc4bb8b0
fmt 2023-07-19 11:10:30 -07:00
Mikayla Maki
8c855680e7
Make file types live reload 2023-07-19 11:10:30 -07:00
Mikayla Maki
929a9f97b2
Fix tests 2023-07-19 11:10:30 -07:00
Mikayla Maki
fd72f4526d
Added file suffix and icon associations data 2023-07-19 11:10:30 -07:00
Mikayla Maki
d023189bda
Add settings 2023-07-19 11:10:30 -07:00
Mikayla Maki
d26f76ba90
Add suffix based file icons 2023-07-19 11:10:30 -07:00
Joseph T. Lyons
c3e8ea304a Require only a single click to split pane when using cmd in project panel 2023-07-14 18:27:40 -04:00
Alex Viscreanu
c7669317ec
feat(workspace): allow alternative actions to open files and symbols in split
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-07-14 21:49:15 +02:00
Mikayla Maki
787412b545
fmt and update dependency 2023-06-29 17:49:42 -07:00
Mikayla Maki
cd670e340f
Fix edge case with absolute file paths 2023-06-29 17:48:01 -07:00
Mikayla Maki
33f5248d4f
Add the ability to make new directories by adding slashes to a file name 2023-06-29 17:35:22 -07:00
Max Brunsfeld
f128cf4a33
Defer scanning some worktree subdirectories until they are expanded in the project panel (#2622)
Closes
https://linear.app/zed-industries/issue/Z-352/high-memory-usage-from-fs-scanning-if-project-contains-symlinks-that

### Background

Currently, when you open a project, Zed eagerly scans the directory,
building an in-memory representation of all of the files and directories
within. This scanning includes all git-ignored files and follows any
symlinks. When any directory changes on disk, Zed recursively rescans it
in order to keep its in-memory representation up-to-date. When
collaborating, all of these files are replicated to all guests.

Right now, there are some performance problems associated with the
maintenance of this filesystem state:
* For various reasons, some projects contain symlinks that point out to
large folders like `$HOME`, which itself contains many symlinks that
point to the same large directory. When these projects are opened, the
worktree scans endlessly, using more and more memory.
* Some git-ignored directories (like `target` in a rust project) contain
*many* more files than are actually tracked in the git repository. These
files often change as a result of saving, (e.g. because the compiler
runs). Maintaining in memory all of these paths isn't useful to the
user, and causes significant CPU usage on every save. Most importantly,
when collaborating sending all of these changes to guests can be slow,
and can delay all other RPC messages.

### Change

This PR changes the worktree's filesystem-scanning logic to be *lazy*
about scanning two types of directories:
* git ignored directories
* "external" directories (those that are canonically located outside of
the worktree root, but accessed via symlinks)

The laziness works as follows. When, during a recursive scan, a
directory is found that falls into one of the above 2 categories, that
directory is marked as "unloaded". The directory might later be scanned,
if some explicit operation is performed within it (like opening a
buffer, or creating a file), if any collaborator expands that directory
in their project panel, or if an LSP requests that it be watched.

### Results

When collaborating on the `zed` folder:

| metric | before | after |
|-------|--------|------|
| # `worktree_entries` in collab db initially | 154,763 |  77,679 |
| # `worktree_entries` in collab db after 5 saves | 181,952 | 77,679
(nothing new to scan) |
| app memory footprint (host) | 260MB | 228.5 MB  |

The db thing is a win, because reading and writing to the
`worktree_entries` table is one of the most expensive thing that the
`collab` server does.

There's also generally lower background CPU usage after every save,
because we don't need to recursively rescan directories inside of
`target`.

### Limitations

We still end up scanning some unnecessary directories (like
`target/debug/build/zed-b612db829aeac16e/out`) because the LSP instructs
us to watch those.

### To do:

* [x] Expand parent directories of any path opened via LSP
* [x] Avoid creating orphaned entries when FS events happen inside of
unscanned directories
* [x] Scan any newly-non-ignored directories after gitignore changes
* [x] Emit correct events for newly-discovered paths when expanding dirs
* [x] GC the set of expanded directory ids when dirs are removed
* [x] Don't include "external" entries in file-finder
* [x] Expand any directories watched by LSP
* [ ] manual testing and profiling

### Release Notes:

- Fixed a bug where Zed would use excessive memory when a project folder
contained symlinks pointing to directories outside of the project.
- Reduced Zed's memory and CPU usage when working in folders containing
many git-ignored files.
2023-06-27 17:07:23 -07:00
Antonio Scandurra
6f0efec146 Merge remote-tracking branch 'origin/main' into save-conversations 2023-06-23 09:09:42 +02:00
Max Brunsfeld
9ad1ebf387 Fix project panel test helper 2023-06-22 17:02:01 -07:00
Max Brunsfeld
5350164db9 Get integration test passing. Wait for expand entry on remote projects. 2023-06-22 10:34:28 -07:00
Max Brunsfeld
cd823ede4d Add a bit to each entry indicating if it's outside of the worktree root 2023-06-22 10:34:28 -07:00
Max Brunsfeld
aa6f2f1816 Remove logic for marking worktree entries as collapsed 2023-06-22 10:34:28 -07:00
Max Brunsfeld
f910d8fe3e Only scan ignored or externals paths if expanded in a project panel 2023-06-22 10:34:28 -07:00
Max Brunsfeld
4c03231863 Maintain on the background scanner a set of expanded directories 2023-06-22 10:34:28 -07:00
Nathan Sobo
23bc11f8b3 Remove the nested Pane from the assistant
Since we don't want tabs, I think it would be better to render the toolbar
for ourselves directly and handle switching between conversations.

Co-Authored-By: Julia Risley <julia@zed.dev>
2023-06-20 18:52:48 -06:00
Piotr Osiewicz
0256f89dd6
Rename on/off states to active/inactive 2023-06-20 16:05:23 -07:00
Piotr Osiewicz
e92015b12f
Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
Mikayla Maki
a2d58068a7
Improve test generation and implement status propogation
co-authored-by: max <max@zed.dev>
2023-06-05 17:30:12 -07:00
Mikayla Maki
9a13a2ba2c
WIP: Add status bubbling to project panel 2023-06-05 12:53:04 -07:00
Mikayla Maki
22e4086658
WIP: Move statuses to be on their associated file entries in worktree
co-authored-by: Julia <julia@zed.dev>
2023-05-31 11:03:11 -07:00
Kirill Bulatov
5501dd741c Fix duplicate item creation in project panel 2023-05-26 02:07:25 +03:00
Julia
5e39ba596e Clean up final remaining code paths calling old diff update method 2023-05-25 14:41:09 -04:00
Julia
f40c498491 Fix tests 2023-05-25 14:29:28 -04:00
Antonio Scandurra
f67a22828b Show keystroke in panel tooltips
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-24 16:13:58 +02:00
Antonio Scandurra
208ff2fba7 Merge remote-tracking branch 'origin/main' into panels 2023-05-23 08:24:28 +02:00
Mikayla Maki
a37b1b6a45
Add other setting init 2023-05-22 20:38:30 -07:00
Mikayla Maki
b19a712799
Add init_settings to tests 2023-05-22 20:33:18 -07:00
Mikayla Maki
da96802bf0
fmt 2023-05-22 20:25:27 -07:00
Mikayla Maki
7be8dead07
Add initial project panel settings 2023-05-22 20:23:07 -07:00
Mikayla Maki
e4454f1e7f
fmt 2023-05-22 15:53:29 -07:00
Mikayla Maki
5c31c84c90
Fixed contrast in project panel and scrollbar
co-authored-by: nate <nate@zed.dev>
2023-05-22 15:51:31 -07:00
Mikayla Maki
2d1c4a1971
Revert "Touch up git in project panel and scroll bar styling" 2023-05-22 15:31:14 -07:00
Mikayla Maki
9bec74f1d4
fmt 2023-05-22 15:04:51 -07:00
Mikayla Maki
ef81813d56
Wire in conflict styling 2023-05-22 10:10:47 -07:00
Mikayla Maki
2200a22c07
Wire project panel themes into rust 2023-05-22 09:55:59 -07:00
Antonio Scandurra
185a624b99 Fix some project panel tests 2023-05-22 16:18:53 +02:00
Antonio Scandurra
10e947cb5f Persist project and terminal panel sizes 2023-05-22 15:55:44 +02:00
Antonio Scandurra
146809eef0 Merge branch 'main' into panels 2023-05-22 14:10:17 +02:00
Max Brunsfeld
32c7157906 🎨 Make worktree repositories more consistent 2023-05-19 15:04:37 -07:00
Kirill Bulatov
7d1833b759
When the file is deleted via project panel, close it in editors (#2490)
Deals with https://github.com/zed-industries/community/issues/179 by
sending a message about it, to asynchronously apply on all workspaces.

Release Notes:

* Fixes a bug when files, deleted in the project panel were left open in
the editor
2023-05-19 21:51:37 +03:00
Max Brunsfeld
729a93db6b Optimize retrieving repos for entries when rendering the project panel
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-05-19 11:29:02 -07:00
Kirill Bulatov
583b15badc When the file is deleted via project panel, close it in editors 2023-05-19 18:52:30 +03:00
Antonio Scandurra
e49281699c Add new terminal when the terminal panel is activated, and not on focus 2023-05-19 16:07:47 +02:00
Max Brunsfeld
67a25126d4 Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
Max Brunsfeld
89204e85c0 Merge branch 'main' into setting-store 2023-05-17 09:55:24 -07:00
Antonio Scandurra
05fb051924 Store whether a panel is zoomed in the panel itself
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-05-17 17:51:11 +02:00
Antonio Scandurra
981129ef8e Show a panel/pane as zoomed only if it's the active item in workspace 2023-05-17 15:06:58 +02:00
Max Brunsfeld
6403bb86e1 Define workspace settings in workspace crate 2023-05-16 20:25:18 -07:00
Max Brunsfeld
65e3713d4d Define editor settings in editor crate 2023-05-16 17:30:29 -07:00
Max Brunsfeld
39618ae32d Define language settings in the language crate 2023-05-16 17:29:53 -07:00
Antonio Scandurra
f87ae6032e Don't rely on action propagation for zooming in and out
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-16 10:34:50 -06:00
Antonio Scandurra
c03e470fe6 Introduce Panel::can_zoom 2023-05-15 17:10:30 +02:00
Mikayla Maki
41bef2e444
Refactor out git status into FileName component
Integrate file name component into the editor's tab content
2023-05-13 02:26:45 -07:00
Nathan Sobo
6c60853842 Don't close panel on event unless active; add tests 2023-05-12 15:44:09 -06:00
Nathan Sobo
bd795d7607 Preserve panel size when re-docking between left and right 2023-05-12 15:15:11 -06:00
Nathan Sobo
214354b4da Make panels independently resizable 2023-05-12 09:44:14 -06:00
Mikayla Maki
5b2ee63f80
Added status trickle up 2023-05-11 12:01:42 -07:00
Mikayla Maki
23a19d85b8
Fix bug in status detection when removing a directory 2023-05-10 17:37:36 -07:00
Mikayla Maki
0082d68d4a
Revert "Convert git status calculation to use Entry IDs as the key instead of repo relative paths"
This reverts commit 728c6892c924ebeabb086e308ec4b5f56c4fd72a.
2023-05-10 17:37:36 -07:00
Petros Amoiridis
6b4242cded
Use theme.editor.diff for the colors 2023-05-10 17:37:36 -07:00
Mikayla Maki
f935047ff2
Convert git status calculation to use Entry IDs as the key instead of repo relative paths 2023-05-10 17:37:36 -07:00
Mikayla Maki
18cec8d64f
Format 2023-05-10 17:37:36 -07:00
Mikayla Maki
e98507d8bf
Added git status to the project panel, added worktree test 2023-05-10 17:37:36 -07:00
Antonio Scandurra
0ccb4a50e6 Create more specific dock position settings associated with each panel 2023-05-10 16:52:10 +02:00
Antonio Scandurra
f28eee88b6 Add context menu to change panel position 2023-05-10 14:05:48 +02:00
Antonio Scandurra
6e3ce6332a Fix panic when not specifying a project_panel setting 2023-05-10 10:43:42 +02:00
Nathan Sobo
ba248244ec Allow terminal to be docked left, bottom, or right
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2023-05-09 17:36:49 -06:00
Nathan Sobo
6a7feb4c4c Allow the project panel to be docked right or left
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2023-05-09 17:26:54 -06:00
Nathan Sobo
6645323f1b WIP 2023-05-09 13:28:34 -06:00
Antonio Scandurra
8f12489937 WIP: Allow panels to be moved
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-09 18:57:25 +02:00
Antonio Scandurra
e6be35c9a5 Show terminal count in panel button 2023-05-09 12:21:35 +02:00
Nathan Sobo
1ddbda5095 Rename DockItem to Panel 2023-05-09 10:18:11 +02:00
Nathan Sobo
03f8c1206a Rename Sidebar to Dock 2023-05-09 10:18:10 +02:00
Antonio Scandurra
da19edc3e3 Merge branch 'main' into implicit-ancestry 2023-05-04 14:39:58 +02:00
Antonio Scandurra
3d679ddb26 Avoid re-allocating KeymapContext after every view notification 2023-05-04 12:04:30 +02:00
Antonio Scandurra
e9ed40da37 Remove the ability to retrieve the view's parent 2023-05-03 16:52:55 +02:00
Antonio Scandurra
c4472b0786 Remove ViewContext::dispatch_action 2023-05-01 16:27:36 +02:00
Antonio Scandurra
33da9e5690 Remove internal actions from project_panel 2023-04-28 17:21:10 +02:00
Antonio Scandurra
6857426b78 Remove RemoveWorktreeFromProject internal action 2023-04-28 12:11:59 +02:00
Antonio Scandurra
5521ff1b22 Allow passing a handler function to context menu items 2023-04-27 11:32:12 +02:00
Max Brunsfeld
ebbe52e6b0 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
Max Brunsfeld
abdccf7393 Use a workspace dependency for the futures crate 2023-04-24 09:43:31 -07:00
Nathan Sobo
fe492eacbf Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
Antonio Scandurra
03619dfa55 Rename Drawable::boxed to into_element and make containers generic
Multi-element are now generic over any drawable child, which can be converted
into an element.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 12:43:19 -06:00
Antonio Scandurra
f12746c4b7 Avoid double borrow of view in ProjectPanel drag and drop
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-21 16:23:47 +02:00
Antonio Scandurra
5b40641fde Take a target view when marking an element as draggable 2023-04-21 15:52:05 +02:00
Antonio Scandurra
d03c431f9a Fix warnings/errors now that AsyncAppContext::update returns Result 2023-04-18 14:58:57 +02:00
Antonio Scandurra
98dce89379 Pass WindowContext to ViewHandle::is_focused 2023-04-14 12:12:08 +02:00
Nathan Sobo
b89c4e06be WIP: Compiling, many warnings, haven't tested 2023-04-12 12:54:24 -06:00
Nathan Sobo
a25f962185 WIP 2023-04-12 12:13:35 -06:00
Nathan Sobo
868301bedb WIP 2023-04-12 10:07:17 -06:00
Antonio Scandurra
83070a19c4 WIP 2023-04-12 15:55:43 +02:00
Nathan Sobo
b54f08db77 WIP 2023-04-12 06:51:03 -06:00
Nathan Sobo
e115baa60c WIP 2023-04-11 18:21:56 -06:00
Nathan Sobo
2615a11f7c Don't export platform::* from gpui
I'd like to avoid cluttering the top-level namespace with all the platform-
specific types.
2023-04-07 11:45:53 -06:00
Joseph T. Lyons
c58601ab8d
Merge pull request #2363 from zed-industries/add-copy-path-commands
Update copy path commands
2023-04-07 12:09:39 -04:00
Joseph Lyons
5e55eb279c Update copy path commands 2023-04-07 02:36:56 -04:00
Nathan Sobo
de9bf6dfbd Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Nathan Sobo
82a713fd1d Store AnyViewHandle inside ViewHandle and Deref to it 2023-04-02 14:59:55 -06:00
Antonio Scandurra
5471217089 Use the same serde version across the entire workspace 2023-03-28 09:42:00 -07:00
Max Brunsfeld
17bc83d699 Fix infinite loop in ProjectPanel::paste when filename has multiple dots 2023-03-27 16:45:11 -07:00
Max Brunsfeld
cbeb6e692d Move postage crate version specification to workspace Cargo.toml 2023-03-21 11:26:13 -07:00
Joseph Lyons
c59dafab7e Update method names to match action names 2023-03-12 06:08:12 -04:00
Joseph Lyons
06ad3a7f7b Unify action names with keybinding name 2023-03-12 04:37:39 -04:00
Mikayla Maki
152755b043 Add blank pane experience 2023-03-08 17:56:39 -08:00
Mikayla Maki
f62e0b502a Remove welcome experience action
Make logo switch between light and dark

co-authored-by: Nathan <nathan@zed.dev>
2023-03-08 14:49:48 -08:00
Mikayla Maki
350ddf2025 Add keymap picker UI
Co-authored-by: Max <max@zed.dev>
2023-03-07 17:29:08 -08:00
Mikayla Maki
ab4b3293d1 Fix project panel button and style it
Co-authored-by: max <max@zed.dev>
2023-03-07 14:49:13 -08:00
Mikayla Maki
4c179875ab Add png image loading to gpui
add zed logo into welcome experience

Co-authored-by: Nathan <nathan@zed.dev>
2023-03-06 14:26:32 -08:00
Mikayla Maki
9dee2ca2be WIP 2023-03-06 14:26:32 -08:00
Mikayla Maki
9004640586 Convert keymap context to use generics and Cow<'static> so we don't have to add .to_string() and .into() for each usage 2023-02-23 14:10:55 -08:00
Petros Amoiridis
4bb986b3be
Move reveal_path to ForegroundPlatform
So that we can use spawn to use the OS API call.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-02-20 18:57:37 +02:00
Petros Amoiridis
015b8db1c3
Introduce reveal_path in Platform
And implement it for MacPlatform, and instead of using an external process to run `open`, use the NSWorkspace selectFile instance method.
2023-02-14 15:14:15 +02:00
Petros Amoiridis
a789476c95
Introduce reveal_in_finder function
And use this function in a new Reveal in Finder option of the project panel context menu.

Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-02-10 21:11:05 +02:00
Mikayla Maki
d060114f00 Added complete scripts for generating third party license files 2023-01-23 12:47:12 -08:00
Petros Amoiridis
27a6951403
Allow pasting the same entry more than once in project panel
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-01-18 17:35:21 +02:00
Petros Amoiridis
f8d092fdc6
Fix mouse interrupting file/dir editing in project panel
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-01-18 15:22:20 +02:00
Kay Simmons
73e7967a12 working f and t bindings 2023-01-06 14:24:20 -08:00
Kay Simmons
1cc3e4820a working serialized writes with panics on failure. Everything seems to be working 2022-12-03 16:06:01 -08:00
Mikayla Maki
3451a3c7fe Rebase - Got Zed compiling and fixed a build error due to conflicting dependencies that cargo didn't catch :(
Co-Authored-By: kay@zed.dev
2022-12-03 16:04:10 -08:00
Kay Simmons
d61c0fb24c Allow dragging and dropping project entries 2022-11-10 20:43:55 -08:00
Kay Simmons
738893c527 Split and move to pane working 2022-11-08 14:19:31 -08:00
Julia
9abfa037fd Handle project entry drop render & start fixing drag cancel issues
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-11-07 18:17:36 -05:00
Julia
847376a4f5 Start dragging project panel entries
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-11-07 17:00:01 -05:00
Antonio Scandurra
0b231e58fd Show placeholder text for pickers 2022-11-04 10:18:47 +01:00
Mikayla Maki
ea9b009a22 Fixed bug with cut entry active states 2022-10-31 09:55:52 -07:00
Mikayla Maki
552ebc0f29 Implemented direct styling for ignored and cut project panel entries 2022-10-28 10:45:45 -07:00
Mikayla Maki
40290a9a42 Added notify call 2022-10-24 13:18:02 -07:00
Antonio Scandurra
a5a60eb854 Log view name alongside error in ChildView 2022-10-13 15:44:01 +02:00
K Simmons
6b26965074 Permanent fix to repeat MouseRegion Tag failure in Workspace
Polish tab bar buttons

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-11 15:34:10 -07:00
K Simmons
b88abcacac WIP dock split button and default item 2022-09-11 15:31:44 -07:00
K Simmons
13e9336049 Merge branch 'main' into drag-and-drop 2022-08-22 17:18:29 -07:00
K Simmons
133c194f4a wip tab drag and drop 2022-08-22 16:16:39 -07:00
Antonio Scandurra
4fcba083ba Autoscroll to filename editor when creating or renaming entry
Also, autoscroll when a filename editor goes off-screen and the user
types or changes selections.
2022-08-15 15:14:42 +02:00
Antonio Scandurra
545f12362c Rename {project_panel,contacts_panel}::Toggle to ToggleFocus 2022-08-15 14:53:42 +02:00
K Simmons
42c01c5b10 minor rustfmt fix 2022-08-11 11:35:11 -07:00
ForLoveOfCats
8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Nate Butler
088668ecf8 Fix reversed disclosure arrows in project panel 2022-07-22 11:57:53 -04:00
K Simmons
225055ed5d Address some issues where panes don't get focused properly, make the focused pane more obvious, and prevent splitting of the pane with no items 2022-07-20 18:52:32 -07:00
Nate Butler
bcc554a3db Merge branch 'main' into theme-improvements 2022-07-19 20:12:02 -04:00
Keith Simmons
c2868a39e8
Merge pull request #1388 from zed-industries/mouse-region-refactor
Mouse Region Refactor
2022-07-19 16:50:12 -07:00
Nate Butler
46384e71b7 Add icon sets for sizes 8, 12 and 16, remove old icons 2022-07-19 17:11:15 -04:00
Max Brunsfeld
c1dfb6294b Dismiss project panel's rename editor when it loses focus 2022-07-18 16:10:09 -07:00
K Simmons
8add81350e Rework presenter and MouseRegion to use Handler hashmap rather than individual fields 2022-07-17 23:19:32 -07:00
Max Brunsfeld
4aa19c1a7f Select the last root when right-clicking below all project panel entries 2022-07-05 13:21:41 -07:00
Max Brunsfeld
581c9af395 Adjust pane, tab, panel management bindings to match VS Code 2022-06-29 15:33:46 -07:00
Antonio Scandurra
137a3996a1 Replace "Remove Folder from Project" label with "Remove from Project` 2022-06-20 10:53:26 +02:00
Antonio Scandurra
5dd28b7e57 🎨 2022-06-14 14:03:25 +02:00
Antonio Scandurra
a5a4246e6c Attempt to open new entry only if it is a file 2022-06-14 14:01:49 +02:00
Antonio Scandurra
572e295854 Open files in project panel using enter instead of right 2022-06-14 13:56:56 +02:00
Antonio Scandurra
146e2b5089 Open files when creating them in project panel 2022-06-14 13:49:47 +02:00
Antonio Scandurra
3a69943df3 Require that PartialEq is implemented for Action 2022-06-06 09:18:44 +02:00
Antonio Scandurra
e4641da598 Don't show "add/remove folder to/from project" for remote projects 2022-05-31 08:17:52 +02:00
Antonio Scandurra
3336bc6ab3 Implement copy paste for ProjectPanel 2022-05-30 14:52:34 +02:00
Antonio Scandurra
37a0c7f046 Implement cut/paste for ProjectPanel 2022-05-30 12:23:21 +02:00
Antonio Scandurra
63900612b0 Dismiss context menu when one of its action is dispatched 2022-05-30 10:05:21 +02:00
Nathan Sobo
5413a97c7e Restrict multiple hovered regions to a single stacking context
We won't hover regions from stacking contexts that are below the one being hovered.
2022-05-27 11:09:07 -06:00
Antonio Scandurra
9099c40364 Merge branch 'mouse-events' into project-panel-context-menu 2022-05-27 12:07:00 +02:00
Nathan Sobo
893f15ddab Switch MouseEventHandler to use MouseRegions
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-26 20:00:01 -06:00
Nathan Sobo
8dd82fdce1 Take a RenderContext in ListState's build item callback
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-26 18:23:44 -06:00
Nathan Sobo
2ea085b178 Pass a RenderContext to UniformList
In some cases, we need to render during layout. Previously, we were rendering with a LayoutContext in some cases, but this commit adds the ability to retrieve a render context with a given handle and we use that feature in UniformList.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-26 18:03:34 -06:00
Antonio Scandurra
eedb29963c Implement CopyPath 2022-05-26 16:45:41 +02:00
Antonio Scandurra
5b2d6e41f3 Introduce keyboard navigation in context menus 2022-05-26 16:36:30 +02:00
Antonio Scandurra
991eb742b0 Start adding project panel context menu actions 2022-05-26 15:23:40 +02:00
Antonio Scandurra
a5044ccbba WIP 2022-05-26 11:17:10 +02:00
Antonio Scandurra
a8483ba458 WIP 2022-05-26 09:59:25 +02:00
Antonio Scandurra
85ed7b41f1 Select right-clicked entry before deploying context menu
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-26 09:59:25 +02:00
Antonio Scandurra
3b2f1644fb Constrain context menu to the width of the widest item
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-26 09:59:25 +02:00
Antonio Scandurra
f403d87eff WIP 2022-05-26 09:59:25 +02:00
Nathan Sobo
b428d0de38 Break context menu items out in theme 2022-05-26 09:59:25 +02:00