Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
windows
Release Notes:
- (preview only) vim: fix switching between multiple windows
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
windows
This commit mostly fixes invalid URLs in docstrings. It also
encapsulates crates we reexport (serde stuff + linkme) into a public
module named "private" in order to reduce the API surfaced through docs.
Moreover, I fixed up a bunch of crates that were pulling serde_json in
through gpui explicitly instead of using Cargo manifest.
Release Notes:
- N/A
I essentially went through the publicly exported items and marked these
that are e.g. leaky reexports as pub(crate). I expect that'd be done on
Tuesday anyways.
Release Notes:
- N/A
* Fix an incorrect use of `Any::type_id` that prevented the disabling of
key bindings
* Restructured the representation of disabled key bindings so that they
handle context predicates correctly. Previously, to disable key binding,
you needed to supply the exact same context predicate (e.g. `Editor &&
mode == "full"`) as the binding that you are trying to disable. Now, the
context predicates of disabled key bindings are evaluated just like any
other context predicate (with the current context) to see if they apply.
Release Notes:
- Fixed an issue where disabling key bindings didn't work. To disable a
key binding, set it to `null` in your keymap.
This removes one of the path dependencies in gpui that's only really
needed by `workspace` (which can work around lack of these
implementations by itself). In theory it should also improve build
scheduling (as gpui doesn't have to wait for main dependency of sqlez -
libsqlite3 - to finish it's 25 seconds-long build in release), though in
practice I didn't notice a substantial improvement.
Moreover `sqlez` was unused by `settings` too, so that's removed
as well.
Release Notes:
- N/A
Adding guest roles led us down a rabbit hole where we'd have liked to
rely on a
side-effect of activating a window in tests; but the test window didn't
implement that.
Looking into that, I realized our TestWindow wasn't doing a great job of
emulating the MacWindow, so this makes the two more similar.
- `base_keymap` setting was not respected, now it is
- without a `~/.config/zed/keymap.json` file, we would fail to load the
*default* keymap
Co-authored-by: Marshall <marshall@zed.dev>
Previously it would both send the keydown *and then* the action, now
it send the action, and then because there was an action, does not send
the keydown
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
This PR updates the font resolution for shaped text to use the new
`resolve_font` method on the text system.
This makes it so we use the fallback font if the desired font cannot be
found rather than rendering nothing.
Release Notes:
- Fixed an issue where nothing would render when the font set in
`ui_font_family` was not found.
This PR adjusts our font resolution code to attempt to use a fallback
font if the specified font cannot be found.
Right now our fallback font stack is `Zed Mono`, followed by `Helvetica`
(in practice we should always be able to resolve `Zed Mono` since we
bundle it with the app).
In the future we'll want to surface the ability to set the fallback font
stack from GPUI consumers, and potentially even support specifying font
stacks in the user settings (as opposed to a single font family).
Release Notes:
- Fixed a panic when trying to load a font that could not be found.
After implementing it a while ago, our previous interpolation scheme
didn't really make sense to me and was causing borders to be rendered
incorrectly. We don't really draw backgrounds and borders as part of
the same draw call anymore, but it seemed reasonable to have a correct
implementation in the shader anyway.
This commit uses Porter-Duff compositing (i.e., `over`) to produce
a color that is the result of superimposing the border on top of the
background. Then, we linearly interpolate towards the background color
as we slide out of the border and into the background.
**This PR also bumps wasmtime version from 0.38 to 2.0 as 0.38 does not
build with Rust 1.75**. I did not test the plugin runtime as (AFAIK) we
intend to deprecate it; also, wasmtime's most recent version is 16.0, so
it'd make sense to bump the version at some point anyways. I did not
bump the version to 16.0 straight away as that'd require code changes in
`plugin_runtime`.
Release Notes:
- N/A
Release Notes:
- Added documentation display for autocomplete items.
- Fixed autocomplete filtering blocking the Zed UI, causing hitches and
input delays with large completion lists.
- Fixed hover popup link not firing if the mouse moved a slight amount
while clicking.
- Added support for absolute path file links in hover popup and
autocomplete docs.
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.
Included in this is a performance improvement to make use of the
`TextLayoutCache` when calling `layout` for `Text` elements.
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Release Notes:
- show host in the titlebar of shared projects
- clicking on faces in the titlebar will now always follow the person
(it used to toggle)
- clicking on someone in the channel panel will follow that person
- highlight the currently open project in the channel panel
- fixes a bug where sometimes following between workspaces would not
work
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
This PR improves the error message when `FontCache.load_family` attempts
to load a font that is not present on the system.
I ran into this while trying to run the `storybook` for the first time.
The error message indicated that a font family was not found, but did
not provide any information as to which font family was being loaded.
### Before
```
Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
Finished dev [unoptimized + debuginfo] target(s) in 8.52s
Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```
### After
```
Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
Finished dev [unoptimized + debuginfo] target(s) in 7.90s
Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names: `Zed Mono`', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```
Release Notes:
- N/A
This PR puts the `Theme` returned from the `theme` function behind an
`Arc`.
### Motivation
While working on wiring up window focus events for the `TitleBar`
component we ran into issues where `theme` was holding an immutable
borrow to the `ViewContext` for the entirety of the `render` scope,
which prevented having mutable borrows in the same scope.
### Explanation
To avoid this, we can make `theme` return an `Arc<Theme>` to allow for
cheap clones and avoiding the issues with the borrow checker.
Release Notes:
- N/A
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
add_action_internal shows up often in downstream crates (as it should
be, since it's a generic function it's codegened in each crate that uses
it); it adds non-trivial amounts of LLVM IR to the build as a whole
which we can cut down a bit by doing the inner fn trick.
Release Notes:
- N/A