Commit Graph
10394 Commits
Author SHA1 Message Date
Nate Butler affdd9655e Update scrollbar selection style 2023-07-06 10:54:47 -04:00
Piotr Osiewicz 9260f5d093 Save a flushing line instead of discarding it 2023-07-06 13:52:03 +02:00
Piotr Osiewicz 6022da58f3 Add hunk merging 2023-07-06 13:31:45 +02:00
Piotr Osiewicz 850e35f5cb fixup! Do not render multiple hunks for the same line 2023-07-06 12:11:08 +02:00
Piotr Osiewicz f3899e3246 Do not render multiple hunks for the same line 2023-07-06 12:09:33 +02:00
Piotr Osiewicz a5afd99a66 Merge branch 'main' into Z-1292/show_search_results_in_scrollbar 2023-07-06 11:43:44 +02:00
Kirill Bulatov 3d8a473e45 Use less padding for typescript parameter hints (#2684)
Part of https://linear.app/zed-industries/issue/Z-2537/inlay-hint-issues

Release Notes:

- N/A
2023-07-06 11:23:20 +03:00
Kirill Bulatov 19c11a9a49 Use less padding for typescript parameter hints 2023-07-06 11:16:39 +03:00
Antonio Scandurra c292524797 Fix panic when saved conversations directory changes (#2685)
Fixes
https://linear.app/zed-industries/issue/Z-2542/deleting-assistant-conversations-with-zed-open-can-cause-a-crash

We were updating the view's state but missed a `notify`, which caused
the `UniformList` responsible for rendering the saved conversations to
panic when some files were deleted.

Release Notes:

- Fixed a crash that could happen when deleting a saved assistant
conversation from the filesystem.
2023-07-06 10:06:43 +02:00
Antonio Scandurra c64695b58a Fix panic when saved conversations directory changes
We were updating the view's state but missed a `notify`, which caused
the `UniformList` responsible for rendering the saved conversations
to panic when some files were deleted.
2023-07-06 09:53:34 +02:00
Mikayla Maki 0a81688832 Move audio dependency to dev 2023-07-05 12:15:56 -07:00
Mikayla Maki bcad49983c Remove spurious audio depedency 2023-07-05 12:05:16 -07:00
Mikayla Maki 4876ac6d52 collab 0.16.0 2023-07-05 11:47:17 -07:00
Joseph T. Lyons bb46187ee5 v0.95.x dev 2023-07-05 14:17:37 -04:00
Nate Butler 299e91e3da Z-2276/Z-2275: Project & Branch switchers (#2662)
This PR adds project and branch switchers in top left corner. 

Release Notes:
- Added a project & branch switcher under project name.
2023-07-05 13:09:40 -04:00
Piotr Osiewicz d5bfe74ab2 cargo fmt 2023-07-05 18:57:06 +02:00
Nate ButlerandPiotr Osiewicz 3950cb48f4 Update project & git menus to be Toggleable<Interactive<ContainedText>>
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-07-05 12:50:56 -04:00
Nate Butler 2c01cbf7e1 Update collaboration sounds, add sounds to screensharing (#2679)
Updates all collab sounds, add screen sharing sounds.

Release Notes:

- Improved collaboration sounds for joining and leaving a call, muting
and unmuting the mic.
- Added a sound when you start and stop screen sharing.
2023-07-05 12:30:47 -04:00
Piotr Osiewicz 1b764e7ff3 Do not render recent paths in toolbar's project switcher 2023-07-05 18:04:40 +02:00
Piotr OsiewiczandAntonio 6342bf2f58 branch_list: Show match count on the right hand side of a header.
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 16:56:08 +02:00
Piotr OsiewiczandAntonio 398be06150 Track regions instead of clicks.
Get rid of superfluous params in RenderParams related to hover & click state.

Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 16:48:52 +02:00
Kirill Bulatov af21bae591 Simplify inlay map data (#2683)
Current logic does not need to access inlays by id in O(1), future
dynamic hints would need to know which hint they hover at, but that will
be done using binary search over the position's anchor we hover on;
nothing else seems to need this HashMap in the near future.

Because of that removal, no need to store `InlayId` apart from the
`Inlay`, hence remove the `InlayProperties` struct entirely.
This allows to eliminate a few generics along the way.

Release Notes:

- N/A
2023-07-05 16:31:47 +03:00
Piotr OsiewiczandAntonio 5d49c127a9 Fix click-through behaviour of git panel
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 15:25:33 +02:00
Kirill Bulatov aba730bb6d Remove InlayProperties 2023-07-05 16:17:14 +03:00
Kirill Bulatov c173345c86 Simplify inlay map data 2023-07-05 15:23:56 +03:00
Piotr Osiewicz 39a30ba7b3 fixup! Remove stacks from branch list header 2023-07-05 14:08:21 +02:00
Piotr OsiewiczandAntonio 6c6c87f026 Remove stacks from branch list header
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 14:04:16 +02:00
Antonio Scandurra 7cc2ccdb39 Support assistant: quote selection on multibuffers (#2682)
Fixes
https://linear.app/zed-industries/issue/Z-2430/assistant-quote-selection-does-not-work-in-multi-buffer

Release Notes:

- Added support for invoking `assistant: quote selection` (`cmd->`) when
editing a multi-buffer.
2023-07-05 11:49:03 +02:00
Antonio Scandurra 0db9e702b8 Support assistant: quote selection on multibuffers 2023-07-05 11:41:24 +02:00
Antonio Scandurra 67575edb6f Restore focus to previously focused view when dismissing a modal (#2680)
Fixes
https://linear.app/zed-industries/issue/Z-2500/focus-is-moved-from-the-assistant-panel-when-opening-and-closing

Release Notes:

- Fixed a bug that caused modals (such as the command palette) to not
restore focus when dismissing them.
2023-07-05 11:37:45 +02:00
Antonio Scandurra 4b58f2b8dd Restore focus to previously focused view when dismissing a modal 2023-07-05 09:40:26 +02:00
Antonio Scandurra 194bf772be Add Modal::has_focus and introduce a ModalHandle trait object 2023-07-05 09:39:56 +02:00
Antonio Scandurra 1d1a52dea4 Introduce a WindowContext::focus method that implies the window id 2023-07-05 09:39:04 +02:00
Nate Butler 00e0cfc80a Update collaboration sounds, add sounds to screensharing 2023-07-04 16:18:42 -04:00
Kirill Bulatov 5fb68ae667 Accept null as a valid action, to disable a keystroke (#2678)
Deals with https://github.com/zed-industries/community/issues/772
Closes
https://linear.app/zed-industries/issue/Z-1518/allow-keybindings-to-be-removed

Now, configuration like 
```json5
[
    {
        "context": "Editor",
        "bindings": {
            "alt-v": null,
        }
    }
]
```

will make `alt+v` to print `√` instead of moving the caret one page up.

Release Notes:

- Added a way to disable keybindings with `null` value
2023-07-04 21:51:46 +03:00
Kirill BulatovandMikayla Maki 7b2aaa20d8 Accept null as a valid action, to disable a keystroke
co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-07-04 21:11:28 +03:00
Nate Butler 6104cee838 Rename color_scheme -> theme (#2677)
Just some theme tidying, renames some things to be more consistent with
our planned naming conventions going forward.

Release Notes:

- N/A (No public facing changes)
2023-07-04 11:56:30 -04:00
Piotr Osiewicz c4de04454f Remove PickerEvent::Dismiss emission from picker header 2023-07-04 16:30:17 +02:00
Piotr Osiewicz 833ed41fa8 Fix click behaviour of vcs/project dropdowns 2023-07-04 16:00:59 +02:00
Nate Butler 812b51e5d9 Remove unused ts aliases 2023-07-04 01:37:45 -04:00
Nate Butler 1ca9f64e30 color_scheme -> theme 2023-07-04 01:20:56 -04:00
Nate Butler 388b50161b Remove unused color_scheme field in the theme (#2676)
We removed the `theme_testbench` crate a while back - It seems like that
was the only thing using the `color_scheme` field in the exported theme.

Removing this from the theme removes something like 42k lines of
generated JSON every time we build the theme (2k lines / 28% of the
total lines per generated theme!)

Release Notes:

- N/A (No public facing changes)
2023-07-04 00:58:37 -04:00
Nate Butler 5d7f524850 Remove unused color_scheme field in the theme
I totally didn't mean to commit this right to main T_T
2023-07-04 00:44:12 -04:00
Nate Butler 3cba06098b Revert "Remove unused color_scheme field in the theme"
This reverts commit c10e08d014.
2023-07-04 00:41:13 -04:00
Nate Butler c10e08d014 Remove unused color_scheme field in the theme 2023-07-04 00:40:01 -04:00
Nate Butler fdd9af728b Use theme store to pass color_scheme directly to components (#2675)
This PR adds a theme store to allow components to directly access the
theme without requiring it to be passed down as props every time it is
used.

So before, you might need to do something like `text(theme, "variant",
"hovered")`, you could now just call `text("variant", "hovered")`.

This also means that style_trees don't need to be called with a theme
either:

```ts
export default function app(): any {
    const theme = useTheme()

    return {
        meta: {
            name: theme.name,
            is_light: theme.is_light,
        },
        command_palette: command_palette(),
        contact_notification: contact_notification(),
        // etc...
    }
}
```

We do this by creating a zustand store to store the theme, and allow it
to be accessed with `useThemeStore.getState().theme`.

```ts
import { create } from "zustand"
import { ColorScheme } from "./color_scheme"

type ThemeState = {
    theme: ColorScheme | undefined
    setTheme: (theme: ColorScheme) => void
}

export const useThemeStore = create<ThemeState>((set) => ({
    theme: undefined,
    setTheme: (theme) => set(() => ({ theme })),
}))

export const useTheme = (): ColorScheme => {
    const { theme } = useThemeStore.getState()

    if (!theme) throw new Error("Tried to use theme before it was loaded")

    return theme
}
```

Release Notes:

- N/A (No public facing changes)
2023-07-04 00:37:45 -04:00
Nate Butler 8d6f9c24df Update a few more components 2023-07-04 00:32:27 -04:00
Nate Butler dde77750c6 Use theme store to pass color_scheme directly to components 2023-07-04 00:13:04 -04:00
Mikayla Maki 40a79d8eb6 Add sound effects to calls (#2673)
This PR adds joined, leaving, mute, and unmute sound effects to Zed. 

Release Notes:

- Added joined, leaving, mute, and unmute sound effects (preview-only)
2023-07-03 13:55:48 -07:00
Mikayla Maki dbe2e418eb Guard against uninstantiated globals in tests 2023-07-03 13:48:17 -07:00