Nathan Sobo and Max Brunsfeld
893f15ddab
Switch MouseEventHandler to use MouseRegions
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2022-05-26 20:00:01 -06:00
Nathan Sobo and Max Brunsfeld
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 and Max Brunsfeld
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
99573ca270
Fix unit tests assuming ignored files were not displayed
2022-05-24 10:50:27 +02:00
Antonio Scandurra
138a0b042d
Make fade of ignored entries styleable
2022-05-24 09:12:57 +02:00
Antonio Scandurra
1a6cc6f964
Show ignored entries in project panel
2022-05-23 16:37:57 +02:00
Max Brunsfeld
ef0b584532
Remove AppState from workspace actions
...
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Antonio Scandurra and Nathan Sobo
933a1f2cd6
Show badge when there are pending contact requests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-05-11 17:39:03 +02:00
Antonio Scandurra and Nathan Sobo
76ad563b45
Fix memory leak of ProjectPanel
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-05-05 15:52:46 +02:00
Antonio Scandurra and Nathan Sobo
2e9bdfbeac
Improve delete prompt in project browser
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-05-05 15:49:40 +02:00
Antonio Scandurra and Nathan Sobo
6021ab12c9
Clear project browser editor even if an operation fails
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-05-05 15:43:42 +02:00
Antonio Scandurra and Nathan Sobo
2e6cf2011d
When opening items via project panel, only focus them on double-click
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-05-05 15:27:27 +02:00
Antonio Scandurra
61346f734d
WIP
2022-05-05 15:15:58 +02:00
Max Brunsfeld
4b1c46fa45
Allow deleting entries from the project panel
2022-05-04 18:00:23 -07:00
Max Brunsfeld
40e0f10195
Allow creating directories from the project panel
2022-05-04 16:47:11 -07:00
Max Brunsfeld
821dff0e2d
Keep showing edited filename in project panel while edit is in-progress
2022-05-04 13:03:50 -07:00
438e4e7a19
Allow guests to rename stuff
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-05-04 10:28:44 -07:00
Nathan Sobo and Antonio Scandurra
470d693d5e
Rename entries via the project to prepare for guest support
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-05-04 10:28:44 -07:00
Max Brunsfeld and Nathan Sobo
657ea264cc
Allow guests to create files from the project panel
...
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2022-05-04 10:28:44 -07:00
Max Brunsfeld
8291b8108d
Update snapshot atomically when processing FS events
2022-05-04 10:28:44 -07:00
Max Brunsfeld
0ff39f1280
Select new files in the project panel after creating them
2022-05-04 10:28:44 -07:00
Max Brunsfeld and Antonio Scandurra
8fdc5c9be3
Improve the appearance of project panel filename editor
...
* Always layout single-line editors with a fixed height
* Preserve directory chevron when editing folder names
* Allow theming the filename editor
Co-authored-by: Antonio Scandurra <me@as-cii.com >
2022-05-04 10:28:44 -07:00
Max Brunsfeld
333b4aaf4e
Implement Rename command in project panel
2022-05-04 10:28:09 -07:00
Max Brunsfeld
a217e2e64b
Implement basic AddFile command in project panel
2022-05-04 10:28:09 -07:00
Max Brunsfeld
d4492086b3
Abstract more local project setup inside Project::test helper
2022-05-04 10:28:09 -07:00
Max Brunsfeld
12d45f1655
Clean up project panel theme
2022-05-04 10:28:08 -07:00
Antonio Scandurra
953256b128
Sort (case-insensitive) directories before files
2022-04-21 15:08:45 +02:00
Antonio Scandurra
11828040cc
Store visible entries in project panel by id rather than offset
2022-04-21 13:37:57 +02:00
Max Brunsfeld
9a4b8e3d8c
Load all keybindings from JSON file
2022-04-10 14:29:45 -07:00
Max Brunsfeld
fd4b81c8fc
Allow actions to be deserialized from JSON
...
Introduce separate macro for implementing 'internal' actions which
are not intended to be loaded from keymaps.
2022-04-08 15:47:51 -07:00
5242a3a6dc
Restructure action macro to assign a namespace to every action
...
Also, allow arbitrary types to be used as Actions via the impl_actions macro
Co-authored-by: Nathan Sobo <nathan@zed.dev >
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-07 16:20:49 -07:00
Max Brunsfeld and Keith Simmons
866ffdd4ae
Move Settings to its own crate
...
Co-authored-by: Keith Simmons <keith@zed.dev >
2022-04-06 10:23:33 -07:00
Antonio Scandurra and Nathan Sobo
44d997c00c
Rename app_state to global in gpui
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-17 14:33:01 +01:00
0036e5c86c
Replace ProjectEntry struct with ProjectEntryId
...
Previously, we tracked the worktree_id and entry_id separately, but now that entry ids are unique across all worktrees this is unnecessary.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Keith Simmons <keith@the-simmons.net >
2022-03-16 15:59:47 -06:00
Max Brunsfeld
48848de82c
Store settings as a global via a gpui app_state
2022-03-11 15:58:58 -08:00
Antonio Scandurra and Max Brunsfeld
68cfce1fb8
Rename weak to visible
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-03-02 14:38:16 -08:00
Antonio Scandurra and Nathan Sobo
992328a6ee
Forbid parking in project_panel::tests::test_visible_list
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-03-01 17:14:18 +01:00
Antonio Scandurra
466db69780
Pass a reference to TestAppContext in tests
...
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Max Brunsfeld
10580f96a3
Automatically include current view id in element state ids
2022-02-17 13:44:46 -08:00
Max Brunsfeld and Antonio Scandurra
d173e4ef3c
Fix non-unique ids passed to MouseEventHandlers
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-02-17 09:44:02 -08:00
Antonio Scandurra
31dfd01fda
Make add_local_worktree private and use find_or_create_local_worktree
...
The former always adds a worktree, even if we have one already in the
project and that could be misused. The public API should always search
for a local worktree containing the requested path first so that the
project can uphold invariants about which worktrees it has.
2022-01-22 11:23:00 +01:00
Antonio Scandurra
6e7e86e491
Remove weak worktrees from project when nobody references them
...
Also, avoid showing them in the project panel as well as in the
contacts panel.
2022-01-21 14:34:14 +01:00
b7561c6cef
Add select_first and select_last bindings to outline view
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-14 10:45:37 -08:00
ce51196eab
Center the selected item when updating outline query
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-14 17:53:06 +01:00
Max Brunsfeld
9602bc6f8e
Remove stray dbg! calls
2022-01-11 13:56:07 -08:00
Antonio Scandurra and Nathan Sobo
794d214eee
Refactor opening workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 17:38:37 +01:00
Antonio Scandurra and Nathan Sobo
3cab32d201
WIP: Add keybinding to open buffers under cursors
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-01-07 16:12:50 +01:00
Max Brunsfeld
a4027aacb5
Introduce a WorktreeId struct, fix incorrect use of remote worktrees' handle id
2022-01-04 11:28:44 +01:00
Antonio Scandurra
40da3b233f
Get more integration tests passing
2021-12-21 09:50:11 +01:00
Max Brunsfeld
55910c0d79
Get the server and integration tests compiling
2021-12-20 16:30:29 -08:00