Commit Graph
214 Commits
Author SHA1 Message Date
Conrad IrwinandJulia 33245d119e Tooltip on tabs
Co-Authored-By: Julia <julia@zed.dev>
2023-11-03 14:02:46 -06:00
Conrad Irwin 26e64fb843 gpui2: Add on_hover events 2023-11-03 12:51:38 -06:00
Conrad Irwin d73c54f604 Add PointingHand on tabs 2023-11-03 11:30:15 -06:00
c604a2e34e Add hover behaviour to tabs
Co-Authored-By: Marshall <marshall@zed.dev>
Co-Authored-By: Nathan <nathan@zed.dev>
2023-11-03 10:55:07 -06:00
Antonio Scandurra d3b02c4de4 WIP: start on editor element 2023-11-03 17:14:17 +01:00
Conrad IrwinandJulia 580694dbda Fix bug when unsubscribe called after remove
Co-Authored-By: Julia <julia@zed.dev>
2023-11-03 09:56:35 -06:00
Antonio Scandurra feaab953a8 Add ViewContext::window_context 2023-11-03 14:41:37 +01:00
Antonio Scandurra bed10b433a Allow converting from a WeakView<V> to an AnyWeakView 2023-11-03 11:36:18 +01:00
Antonio Scandurra 11feda01e3 Uncomment Editor::new 2023-11-03 10:38:28 +01:00
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