Commit Graph
1162 Commits
Author SHA1 Message Date
Marshall Bowers e4aa7ba4f2 Try to load fallback fonts instead of panicking when a font is not found (#3891)
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.
2024-01-04 14:10:46 -05:00
Antonio Scandurra 3ab2062614 Fix border rendering
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.
2024-01-04 16:27:20 +01:00
Antonio Scandurra b78497bf54 Clip List items that partially overflow 2024-01-04 15:12:25 +01:00
Max BrunsfeldandMikayla 83f4c61657 Remove 2 suffix from gpui_macros, fix compile errors in tests
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 13:12:21 -08:00
Max BrunsfeldandMikayla f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Piotr Osiewicz 576d8806f5 Fix up gpui1 2024-01-02 13:18:56 +01:00
Piotr Osiewicz e932f4cf47 Bump Rust to 1.75 (#3815)
**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
2023-12-28 19:22:43 +01:00
Marshall Bowers dc64411cca Extend theme_importer in preparation for importing Zed1 themes (#3791)
This PR extends the `theme_importer` with the overall structure required
to support importing themes from Zed1.

Release Notes:

- N/A
2023-12-22 13:47:30 -05:00
Mikayla ee4957dd47 Implement most core actions 2023-11-14 00:06:33 -08:00
Conrad Irwin f464d69ff8 Merge branch 'main' into dispatch-tree 2023-11-13 13:21:57 -07:00
Kirill BulatovandPiotr f0f0b47058 pane: When opening a buffer, actually scroll to the selected tab. Previously it might've reused a shared state.
Deals with https://github.com/zed-industries/community/issues/2262 also fixes influencer's feedback.

Co-Authored-By: Piotr <piotr@zed.dev>
2023-11-13 13:09:02 +02:00
Nathan SoboandAntonio Scandurra 74a0d9316a Add a DispatchTree which will replace the existing key dispatch strategy
Instead of freezing a stack, we will record the entire dispatch tree so we can
change focus.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-11-10 11:56:14 -07:00
Max Brunsfeld 28d3d21108 Generalize Refineable derive macro to derive arbitrary traits on the refinement type 2023-11-09 13:23:31 -08:00
Max BrunsfeldandMarshall 291d35f337 Merge branch 'main' into zed2-project-test
Co-authored-by: Marshall <marshall@zed.dev>
2023-10-31 11:50:56 -07:00
Conrad Irwin 4a6a17d866 Merge branch 'main' into zed2 2023-10-27 10:55:15 +02:00
Conrad Irwin adc426b668 v1 2023-10-26 18:19:57 +02:00
Joseph T. Lyons 98d03f6e7a Revert "Add activity_indicator2"
This reverts commit 88a3a57789.
2023-10-26 17:13:40 +02:00
Joseph T. Lyons 88a3a57789 Add activity_indicator2 2023-10-26 16:49:39 +02:00
Conrad Irwin 51aa0d6a94 Clearer error on importing both gpui and gpui2 2023-10-26 10:39:52 +02:00
Max Brunsfeld 59adcc1744 Load more notifications when scrolling down 2023-10-22 17:10:21 +02:00
Max Brunsfeld 234ccbe51f Merge branch 'main' into notifications 2023-10-22 12:25:30 +02:00
Conrad Irwin 352a554c74 Fix bug in vim visual block mode 2023-10-20 11:49:10 -06:00
Conrad Irwin 1c36134cf9 Fix single column vim selections 2023-10-20 11:17:19 -06:00
Conrad Irwin 9d07561d99 Merge branch 'main' into pixel-columns 2023-10-18 23:00:56 -06:00
Max Brunsfeld c66385f0f9 Add an empty state to the notification panel 2023-10-16 12:54:44 -07:00
Nathan Sobo 938dd8b9ca Checkpoint 2023-10-16 20:16:35 +02:00
Nathan Sobo 1a3650ef2a Get everything rendering again 2023-10-16 20:15:24 +02:00
Julia 2323fd17b0 Autocomplete docs (#3126)
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.
2023-10-13 13:26:45 -04:00
Antonio Scandurra 23f11fcd5e Merge branch 'main' into gpui2 2023-10-12 10:55:17 +02:00
JuliaandAntonio Scandurra 801af95a13 Make completion documentation scroll & fix accompanying panic from tag
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-10-10 10:08:29 -04:00
Conrad Irwin 002e2cc42c Round better for up/down 2023-10-09 21:48:32 -06:00
Conrad Irwin d4ef764305 Merge branch 'main' into links 2023-10-09 20:08:48 -06:00
Conrad Irwin 5dbda70235 Fix ./script/bundle to allow passing key 2023-10-09 08:59:25 -06:00
Marshall Bowers f6a4151f60 Merge branch 'main' into gpui2 2023-10-07 10:50:05 -04:00
Conrad Irwin 34b7537948 Add universal links support to mac platform 2023-10-06 23:15:37 -06:00
456baaa112 Mainline GPUI2 UI work (#3099)
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>
2023-10-06 13:18:56 -04:00
Antonio Scandurra 1816ab95a0 Checkpoint: start rendering images 2023-10-04 15:03:21 +02:00
Max Brunsfeld 95342c8c33 Merge branch 'main' into channel-changes 2023-10-03 17:52:28 -07:00
Nathan Sobo c57e19c8fa Checkpoint: Glyphs rendering how I'd like 2023-10-03 17:29:36 -06:00
Nathan Sobo 550d9a9f71 Checkpoint 2023-10-03 16:17:25 -06:00
Nathan Sobo 4208ac2958 WIP 2023-10-03 15:17:45 -06:00
Nathan Sobo 45429b5400 WIP 2023-10-03 14:25:29 -06:00
Max BrunsfeldandMikayla 84c4db13fb Avoid spurious notifies in chat channel select
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-10-02 15:57:59 -07:00
Conrad Irwin 9dc292772a Add a screen for gpui tests
Allows me to test notifications
2023-10-02 09:53:30 -06:00
Mikayla 1d5b665f13 Implement channel changes for messages 2023-10-01 22:32:11 -07:00
Piotr Osiewicz 488a3eeace ui: Mirror option key in keybindings (#3065)
![image](https://github.com/zed-industries/zed/assets/24362066/94731737-a21a-4cef-a445-eb855f1a4d3e)

![image](https://github.com/zed-industries/zed/assets/24362066/e879ec9a-70aa-4989-923f-4cca18d01587)

Release Notes:

- Fixed option key's appearance in keybindings
2023-09-29 16:45:49 +02:00
Nathan Sobo 9fefb1d898 Checkpoint 2023-09-27 21:14:09 -06:00
Marshall Bowers d0b15ed940 Report which requested font families are not present on the system (#3006)
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
2023-09-22 15:27:42 -04:00
Marshall BowersandPiotr Osiewicz 71c1e36d1e Put Theme behind an Arc (#3017)
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>
2023-09-22 13:35:30 -04:00
Mikayla 66dd0e9ec0 Switch drag end event to be fired after mouse up 2023-09-21 08:58:36 -07:00