Commit Graph
205 Commits
Author SHA1 Message Date
Antonio Scandurra 800c2685ea Remove dependency from gpui from editor2 2023-11-03 09:05:58 +01:00
Nathan Sobo f3b8a9d8c2 WIP 2023-11-02 22:56:04 -06:00
Nathan Sobo a731f8fb1e WIP 2023-11-02 21:28:56 -06:00
Nathan Sobo dfc7c81500 WIP 2023-11-02 21:03:29 -06:00
Nathan Sobo 72b9dc8216 Merge remote-tracking branch 'origin/main' into editor2 2023-11-02 20:47:09 -06:00
Nathan Sobo 9052b48949 Use correct color values in quad fragment shader (#3217)
Previously, when using rounded corners, the borders would get wider.
Looks like we weren't using the input color values consistently in the
fragment shader. The quad values are raw HSLA and are converted in the
vertex shader.

Release Notes:

- N/A
2023-11-02 17:49:56 -06:00
Nathan Sobo 7b712ac68f WIP 2023-11-02 16:47:14 -06:00
Conrad IrwinandNathan 9e5275cc18 Fix error handling of open_path
Co-Authored-By: Nathan <nathan@zed.dev>
2023-11-02 14:34:43 -06:00
Nathan SoboandJulia Risley 91f3e9707a Use correct color values in quad fragment shader
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-11-02 13:18:20 -06:00
Conrad Irwin 269a72464d Merge remote-tracking branch 'origin/main' into zed2-workspace 2023-11-02 13:16:24 -06:00
Nathan Sobo 1dd20d4c0a Merge remote-tracking branch 'origin/main' into gpui2-image-reborrow 2023-11-02 12:25:06 -06:00
Nathan SoboandJulia Risley 04a8ee222b Enforce a Send bound on next frame callbacks
This required using mpsc channels to invoke frame callbacks on the
main thread and send the receiver to the platform display link.

Co-Authored-By: Julia Risley <julia@zed.dev>
2023-11-02 12:01:22 -06:00
Marshall Bowers 1e7a216d55 WIP 2023-11-02 13:21:28 -04:00
Conrad IrwinandAntonio 803d2b6710 Add double click to zoom the window
Co-Authored-By: Antonio <me@as-cii.com>
2023-11-02 10:58:46 -06:00
Marshall Bowers 0e1d2fdf21 Checkpoint: Narrow down error 2023-11-02 12:47:06 -04:00
Marshall Bowers 66e4d75e6f Checkpoint: Reproduction with Avatar story 2023-11-02 12:34:40 -04:00
Conrad IrwinandAntonio 634aba89d2 Add back some window events for workspace
Co-Authored-By: Antonio <me@as-cii.com>
2023-11-02 10:03:03 -06:00
Conrad Irwin 0bab1a92df Merge remote-tracking branch 'origin/main' into zed2-workspace 2023-11-02 09:44:38 -06:00
Antonio Scandurra fd81d838fe Introduce ViewContext::observe_window_{activation,bounds} (#3212)
Release Notes:

- N/A
2023-11-02 16:44:26 +01:00
Marshall Bowers ec0cff0e1a 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 ec4f0d7bca Implement ViewContext::observe_window_activation
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-02 16:37:57 +01:00
Antonio ScandurraandConrad Irwin 3a824e468f Subsume observe_fullscreen into observe_window_bounds
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-02 16:31:27 +01:00
Antonio ScandurraandConrad Irwin de80974a1d Add ViewContext::observe_fullscreen
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-11-02 16:11:52 +01:00
Antonio Scandurra c1ca7ad41d Implement WindowContext::remove_window 2023-11-02 13:37:55 +01:00
Antonio Scandurra 76c675a63b 💄 2023-11-02 10:57:29 +01:00
Antonio Scandurra 32db64a049 Introduce more GPUI2 APIs needed for transitioning the workspace 2023-11-02 10:54:33 +01:00
Antonio Scandurra 9c7b45f38b Add back Send and Sync to AssetSource 2023-11-02 09:58:53 +01:00
Antonio Scandurra d5f0e91faa Remove stray todo 2023-11-02 09:56:45 +01:00
Antonio Scandurra 64ad8943ba Remove more Send bounds and simplify view rendering 2023-11-02 09:44:16 +01:00
Nathan Sobo db9ccd7f34 Merge remote-tracking branch 'origin/main' into gpui2-no-send 2023-11-01 21:10:31 -06:00
Nathan Sobo 57dfc50687 Get language2 tests passing by not blocking on a foreground task 2023-11-01 21:04:17 -06:00
Nathan Sobo 53066df522 Get project2 tests green 2023-11-01 20:14:40 -06:00
Max Brunsfeld 401ddc6f49 WIP - flush_fs_events 2023-11-01 17:45:38 -07:00
Max BrunsfeldandNathan Sobo 6ee93125d0 Fix hangs in new dispatcher
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-11-01 17:11:42 -07:00
Conrad Irwin 90facc051a beautiful diff 2023-11-01 15:31:37 -06:00
Conrad Irwin f415a37a3d Uncomment project2 tests (#3200) 2023-11-01 20:27:53 +00:00
Conrad Irwin cd10ba9e06 Use run_until_parked instead of blocked in tests 2023-11-01 14:27:25 -06:00
Nathan Sobo 3f34a8e7ec Checkpoint 2023-11-01 14:00:26 -06:00
Nathan Sobo 11b6d9e33a Split out a foreground and background executor 2023-11-01 13:53:45 -06:00
Max Brunsfeld dd1a2a9e44 wip 2023-11-01 13:53:45 -06:00
57ffa8201e Start removing the Send impl for App
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
2023-11-01 13:53:45 -06:00
Marshall Bowers b910bbf002 Add ui_font_size setting (#3199)
This PR adds a new `ui_font_size` setting that can be used to control
the scale of the entire UI.

We use the value in this setting to set the base rem size of the window.

Release Notes:

- N/A
2023-11-01 13:11:12 -04:00
Julia 795369a1e3 Port multi_buffer to gpui2 2023-10-31 18:34:36 -04: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
Antonio Scandurra 66b520a513 Call initialize on the rendered element on AnyView 2023-10-31 17:17:42 +01:00
Conrad Irwin 8db6b78fdd Implement start/finish waiting for gpui2
I'm not sure these are strictly necessary, but it will make porting
tests easier to have them.
2023-10-31 16:14:10 +00:00
Conrad Irwin 0e9a82711c Actually deliver test events to subscribers 2023-10-31 16:04:33 +00:00
Conrad Irwin 81f8e81e48 Fix block to allow for sync progress 2023-10-31 15:57:01 +00:00
Antonio ScandurraandNathan Sobo 0aa9c6b61d Introduce AnyWeakView
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-10-31 16:19:46 +01:00
Antonio ScandurraandNathan Sobo 7b6514b178 Simplify AnyView
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-10-31 16:16:30 +01:00