Commit graph

694 commits

Author SHA1 Message Date
Antonio Scandurra
a8bd234aa4 Simplify room events 2022-10-24 10:53:44 +02:00
Antonio Scandurra
f99d70500c Allow opening shared screen via the contacts popover 2022-10-24 10:47:47 +02:00
Antonio Scandurra
476020ae84 Show shared screen as a pane item 2022-10-24 10:04:08 +02:00
Nathan Sobo
723fa83909 Use fake LiveKit server to test we can send frames when screen sharing 2022-10-19 19:14:55 -06:00
Antonio Scandurra
219793afcc Merge remote-tracking branch 'origin/main' into screen-sharing 2022-10-19 10:04:56 +02:00
Nathan Sobo
f8e5a08324
Merge pull request #1764 from zed-industries/gpui-events
Eliminate dispatch_event on Element trait
2022-10-18 15:24:13 -06:00
Antonio Scandurra
bf98300547 Render remote participant's screen preserving aspect ratio 2022-10-18 14:16:19 +02:00
Antonio Scandurra
46635956f4 Emit Frame event when new frames are generated for a remote track 2022-10-18 12:18:49 +02:00
Mikayla Maki
f473eadf2d Fixed failing test, now to make breadcrumbs scrollable... 2022-10-17 13:57:29 -07:00
Antonio Scandurra
499b8f5f55 WIP 2022-10-17 18:00:54 +02:00
Nathan Sobo
6e363e464c Start on view-level dispatch approach for keyboard events 2022-10-16 11:46:31 -06:00
Nathan Sobo
bc03592912 Only invalidate parent view on click/hover if we read that state when rendering
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-10-14 18:09:15 -06:00
Antonio Scandurra
a5a60eb854 Log view name alongside error in ChildView 2022-10-13 15:44:01 +02:00
Kay Simmons
27a87c3d9e
Merge branch 'main' into fix-dock-focus-issues 2022-10-12 15:18:28 -07:00
K Simmons
1d8717f4de Remove focus filtering from gpui so all focus events result in focus-in and focus-out calls
Remove pane focused event in favor of focus_in at the workspace level
Added is_child to ViewContext to determine if a given view is a child of the current view
Fix issue where dock would get in a infinite loop when activated after dragging an item out of it
Fix issue where the last focused view in an item was not correctly refocused when a pane is focused after switching active tabs

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-10-12 15:10:00 -07:00
Max Brunsfeld
89f05ada0b Allow toggling collaboration menu from the keyboard 2022-10-12 14:14:03 -07:00
Mikayla Maki
47332f97c7 Stops the dock anchor from being written to settings 2022-10-12 09:28:55 -07:00
Mikayla Maki
b1f64d9550 Updated new vim tests with new rope crate 2022-10-11 20:25:39 -07:00
Mikayla Maki
e7b6d1befe Added theme and dock anchor saving :D 2022-10-11 19:18:29 -07:00
Mikayla Maki
0beb97547e Finished refactoring out fs and rope 2022-10-11 15:25:54 -07:00
Antonio Scandurra
4c07a0782b Allow active call to be optional on workspace
This prepares us for a future where the workspace is unaware of the
active call and doesn't require all tests to invoke `call::init`.
2022-10-11 17:27:37 +02:00
Antonio Scandurra
4504b36c8f Show a different message when participant is active on unshared project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-11 15:24:31 +02:00
Antonio Scandurra
29c3b81a0a Show prompt when closing last window while there's an active call
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-11 14:52:47 +02:00
Antonio Scandurra
94c68d246e 📝
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-10-10 19:18:05 +02:00
Antonio Scandurra
afaacba41f Merge remote-tracking branch 'origin/main' into room 2022-10-10 15:43:38 +02:00
Antonio Scandurra
25ff5959fb Superimpose external location message on active view 2022-10-10 12:23:50 +02:00
Antonio Scandurra
183ca5da6f Allow following users into external projects 2022-10-05 15:32:55 +02:00
Antonio Scandurra
8f8843711f Move logic for joining project into a global action in collab_ui 2022-10-05 15:04:03 +02:00
Antonio Scandurra
383c21046f Set room location when active workspace changes 2022-10-05 15:03:40 +02:00
Mikayla Maki
499e95d16a Removed debugs, simplified settings 2022-10-03 17:43:05 -07:00
Julia
6f6d72890a Once again respect user settings for git gutter
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-10-03 15:42:30 -04:00
Julia
a5c2f22bf7 Move git gutter settings out of editor settings
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-10-03 14:53:33 -04:00
Antonio Scandurra
be8990ea78 Remove project join requests 2022-09-30 11:35:50 +02:00
Antonio Scandurra
b35e8f0164 Remove projects from contact updates
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-09-29 19:40:36 +02:00
Julia
7e5d49487b WIP Notifying buffers of head text change
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
a679557e40 Avoid racing git diffs & allow for "as fast as possible" diff updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
9c82954877 Changed diffs to be async and dropped git delay 2022-09-29 13:16:02 -04:00
Julia
883d5b7a08 Update git gutter status after debounced delay
Co-authored-by: Max Brunsfeld <max@zed.com>
2022-09-29 13:16:02 -04:00
Julia
6fa2e62fa4 Start asking Editors to update git after a debounced delay 2022-09-29 13:16:01 -04:00
Max Brunsfeld
5d8fe33bd2
Merge pull request #1635 from zed-industries/new-signup-flow
Implement APIs for new signup flow
2022-09-28 10:08:12 -07:00
Antonio Scandurra
c8a48e8990 Extract contacts titlebar item into a separate crate
This allows us to implement a new contacts popover that uses the
`editor` crate.
2022-09-28 11:33:38 +02:00
Mikayla Maki
1905ba55d4 Fixed minor issue with pane defocusing Co-Authored-By: kay@zed.dev 2022-09-27 17:05:21 -07:00
Max Brunsfeld
04baccbea6 Start work on a client-side telemetry system 2022-09-23 12:23:12 -07:00
K Simmons
1ce48f4a94 Minor improvements to dock visuals, rework dock keybindings, and fix panic on split when dock is active 2022-09-16 12:55:36 -07:00
Mikayla Maki
6af7b7f600 Added toggle dock test 2022-09-14 10:32:32 -07:00
Mikayla Maki
4c07dc9553 Added focus on dock toggle 2022-09-14 10:15:15 -07:00
K Simmons
61ec334234 Minor tweak to dock tests 2022-09-13 19:26:07 -07:00
K Simmons
3b9b2cd443 Add tests for the dock 2022-09-13 19:18:05 -07:00
K Simmons
ad77bb7b92 Fix mouse scroll in terminal items 2022-09-13 17:37:24 -07:00
K Simmons
0b5952e1bd Fix incorrect rendering of toolbar in right anchored dock
Make dock keybinding activate the dock if it wasn't hidden, and hide it if it was already active
Make clicking the expanded dock wash, hide the dock
Fix some issues with programmatically activating other panes, not hiding the dock
Tweak dock anchor menu text
Swap dock hide button for thin variant
Fix dock sidebar interactions
Add clicked state to search button and fix presenter issue sending clicked events when mouse not overlapping MouseRegion

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-13 15:17:27 -07:00
Mikayla Maki
fa8bac9714 fixed one failing test 2022-09-13 11:40:23 -07:00
K Simmons
df59b28aaf Extract panel resize code from sidebar into Resizable element
Make resizable work in vertical axis
Make dock resizable
Have dock preserve size based on Anchor position
Make pane buttons work more correctly in pathological cases
Sync status bar dock button with dock visibility/anchor position

Co-Authored-By Mikayla Maki <mikayla@zed.dev>
2022-09-12 18:32:15 -07:00
Mikayla Maki
31a3fdb23e Started to make the dock better, major issue's resizing child elements 2022-09-12 14:53:26 -07:00
K Simmons
f2b72eb6d2 WIP working on resizable dock 2022-09-12 14:24:57 -07:00
K Simmons
1dfa711d2e Fix some pane button issues 2022-09-11 15:52:09 -07:00
K Simmons
444417203b Move workspace overlay elements into an actual overlay in order to get proper stacking context depths
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-11 15:34:12 -07: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
69ecbb644d DOCK WORKING!
Update editor element to use mouse regions instead of dispatch event for mouse events
Fix bug in presenter where mouse region handlers were stored on click and called instead of more up to date handlers from subsequent renders
Changed MouseRegion to require discriminants in all cases
Add scroll wheel event to MouseRegion
Polished a bunch of dock inconsistencies

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-11 15:32:20 -07:00
K Simmons
59fd967793 Swapped keyboard binding and did some minor tweaks to style and focus 2022-09-11 15:31:44 -07:00
K Simmons
b88abcacac WIP dock split button and default item 2022-09-11 15:31:44 -07:00
Mikayla Maki
d87fb20170 In progress, working on building out the dock UI experience 2022-09-11 15:31:44 -07:00
Mikayla Maki
b9a6336995 Initial explorations into docks 2022-09-11 15:31:44 -07:00
Mikayla Maki
39d219c898 Start moving terminal modal into dock UI 2022-09-11 15:31:44 -07:00
Mikayla Maki
47fd93de8d
Update workspace.rs 2022-09-09 17:36:25 -07:00
Mikayla Maki
bf1c341f5f Patch for beachball on disconnected overlay, permanent fix to MouseRegion API is a part of the Dock PR.
Co-Authored-By: Keith <keith@zed.dev>
2022-09-09 17:32:31 -07:00
K Simmons
31ecb2f7bc Introduced ItemEvent and to_item_events function to Item trait which converts the Item's events into a standard ItemEvent similar to how SearchableItems work.
Add breadcrumb_location and breadcrumbs functions to item trait which handles rendering of the breadcrumb elements
Change breadcrumb toolbar to use these new functions rather than having hard coded breadcrumb logic
Add breadcrumb support to the terminal tabs

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-06 16:05:36 -07:00
K Simmons
ab81093ef5 WIP pull breadcrumb rendering out into item trait 2022-09-06 14:39:58 -07:00
Mikayla Maki
8af1e11632
Merge pull request #1603 from zed-industries/terminal-polishing
Terminal Polishing
2022-09-06 09:31:39 -07:00
Mikayla Maki
aabc6ce8bd Fixed terminal title showing program, WIP showing exe arguments 2022-09-02 18:22:53 -07:00
Mikayla Maki
1375c5f1a1 Began program manager, made terminal modals per-window 2022-09-02 16:45:58 -07:00
Max Brunsfeld
636f35f384 Avoid undesirable pane item deduping with multibuffers 2022-09-02 11:59:10 -07:00
K Simmons
91080fb998 Don't panic if a tab isn't present in a from tab when dragged 2022-09-01 15:17:25 -07:00
Mikayla Maki
0e0bae8faa
Merge pull request #1587 from zed-industries/alac-search
Terminal Search
2022-09-01 13:49:48 -07:00
Mikayla Maki
ebae991cb2 Finished terminal search 2022-09-01 13:45:46 -07:00
K Simmons
67a585cdfa Impl default for drag and drop global. Make drag and drop global maintain a list of weak handles to the container.
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-01 12:13:46 -07:00
Mikayla Maki
3f11fd3b8b Terminal implements important half of search protocol 2022-08-31 17:41:53 -07:00
K Simmons
efaf7e25f4
Merge pull request #1581 from zed-industries/generalized-item-search
Make Workspace item search generic
2022-08-31 16:12:45 -07:00
K Simmons
227cc66594 Simulate mouse up if mouse was released outside window, don't report dragged payload if it was dragged from a different window 2022-08-31 14:06:38 -07:00
K Simmons
d7e6e8c5a1 Add match associated type and fix failing test 2022-08-30 21:53:49 -07:00
K Simmons
91a5d0b036 SearchableItem trait is completed and editor searches appear to be working 2022-08-30 15:37:54 -07:00
K Simmons
3cc07c1099 Fix some drag and drop issues including the mouse cursor not being locked to pointer, tooltips being incorrect when a dragged tab is used, and some subscription leaks from panes 2022-08-26 15:43:15 -07:00
K Simmons
22f62ee137 Add tests for Pane::add_item 2022-08-25 16:21:44 -07:00
K Simmons
042ece00b1 Drag and drop tabs working. all known bugs fixed 2022-08-25 11:14:24 -07:00
K Simmons
0a97a9c0fd Change dragged tab styling 2022-08-23 18:02:01 -07:00
K Simmons
5c38021a4d Move pane item reordering from activate_tab to add_item_at.
Co-authored-by: nathan@zed.dev
2022-08-23 17:33:01 -07:00
K Simmons
de3acbd75b Introduce ReorderBehavior to pane, and address drag and drop offset error 2022-08-23 15:41:59 -07:00
K Simmons
13e9336049 Merge branch 'main' into drag-and-drop 2022-08-22 17:18:29 -07:00
K Simmons
e44536344a Removed EventHandler from workspace in favor of mouse event handler 2022-08-22 16:49:14 -07:00
K Simmons
0f43ef9331 Dispatch Event refactoring. Appears to be workingCo-Authored-By: nathan@zed.dev 2022-08-22 16:16:40 -07:00
K Simmons
3fb4e6356c Rework presenter dispatch_event to allow isolated propogation of individual MouseRegionEvent types Co-Authored-By: mikayla@zed.dev 2022-08-22 16:16:39 -07:00
K Simmons
0d6125889f WIP 2022-08-22 16:16:39 -07:00
K Simmons
03a344a272 properly constrained tab 2022-08-22 16:16:39 -07:00
K Simmons
ab9f073443 fixed merge errors 2022-08-22 16:16:39 -07:00
K Simmons
133c194f4a wip tab drag and drop 2022-08-22 16:16:39 -07:00
K Simmons
a650c146f1 more event wip 2022-08-22 16:16:39 -07:00
K Simmons
53add253b6 wip new mouse region events 2022-08-22 16:16:39 -07:00
ForLoveOfCats
55be05b05c Toggle window zoom/maximize when double clicking titlebar 2022-08-19 16:26:31 -04:00
Max Brunsfeld
754a130e59 Clear go-to-def link when deactivating the window 2022-08-15 17:30:41 -07:00
K Simmons
9aa3f2d777 clippy fixes for focus change 2022-08-10 16:51:01 -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
K Simmons
4d38dcfc54 Fix workspace 2022-08-10 16:27:45 -07:00
K Simmons
d68f227ec4 Fix failing tests 2022-08-10 16:26:53 -07:00
K Simmons
f5a6a112c8 Address picker issues 2022-08-09 17:15:54 -07:00
K Simmons
6f180ed822 Pane focus working. Modals seem broken now 2022-08-09 17:15:54 -07:00
K Simmons
690ea57211 WIP compiling but failing with circular reference 2022-08-09 17:15:52 -07:00
K Simmons
6442ec59e7 Switch action dispatch to use MutableAppContext parent utilities and delete parent map from presenter 2022-08-09 17:09:28 -07:00
K Simmons
4271eb3624 Event dispatch moved to MutableAppContext. No longer dispatches from presenter. Not currently handling key presses properly 2022-08-09 17:09:16 -07:00
ForLoveOfCats
3d9821b430 Jankily adjust left padding on workspace title in fullscreen
This could seriously be done better

Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-09 19:03:32 -04:00
ForLoveOfCats
43b9f3beb3 Invalidate view when entering/exiting fullscreen
This is required for `render_titlebar` to eventually adapt to
fullscreen status to affect the size of left padding on workspace
name to account for the traffic lights presence/absence

Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-09 19:03:32 -04:00
Mikayla Maki
4549395d02 update icon 2022-08-04 11:58:55 -07:00
Mikayla Maki
314c26e4ec Removed icons 2022-08-04 08:42:42 -07:00
Mikayla Maki
96cc6d5ce5 Added icons to context menu 2022-08-03 16:47:41 -07:00
Mikayla Maki
bf0ec13e65 New button 2022-08-03 15:59:25 -07:00
Antonio Scandurra
aa09bc527f Allow signing in again if authentication is pending or was unsuccessful
The local server that we spin up to receive OAuth callbacks isn't
called when an error occurs and it is non-trivial to do so with
next-auth. Besides, there could be cases where the user explicitly
closes the browser window before the callback can be invoked.

With this commit, the user can sign in even while an authentication
is still in progress. As opposed to waiting for at most 10 minutes
before killing the local HTTP server if we haven't received the callback,
we will repeatedly check for a response every second for 100 seconds.
This gives us a chance to determine whether a new authentication has started
in the meantime and, if so, abort the current authentication flow.
2022-08-02 14:16:14 +02:00
Antonio Scandurra
df6e733e68 Open both old and new log files, but just retain the last 1000 lines 2022-07-28 10:25:40 +02:00
Keith Simmons
4ff007eaab
Merge pull request #1414 from zed-industries/fix-theme-issues
Fix tab bar themes
2022-07-26 11:55:17 -07:00
K Simmons
2bd0819ac8 Extract tab bar from workspace 2022-07-26 10:41:02 -07:00
Antonio Scandurra
8552ba15dc Show symbols located in visible paths before ones located externally 2022-07-26 14:48:18 +02:00
Julia
888405a4b2
Merge pull request #1409 from zed-industries/middle-mouse-close-tabs
Allow closing tabs with the middle mouse button
2022-07-25 17:05:00 -04:00
ForLoveOfCats
36d789ff84 Allow closing tabs with the middle mouse button 2022-07-25 14:23:38 -04:00
Antonio Scandurra
ca3e73106c Merge branch 'main' into ime-support-2 2022-07-25 10:47:49 +02:00
Mikayla Maki
8c1d4d877f
Merge pull request #1393 from zed-industries/graceful-exit
Polishing the terminal
2022-07-22 13:59:13 -07:00
Antonio Scandurra
7b009c8bbe Merge branch 'main' into ime-support-2 2022-07-22 16:03:38 +02:00
K Simmons
d6519ad280 Minor naming improvements and revert empty pane background color change 2022-07-21 14:56:17 -07:00
Mikayla Maki
c6d5decbf9 Finished erorr terminal refactoring 2022-07-21 12:37:15 -07:00
Antonio Scandurra
97ce3998ec Position IME input according to where the selection is rendered 2022-07-21 17:35:40 +02:00
K Simmons
fb2fbf2ac7 fix test failure 2022-07-20 19:13:16 -07:00
K Simmons
daceb1eb5f Fix warning 2022-07-20 19:02:12 -07: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
Nate Butler
46384e71b7 Add icon sets for sizes 8, 12 and 16, remove old icons 2022-07-19 17:11:15 -04:00
K Simmons
8add81350e Rework presenter and MouseRegion to use Handler hashmap rather than individual fields 2022-07-17 23:19:32 -07:00
Nate Butler
4ca4449394 Update icons in rust
Updated icons
- Diagnostic states
- Sidebar icons (project, contacts)
- Navigation arrows
2022-07-16 11:51:10 -04:00
Antonio Scandurra
d89465c451
Merge pull request #1356 from zed-industries/differentiate-same-tab-titles
Differentiate among tabs with the same name
2022-07-15 08:30:22 +02:00
Antonio Scandurra
49ef33090c Add test for tab disambiguation 2022-07-14 16:42:30 +02:00
Antonio Scandurra
07d269234f Differentiate among tabs with the same name
This commit introduces a new, optional `Item::tab_description` method
that lets implementers define a description for the tab with a certain
`detail`. When two or more tabs match the same description, we will
increase the `detail` until tabs don't match anymore or increasing the
`detail` doesn't disambiguate tabs any further.

As soon as we find a valid `detail` that disambiguates tabs enough, we
will pass it to `Item::tab_content`. In `Editor`, this is implemented by
showing more and more of the path's suffix as `detail` is increased.
2022-07-14 11:54:11 +02:00
K Simmons
52b29c0928 When tab closed, move to previous tab, and when opening an existing tab, reorder it to be after the current active tab 2022-07-13 20:14:44 -07:00
Antonio Scandurra
9677db9f8f Deploy context menu when clicking on split icon 2022-07-13 12:15:36 +02:00
Antonio Scandurra
c87efb0dbc Show split button at the right edge of the tab bar 2022-07-13 11:44:33 +02:00
Antonio Scandurra
b1e3b38cb3 Don't prompt guest to save when closing window after disconnection 2022-07-12 09:05:39 +02:00
Mikayla Maki
bbd0c0d44d Merge branch 'main' into gpui-changes 2022-07-07 16:08:32 -07:00
Mikayla Maki
9fd2bf2fa1 Updated drag API to pass old,new, instead of delta,new 2022-07-07 16:07:24 -07:00
Max Brunsfeld
6642b78331 Add tooltips to pane nav buttons and make them trigger on click 2022-07-07 13:36:08 -07:00
Mikayla Maki
b2fa511acd GPUI change proposals 2022-07-06 17:52:20 -07:00
Max Brunsfeld
70cf6b4041 Give nav buttons a background on hover 2022-07-06 16:33:44 -07:00
Max Brunsfeld
4e8dbbfd4b Add test for pane nav history covering notification of pane's toolbar 2022-07-06 16:29:11 -07:00
Max Brunsfeld
a378ec49ec Enable and disable nav buttons based on pane's navigation stack
Also, make the `NavHistory` type private to the `workspace` crate.
Expose only the `ItemNavHistory` type, via a method on Pane called
`nav_history_for_item`.
2022-07-06 15:46:43 -07:00
Max Brunsfeld
7e5cf6669f Add forward and backward navigation buttons to toolbar 2022-07-06 14:05:24 -07:00
Max Brunsfeld
a858b3fda9 Treat window deactivation as a focus change for the purpose of autosave 2022-07-06 11:20:29 -07:00
Antonio Scandurra
ab4931da65 Prevent autosave for deleted files 2022-07-06 17:25:33 +02:00
Antonio Scandurra
9286893177 Save item when closing it if autosave on focus change is enabled 2022-07-06 17:04:41 +02:00
Antonio Scandurra
5e00df6267 Move autosave tests down into Workspace 2022-07-06 16:55:05 +02:00
Antonio Scandurra
b937c1acec Move autosave logic up into Workspace and Pane 2022-07-06 16:33:22 +02:00
Max Brunsfeld
8048758990 Add application menu item to open default key bindings 2022-07-05 12:41:38 -07:00
Max Brunsfeld
581c9af395 Adjust pane, tab, panel management bindings to match VS Code 2022-06-29 15:33:46 -07:00
Max Brunsfeld
8fe6809932 Exclude hidden worktrees from project's diagnostic summaries 2022-06-28 14:23:24 -07:00
Antonio Scandurra
57f34c6992 💄 2022-06-28 08:04:39 +02:00
Antonio Scandurra
c6e7ae528f Add test for reopening closed items 2022-06-27 17:59:25 +02:00
Antonio Scandurra
0652542f60 Introduce pane::ReopenClosedItem bound to cmd-shift-t 2022-06-27 17:44:33 +02:00
Antonio Scandurra
a21dbdd0d6 Update window edited status when pane item is removed 2022-06-23 14:28:10 +02:00
Antonio Scandurra
d9b5357234 Always prevent window from closing and manually invoke Workspace::close
This ensures we ask the user to save their state if there are unsaved
changes.
2022-06-23 11:44:14 +02:00
Antonio Scandurra
ca8ddcdeec Set window's edited = true when there are unsaved changes 2022-06-23 10:59:50 +02:00
Antonio Scandurra
137a3996a1 Replace "Remove Folder from Project" label with "Remove from Project` 2022-06-20 10:53:26 +02:00
Max Brunsfeld
dd7b874039 Return focus to the workspace center on escape 2022-06-16 11:30:02 -07:00
Antonio Scandurra
4e4210ac39 Open a buffer for every language server error when clicking on status 2022-06-16 10:00:29 +02:00
Antonio Scandurra
516bd13474 Add tooltip to follow collaborators 2022-06-15 17:08:39 +02:00
Antonio Scandurra
f2a48c6b02 Add tooltips for sidebar buttons 2022-06-15 13:50:04 +02:00
Antonio Scandurra
da1eb91935 Replace pane::Split action with Split{Left,Up,Right,Down}
This allows us to show them in the command palette.
2022-06-15 13:06:59 +02:00
Antonio Scandurra
68093342e7 Broadcast only visible worktree root names 2022-06-14 15:15:23 +02:00
Antonio Scandurra
cfbd8b94d1 Prevent setting files from showing up in project and contacts panels 2022-06-14 14:47:16 +02:00
Max Brunsfeld
b9eb875bf4 Prompt to save changes before quitting the app 2022-06-10 17:26:33 -07:00
Antonio Scandurra
3a69943df3 Require that PartialEq is implemented for Action 2022-06-06 09:18:44 +02:00
Antonio Scandurra
74aa9c1320 Capture mouse events when rendering disconnected overlay
We do so by replacing `EventHandler::capture` with a new `::capture_all` method.
After switching to mouse regions as part of zed-industries/zed#1081, overriding
`dispatch_event` on `EventHandler` wasn't enough anymore because mouse interactions
take place on a privileged code path that runs *before* dispatching any event.

With this change, `EventHandler` will now push a mouse region that intercepts all
mouse interactions, as well as pushing a cursor region that resets the cursor style
to `Arrow`.

One interesting change as part of this is that we've removed the ability to see which
event we are capturing: we were not using this capability anyway and `capture_all` provides
a simpler interface, so I went with that. In the future, we can opt into capturing specific
events or mouse interactions if there's a code path that needs that.
2022-06-04 10:41:29 +02:00
Max Brunsfeld
41b7fd4a27 Rename a public/private to online/offline in a few more places 2022-06-03 17:08:44 -07:00
Max Brunsfeld
e18bc24989 Rename project's 'public'/'private' flag to 'online'/'offline' 2022-06-03 14:39:06 -07:00
Max Brunsfeld
afdd386057 Move persistence and restoration logic from workspace into project
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-03 11:52:14 -07:00
Max Brunsfeld
6a3a3a1124 Add tooltip to the toggle public button in the contacts panel
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-03 10:36:29 -07:00
Max Brunsfeld
f7e7a7c6a7 Use rocksdb to store project paths' public/private state 2022-06-02 17:38:33 -07:00
Max Brunsfeld
3ea061a11e Allow making projects private 2022-06-02 17:32:42 -07:00
Max Brunsfeld
7ef9de32b1 Show private projects in the contacts panel
Introduce a ProjectStore that lets you iterate through all open projects.
Allow projects to be made public by clicking the lock.
2022-06-02 17:29:11 -07:00
Max Brunsfeld
a60fef52c4 Start work on private projects 2022-06-02 17:29:11 -07:00
Antonio Scandurra
d180f7a2c3 Jump to primary diagnostic when clicking on header's jump icon 2022-05-31 16:25:14 +02:00
Antonio Scandurra
339069b1d3 Cap MessageStream buffer size to 1MB
We temporarily let it grow when the message size exceed the limit,
but restore the buffer's capacity shortly after. This ensures that,
for each connection in its entire lifetime, we only ever use 1MB.
2022-05-31 11:16:32 +02:00
Antonio Scandurra
20e1044d49 Merge branch 'main' into project-panel-with-new-mouse-events 2022-05-30 18:29:46 +02:00
Max Brunsfeld
a88b4eb3c5 Populate the window title whenever worktrees or active path change
* Refactor the way the project's active entry is assigned. Assign it
  together with the window title, as opposed to on every notification
  from a pane.
* Emit the ActiveItem event from panes consistently, even when adding
  the first item to an empty pane.
2022-05-27 10:51:14 -07:00
Antonio Scandurra
9099c40364 Merge branch 'mouse-events' into project-panel-context-menu 2022-05-27 12:07:00 +02:00
Antonio Scandurra
82d6e606fc Use a MouseEventHandler for activating tabs on mouse down
Previously, we were using an `EventHandler` which doesn't take into
account other mouse regions floating above the rendered element. This
was problematic because, when clicking the `x` icon on a tab that was
not active, we were first activating it and then closing it.
2022-05-27 11:43:58 +02:00
Antonio Scandurra
98de269b4a Don't focus editor when clicking on sidebar resize handle 2022-05-27 11:36:37 +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
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
Nathan Sobo
b110fd5fb7 Render a context menu when right-clicking in project panel
It doesn't currently do anything, but I managed to get it rendering in an absolutely positioned way.
2022-05-26 09:59:25 +02:00
Antonio Scandurra
3ac6fc89c1 Pretty-print JSON of server snapshot 2022-05-26 09:34:39 +02:00
Max Brunsfeld
acf9a59cc2
Merge pull request #1027 from zed-industries/missing-menu-commands
Add missing File menu commands, improve handling of unsaved multibuffers
2022-05-23 21:29:32 -07:00
Max Brunsfeld
ece8604547 Fix comments in Pane::close_items 2022-05-23 18:07:22 -07:00
Max Brunsfeld
0becbe482a Distinguish between singleton and non-singleton workspace items
* Prompt to save singleton items before non-singleton ones
* Don't prompt to save multi-buffers if they contain excerpts to items that are open elsewhere and not being closed.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-23 16:03:00 -07:00
Nathan Sobo
d8dbbf1c05 Merge remote-tracking branch 'origin/main' into invite-codes-2 2022-05-23 15:46:39 -06:00
Max Brunsfeld
fbd589b589 Start work on handling multibuffers properly when closing unsaved buffers 2022-05-22 16:48:33 -07:00
Max Brunsfeld
21206800bc Add "Close Window" command 2022-05-20 16:53:03 -07:00
Max Brunsfeld
b08cad9ef5 Add "Save As" command 2022-05-20 16:24:42 -07:00
Max Brunsfeld
8ed33cadeb Add "Add Folder to Project" command to application menu 2022-05-20 16:19:43 -07:00
Max Brunsfeld
e72f5cea22 Add "New Window" command 2022-05-20 11:01:20 -07:00
Antonio Scandurra
0597c662e4 Show contacts panel the first time a new user connects to collab
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-20 17:33:09 +02:00
Max Brunsfeld
c4554c1720 Replace build_workspace fn with an initialize function that takes a workspace
This makes it clearer that the function is not providing necessary
dependencies to a workspace, but rather configuring it with all of
the panels and widgets which are defined in downstream crates.
2022-05-19 16:50:22 -07: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
Max Brunsfeld
9b29245590 Avoid duplicate notifications
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-17 11:19:22 -07:00
Antonio Scandurra
8f88803695 Automatically follow host when joining a project 2022-05-17 15:35:57 +02:00
Antonio Scandurra
cc598a6f71 Send LeaveProject when waiting room is dismissed while waiting 2022-05-17 11:25:14 +02:00
Nathan Sobo
d821e7a4c1 Cancel join requests when the requester closes the window 2022-05-16 20:29:36 -06:00
Nathan Sobo
7c3eebf93e Refine messages on waiting to join screen and include host avatar 2022-05-16 16:52:31 -06:00
Antonio Scandurra
ed6ed99d8f Show the reason why a join request was declined
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-16 19:57:50 +02:00
Antonio Scandurra
aa90c06012 Display a temporary window while remote project is loading 2022-05-16 17:45:50 +02:00
Max Brunsfeld
be51a58311 Start work on requesting to join projects
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-12 17:53:11 -07:00
Antonio Scandurra
c7802af88b Use cmd-9 and cmd-shift-9 to toggle contacts panel focus/visibility 2022-05-12 12:11:27 +02:00
Max Brunsfeld
0ba656aa0e Improve layout and styling of contact notifications
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-11 14:20:05 -07:00
Antonio Scandurra
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
Nathan Sobo
fe89de8b11 Dismiss contact request notification if request is cancelled 2022-05-10 18:50:18 -06:00
Nathan Sobo
3bca1c29e2 Present a blank notification upon receipt of a contact request 2022-05-10 18:33:39 -06:00
Nathan Sobo
bd2ae304fa Start on workspace notifications 2022-05-10 17:46:46 -06:00
Nathan Sobo
9c68c3e8a9 Put context parameter last in toggle_modal callback
This is more consistent with our treatment of context params everywhere else.
2022-05-10 16:46:53 -06:00
Max Brunsfeld
dc465839e1 Round sidebar panels' widths to whole numbers of pixels
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-10 11:25:51 -07:00
Nathan Sobo
b721f0064a Start on contact finder modal
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-10 07:24:14 -06:00
Antonio Scandurra
954fabec42 Don't hide sidebar when hitting cmd-1
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-05 15:34:36 +02:00
Antonio Scandurra
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
Antonio Scandurra
3ee4d90c19 Parameterize avatar_margin and assign it a default of 8 2022-05-03 18:04:53 +02:00
Antonio Scandurra
5d0c3c43e8 Add right padding to titlebar instead of margins on elements
This fixes a visual glitch causing the avatar to be shown too close to
the right edge of the window when the share icon was not present.
2022-05-02 09:27:37 +02:00
Max Brunsfeld
8481834847 Give hover state to picker items, keystrokes in command palette 2022-04-28 15:17:56 -07:00
Max Brunsfeld
6578ae5393 Use Interactive helper to theme titlebar buttons 2022-04-28 12:08:15 -07:00
Max Brunsfeld
772f4579fc Restructure status bar theme to style interactive elements more concisely
Introduce an `Interactive` wrapper type that allows themes to selectively
override properties of items in a hovered or active state.
2022-04-28 10:59:32 -07:00
Max Brunsfeld
e88156645d Update the styling of the lsp status indicator 2022-04-27 16:48:33 -07:00
Max Brunsfeld
9e87be722e Start re-styling diagnostic indicator in status bar 2022-04-27 14:25:39 -07:00
Max Brunsfeld
7f63ed3835 Allow styling sidebar icons and groups in themes 2022-04-27 14:25:39 -07:00
Max Brunsfeld
0291f2d54a Move sidebar toggle buttons to the status bar 2022-04-27 14:25:39 -07:00
Nathan Sobo
78afbb3599 Remove async-std and surf from client
Switch to isahc library. It's not as fancy, but it works and has a smaller footprint.
2022-04-26 21:19:15 -06:00
Antonio Scandurra
c955645bc0 Update share icon and swap its posiiton 2022-04-26 14:35:13 +02:00
Antonio Scandurra
9d6a7a83a0 Show worktree root names in titlebar and align them left 2022-04-26 13:21:58 +02:00
Nathan Sobo
92f040df00 Apply cursor styles during paint
This makes the editor's cursor an IBeam and properly deals with nested cursor styles.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-22 10:54:18 -06:00
Antonio Scandurra
3def7a6803 Avoid flicker when toggling project browser on workspace open 2022-04-22 11:53:45 +02:00
Antonio Scandurra
9730213ed7 Move project browser toggling logic in workspace::open_paths 2022-04-22 11:25:23 +02:00
Antonio Scandurra
bba65e120d Add only one worktree when running zed /dir /dir/file 2022-04-22 11:06:17 +02:00
Antonio Scandurra
9d8e3f51c8 Show project panel when opening a folder via the CLI 2022-04-22 10:45:46 +02:00
Antonio Scandurra
fb87bacc7e Merge branch 'main' into auto-update 2022-04-21 09:53:06 +02:00
Antonio Scandurra
f7055c2acc Implement zed --wait 2022-04-20 17:28:31 +02:00
Max Brunsfeld
eee1cec3d4 🎨 Remove unnecessary JoinProjectParams struct 2022-04-20 17:27:33 +02:00
Max Brunsfeld
20657566b3 Make all pickers respect mouse clicks 2022-04-18 17:11:39 -07:00
Max Brunsfeld
4630071f58 Start work on a command palette 2022-04-18 17:11:08 -07:00
Max Brunsfeld
2ea2ba358f Add back toggle sidebar key bindings 2022-04-13 11:14:10 -07:00
Max Brunsfeld
949fbe7cd3 Allow dumping the project diagnostic view's state as JSON
Also, improve DebugElements action so that it shows the JSON in an editor.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-04-11 19:51:46 -07:00
Max Brunsfeld
92a5c30389 Merge branch 'main' into load-keymaps 2022-04-11 15:55:10 -07:00