Commit Graph
1441 Commits
Author SHA1 Message Date
Mikayla Maki b60c8a4cee Document more gpui (#4187)
Also add several `TODO!(docs)` comments to places that need more
feedback.

Release Notes:

- N/A
2024-01-21 15:10:04 -08:00
Mikayla 91ecd8a9ad Restore erronously removed APIs 2024-01-21 14:33:34 -08:00
Mikayla 5383377472 Fix typos, mark docs related todos in GPUI 2024-01-21 14:28:40 -08:00
Mikayla 25f5c4aa1a Document / lockdown more of GPUI 2024-01-21 14:26:45 -08:00
Piotr Osiewicz a8f1c15a1e chore: Fix clippy::needless_borrow up to an editor 2024-01-21 15:03:24 +01:00
Thorsten Ball 2edbfac197 When searching in visual mode switch to normal mode (#4178)
This matches Neovim behaviour by setting the mode to `Normal` when using
search while in visual mode.

Release Notes:

- Fixed Vim mode not switching to normal mode from visual mode when
using search (`/`) while in visual mode.
2024-01-21 08:42:47 +01:00
Mikayla ce91c04d2f Fix issues in element comment 2024-01-20 20:19:01 -08:00
Mikayla 881ea4c41b Fix compile issue 2024-01-20 20:15:43 -08:00
Mikayla 6ac33dad51 Document the canvas and div 2024-01-20 20:15:23 -08:00
Mikayla e3ad0f794c Finish documenting the action, asset, color, and element modules in GPUI
Remove SmallVec from the public API of GPUI
2024-01-20 20:15:23 -08:00
Conrad Irwin 023ee8f83d Updates to chat after Hack#2 (#4175)
Release Notes:

- Channels: Improved font sizes in chat
- Channels: Added a link preview when hovering over links in chat
- Channels: Fixed rendering of newlines in chat messages
- Added a new setting "use_autoclose" (defaulting to true) that lets you
disable autoclose per language.
([#1420](https://github.com/zed-industries/community/issues/1420))
([#1903](https://github.com/zed-industries/community/issues/1903))
2024-01-20 20:03:37 -07:00
Mikayla 860e6cc756 Lock down test platform implementation 2024-01-20 15:03:36 -08:00
Mikayla 67d68085a8 Fix typo 2024-01-20 14:42:38 -08:00
Mikayla 0eaa421c75 Lock down mac os platform type visibility in the rest of GPUI
Add documentation to all platform types
2024-01-20 14:38:03 -08:00
Conrad Irwin d7a7a545d9 Merge remote-tracking branch 'origin/main' into chat-font-size 2024-01-20 14:51:53 -07:00
Thorsten BallandConrad 2832b149be When searching in visual mode switch to normal mode
This matches Neovim behaviour by setting the mode to `Normal` when using
search while in visual mode.

Co-authored-by: Conrad <conrad@zed.dev>
2024-01-20 16:33:07 +01:00
Mikayla ac8bcd985f Make platform input handler private
Automatically record the context on non-view input handlers
Simplify the async window context update() method
2024-01-20 06:56:19 -08:00
Conrad Irwin 50d3584a53 Link previews in chat 2024-01-19 16:59:17 -07:00
Conrad Irwin acdc9e48fd Merge branch 'main' into fix-notification-positioning 2024-01-19 12:55:52 -07:00
Conrad Irwin 2d7343f8d2 Fix positioning of windows on secondary displays
CGDisplayBounds returns data in "global display coordinates" (which are
the same as Zed's coordinates), different from the NS APIs which use
"screen coordinates" (which have the Y axis inverted)

Also remove some transmutes while we're at it
2024-01-19 12:51:59 -07:00
Marshall Bowers 71da02dba7 Fix documentation labels obscuring other content in completion menu (#4167)
This PF fixes an issue where the documentation labels in the completion
menu could end up completing obscuring the primary content.

#### Before
<img width="691" alt="Screenshot 2024-01-19 at 1 42 19 PM"
src="https://github.com/zed-industries/zed/assets/1486634/187f2978-08be-4f5e-ba93-91ed09cd6e87">

#### After

<img width="704" alt="Screenshot 2024-01-19 at 1 39 45 PM"
src="https://github.com/zed-industries/zed/assets/1486634/e5929c04-bace-4336-b878-4ada5660d235">

Since this involved changes to the `ListItem`, I also made sure to test
the other problematic case that was fixed in #3845 to make sure we
didn't regress there:

<img width="665" alt="Screenshot 2024-01-19 at 1 39 11 PM"
src="https://github.com/zed-industries/zed/assets/1486634/14b72d44-b6a6-4aef-a708-37fb60b8875a">

I also tried to capture these cases in the `ListItem` stories to make it
easier to test all of them at once:

<img width="1141" alt="Screenshot 2024-01-19 at 1 40 03 PM"
src="https://github.com/zed-industries/zed/assets/1486634/333886ff-e394-4cba-89db-98352481c7f6">

Release Notes:

- Fixed an issue where documentation labels could obscure other content
in the editor completion menu
([#2419](https://github.com/zed-industries/community/issues/2419)).
2024-01-19 14:01:09 -05:00
Conrad Irwin 2f7859f74d Fix panic in window open (#4148)
Fix a panic caused by toggleFullScreen on one window untoggling
full-screen on
another.

I managed to reproduce this only once, which makes me sad, but this
change
should fix it regardless.

https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1705631681238979

Release Notes:

- Fixed an occasional panic when opening a new fullscreen window.
2024-01-19 11:08:06 -07:00
Marshall Bowers 8602fa9ece Update tenses of doc comment summary lines (#4161)
This PR updates the tenses used by the summary line of doc comments to
match the [Rust API documentation
conventions](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#summary-sentence).

Specifically:

> The summary line should be written in third person singular present
indicative form. Basically, this means write ‘Returns’ instead of
‘Return’.

I'm sure there are plenty occurrences that I missed.

Release Notes:

- N/A
2024-01-19 11:18:50 -05:00
Antonio Scandurra 2b32ffaf0a Reuse layout for view's element when it wasn't cached 2024-01-19 10:26:39 +01:00
Conrad Irwin 68402f737f Show cursors for remote participants (#4082)
This PR enables cursors for remote participants.

They are shown for 2 seconds when you focus a buffer, and then on hover.

Release Notes:

- Added usernames next to remote cursors
2024-01-18 20:58:09 -07:00
Conrad Irwin 3a4c986998 Fix a double borrow error in window.open
It seems that sometimes calling toggleFullScreen will cause the
display_layer callback of a different window to fire.
2024-01-18 20:55:50 -07:00
Marshall Bowers 9d652b93d2 Rename overflow_hidden_{x,y} to overflow_{x,y}_hidden (#4146)
This PR renames the `overflow_hidden_x` and `overflow_hidden_y` methods
to `overflow_x_hidden` and `overflow_y_hidden`, respectively.

This provides consistency with our `overflow_x_scroll` /
`overflow_y_scroll` methods, as well as better matches Tailwind's
naming.

Release Notes:

- N/A
2024-01-18 22:10:41 -05:00
Mikayla Maki c9fd9f39c1 Fix popin for project panel by pre-resolving keybindings in the project panel (#4141)
Also, factors out the fluent building APIs from IntoElement into their
own traits.

Also makes the project panel context menu initialization fluent:

<img width="1328" alt="Screenshot 2024-01-18 at 3 33 45 PM"
src="https://github.com/zed-industries/zed/assets/2280405/3468b6f2-07f0-48cf-bec1-ac0379333209">

Release Notes:

- Fixed pop in when right clicking on the project panel.
2024-01-18 16:16:50 -08:00
Mikayla Maki a3fd200890 Merge branch 'main' into fix-popin-for-project-panel 2024-01-18 15:55:35 -08:00
Marshall Bowers 1d24172bbc Tweak the description of the gpui crate (#4142)
This PR tweaks the description of the `gpui` crate, since it's now the
only version.

There can only be one!

Release Notes:

- N/A
2024-01-18 18:52:16 -05:00
Mikayla cac85ecdb0 Pull out fluent builder helpers into re-usable trait 2024-01-18 15:31:31 -08:00
Max Brunsfeld ed031e2919 gpui: Always recompute layout on cache miss. (#4131)
I'm not yet sure whether this is 100% correct, but it seems to alleviate
the following issue:
`When opening a dock, the panel doesn't appear right away. An empty dock
is briefly visible.`
Release Notes:

- Fixed panel layout being incorrect for a brief time after opening
(fixes https://github.com/zed-industries/community/issues/2415)
2024-01-18 14:44:35 -08:00
Conrad Irwin 93b7de7363 Merge branch 'main' into cursors 2024-01-18 14:03:27 -07:00
Conrad Irwin 85e174f2da Revert "Store a z-index id per-layer (#4128)"
This reverts commit e4065c45cb, reversing
changes made to 6c2236ae1b.
2024-01-18 13:28:23 -07:00
Conrad Irwin 40af370595 Fix right click handler for tabs (#4130)
Also, some fun test helpers

Co-Authored-By: Mikayla <mikayla@zed.dev>

You can now use .debug_selector() to make it possible for tests to find
a given element,
and .debug_bounds() to find the coordinates of where it was painted.


Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
2024-01-18 13:07:25 -07:00
Piotr Osiewicz 42fd78f6ea gpui: Always recompute layout on cache miss. 2024-01-18 20:55:41 +01:00
Conrad IrwinandMikayla baee8dafd6 Fix right click handler for tabs
Also, some fun test helpers

Co-Authored-By: Mikayla <mikayla@zed.dev>
2024-01-18 12:10:38 -07:00
JuliaandNathan Sobo 2bd7894f59 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-18 13:24:25 -05:00
Thorsten BallandMikayla 6af3ecf1ce Fix missing icons: set svg_renderer when assets are updated
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-18 16:26:54 +01:00
Nathan Sobo 9c31d956b3 Merge remote-tracking branch 'origin/main' into ownership-post 2024-01-18 07:01:54 -07:00
Nathan Sobo 5e2b5d124b More adjustments for blog post 2024-01-18 07:01:46 -07:00
Piotr Osiewicz 287a137ee6 gpui: Bring back family and style names in font name suggestions 2024-01-18 12:10:17 +01:00
Antonio Scandurra 2478b68b52 Remove unused PlatformAtlas::clear method 2024-01-18 10:40:15 +01:00
Nathan Sobo 7dbafcfc3b Add ownership post example 2024-01-17 21:19:28 -07:00
Nathan Sobo 22e34db366 Adjust APIs for simpler examples in blog post 2024-01-17 21:19:28 -07:00
Mikayla Maki 607f2a7ba5 Add typo detection to CI (#4107)
Adding the typos crate to our CI will take some doing, as we have
several tests which rely on typos in various ways (e.g. checking state
as the user types), but I thought I'd take a first stab at fixing what
it finds.

Release Notes:

- N/A
2024-01-17 17:13:47 -08:00
Mikayla 29848a7dc9 Fix canary 2024-01-17 17:03:17 -08:00
Piotr Osiewicz fae58421f0 settings: Suggest fonts bundled in Zed (#4102)
Fixes an issue where Zed Sans is not being suggested as a font.

Release Notes:
- N/A
2024-01-18 00:54:07 +01:00
Mikayla aba6b33863 Add typos ci 2024-01-17 15:33:14 -08:00
Mikayla c9dff553af Fix a few more typos 2024-01-17 14:58:58 -08:00