Commit Graph
39175 Commits
Author SHA1 Message Date
Antonio Scandurra 1fc83692d2 Introduce ViewContext::observe_window_{activation,bounds} (#3212)
Release Notes:

- N/A
2023-11-02 16:44:26 +01:00
Julia 1a0a14f89d Uncomment lsp2 tests 2023-11-02 11:42:48 -04:00
Marshall Bowers 77bb709e42 Add map method to Components (#3210)
This PR adds a `map` method to the `Component` trait.

`map` is a fully-generalized form of `when`, as `when` can be expressed
in terms of `map`:

```rs
div().map(|this| if condition { then(this) } else { this })
```

This allows us to take advantage of Rust's pattern matching when
building up conditions:

```rs
// Before
div()
    .when(self.current_side == PanelSide::Left, |this| this.border_r())
    .when(self.current_side == PanelSide::Right, |this| {
        this.border_l()
    })
    .when(self.current_side == PanelSide::Bottom, |this| {
        this.border_b().w_full().h(current_size)
    })

// After
div()
    .map(|this| match self.current_side {
        PanelSide::Left => this.border_r(),
        PanelSide::Right => this.border_l(),
        PanelSide::Bottom => this.border_b().w_full().h(current_size),
    })
```

Release Notes:

- N/A
2023-11-02 11:39:40 -04:00
Antonio ScandurraandConrad Irwin ae9e7aa6b5 Implement ViewContext::observe_window_activation
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-02 16:37:57 +01:00
Antonio ScandurraandConrad Irwin 8b551beb77 Subsume observe_fullscreen into observe_window_bounds
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-02 16:31:27 +01:00
Nate Butler 4960ed5a71 Work on default theme, Notifications, Add ListHeader meta (#3203)
Work on default theme, Notifications, Add ListHeader `meta`

Also adds `naive_format_distance` & `naive_format_distance_from_now`

Release Notes:

- N/A
2023-11-02 11:19:48 -04:00
Antonio ScandurraandConrad Irwin 889de80768 Add ViewContext::observe_fullscreen
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-02 16:11:52 +01:00
Julia c2b9babeae Uncomment db2 tests (#3211)
Release Notes:

- N/A
2023-11-02 11:10:08 -04:00
Nate Butler 708091c82c Remove unused import 2023-11-02 11:04:04 -04:00
Nate Butler 4482d528dc Merge branch 'main' into n/t2 2023-11-02 11:02:55 -04:00
Nate Butler 931d6f0b61 Remove unused import 2023-11-02 11:02:46 -04:00
Nate Butler eddf9edda1 Use naive_format_distance_from_now in Notifications 2023-11-02 11:02:17 -04:00
Julia 097353a483 Uncomment db2 tests 2023-11-02 11:01:38 -04:00
Nate Butler 1b5160f0e1 Update naive_format_distance and tests 2023-11-02 10:37:33 -04:00
Kyle Caverly ab7a2a21fe authenticate with completion provider on new inline assists (#3209)
authenticate with completion provider on new inline assists

Release Notes:

- Fixed bug which lead the inline assist functionality to never
authenticate
2023-11-02 10:14:52 -04:00
Nate Butler abce383ba0 Checkpoint - impl format_distance 2023-11-02 10:11:25 -04:00
KCaverly 77ba43fdf7 moved from Boxes to Arcs for shared access of completion providers across the assistant panel and inline assistant 2023-11-02 10:08:47 -04:00
Nathan Sobo ed895ca952 WIP 2023-11-02 07:46:49 -06:00
KCaverly 04b7f427e8 authenticate with completion provider on new inline assists 2023-11-02 09:34:18 -04:00
Joseph T. Lyons 699176b2c6 Fix missing commit (collab version bump) 2023-11-02 09:22:12 -04:00
Joseph T. Lyons c7211bb3fe Format YAML 2023-11-02 09:05:29 -04:00
Joseph T. Lyons 312f1e50b3 Cleanly truncate Discord release notes 2023-11-02 09:05:16 -04:00
Antonio Scandurra f64260f82a WIP 2023-11-02 13:58:42 +01:00
Antonio Scandurra 29bd56f879 Implement WindowContext::remove_window 2023-11-02 13:37:55 +01:00
Antonio Scandurra ce4c87198d Implement AppState::test 2023-11-02 13:34:21 +01:00
Antonio Scandurra 89ba26eab3 Checkpoint 2023-11-02 11:05:24 +01:00
Antonio Scandurra 62dd5a2019 Merge remote-tracking branch 'origin/main' into zed2-workspace 2023-11-02 11:04:47 +01:00
Antonio Scandurra 4799c00ed1 Introduce more GPUI2 APIs needed for transitioning the workspace (#3208)
Release Notes:

- N/A
2023-11-02 11:03:24 +01:00
Antonio Scandurra 86222b78a9 💄 2023-11-02 10:57:29 +01:00
Antonio Scandurra 457a1d6aab Introduce more GPUI2 APIs needed for transitioning the workspace 2023-11-02 10:54:33 +01:00
Antonio Scandurra d32bcc65a3 WIP 2023-11-02 10:09:08 +01:00
Antonio Scandurra 9ceb498061 Merge remote-tracking branch 'origin/main' into zed2-workspace 2023-11-02 10:06:05 +01:00
Antonio Scandurra b1eb400566 Remove more Send bounds and simplify view rendering (#3207)
This pull request removes more `Send` bounds from GPUI2 after #3206 and
simplifies some internals. Specifically:

- The `Reference` enum was removed, as we always capture mutable
references anyway.
- A few GATs from `Context` and `VisualContext` were removed, as they're
unnecessary now that `MainThread` isn't a thing.
- View rendering was greatly simplified (we were able to remove
`EraseViewState` and `ViewObject`)

Release Notes:

- N/A
2023-11-02 10:04:28 +01:00
Antonio Scandurra fb2f5f1fcc Add back Send and Sync to AssetSource 2023-11-02 09:58:53 +01:00
Antonio Scandurra a92e8751bb Remove stray todo 2023-11-02 09:56:45 +01:00
Antonio Scandurra 51d3b4f8f8 Fix compile errors 2023-11-02 09:47:21 +01:00
Antonio Scandurra 10dac9979c Remove more Send bounds and simplify view rendering 2023-11-02 09:44:16 +01:00
Antonio Scandurra 45cef6aafb Remove more Send bounds and remove EraseViewState 2023-11-02 09:39:06 +01:00
Antonio Scandurra 73c1b1e9fe Remove some stray Send bounds 2023-11-02 09:18:16 +01:00
Antonio Scandurra a30655256e Simplify contexts 2023-11-02 09:15:14 +01:00
Antonio Scandurra c66f09e8a1 Fix outstanding errors in gpui2 2023-11-02 09:08:47 +01:00
Nathan Sobo 8582cb05c8 WIP: Merge branch 'main' into zed2-workspace 2023-11-01 22:35:02 -06:00
Nathan Sobo d11478464c Restore foreground/background distinction and confine application state to the main thread (#3206)
The potential for deadlock and other complexity ended up convincing us
that the benefits of making the app state accessible from any thread
were not worth their cost. We probably could have gone back to the old
executors, but we decided to fix forward and continue to get the
benefits of the new dispatcher.
2023-11-01 21:29:28 -06:00
Nathan Sobo c015aee641 Fix prod compile error 2023-11-01 21:19:06 -06:00
Nathan Sobo ef3a1ff26e Fix post-merge compile errors 2023-11-01 21:16:41 -06:00
Nathan Sobo c5a361d12b Merge remote-tracking branch 'origin/main' into gpui2-no-send 2023-11-01 21:10:31 -06:00
Nathan Sobo c3ff8609e8 Get language2 tests passing by not blocking on a foreground task 2023-11-01 21:04:17 -06:00
Nathan Sobo d2d9430fc8 Get project2 tests green 2023-11-01 20:14:40 -06:00
Marshall Bowers 06597e894d Remove unneeded .intos 2023-11-01 22:01:59 -04:00
Marshall Bowers f8bea1d0dc Update scale accessors 2023-11-01 22:00:16 -04:00