Antonio Scandurra
23fd1e19dc
Ignore element offset when manually drawing AnyElement
2023-11-10 11:35:57 +01:00
Antonio Scandurra and Nathan
5d15886675
Render code actions indicator
...
Co-Authored-By: Nathan <nathan@zed.dev >
2023-11-09 18:43:26 +01:00
Antonio Scandurra and Nathan Sobo
cfee1401ed
Extract AnyElement::{measure,draw}
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2023-11-09 17:30:41 +01:00
Nathan Sobo
7c922ad6ee
Remove comments
2023-11-08 21:49:21 -07:00
Nathan Sobo
9a022671a2
Simplify IME support
2023-11-08 21:06:00 -07:00
Max Brunsfeld and Marshall
1a37d9edc6
Register text input handlers via new element hook
...
Provide element bounds to the input handler's `bounds_for_rect` method.
Co-authored-by: Marshall <marshall@zed.dev >
2023-11-08 15:48:55 -08:00
Conrad Irwin
b804b25c21
Fix confusing error message
2023-11-07 12:04:21 -07:00
Marshall Bowers
d224f511fa
Add interactivity to Checkbox component ( #3240 )
...
This PR adds interactivity to the `Checkbox` component.
They can now be checked and unchecked by clicking them.
Release Notes:
- N/A
2023-11-06 13:22:25 -05: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 Scandurra
64ad8943ba
Remove more Send bounds and simplify view rendering
2023-11-02 09:44:16 +01: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
Antonio Scandurra
0128079de0
WIP
2023-10-30 20:36:48 +01:00
Antonio Scandurra
637cff3ebd
WIP
2023-10-26 17:15:19 +02:00
Marshall Bowers
fccc4ca85c
Initialize element before layout
2023-10-26 15:22:48 +02:00
Nathan Sobo
0285284ae1
Rename IntoAnyElement trait to Component
2023-10-26 12:46:52 +02:00
Nathan Sobo
8ecfea55cd
Replace derive Element with derive IntoAnyElement everywhere
2023-10-26 12:38:23 +02:00
Nathan Sobo
db15db45ce
WIP
2023-10-26 11:31:47 +02:00
Nathan Sobo
45a8aea0f0
Make FnOnces that render elements IntoAnyElement
2023-10-26 11:21:42 +02:00
Marshall Bowers
4266ead958
WIP: Trait bounds
2023-10-26 10:46:02 +02:00
Marshall Bowers
8b972f6d8e
WIP: Fix compilation of gpui2
2023-10-26 09:51:33 +02:00
Marshall Bowers
965bfd8439
WIP: Pass in V to Element
2023-10-26 09:45:26 +02:00
Nathan Sobo
0910760b76
Reduce the need for Send + Sync bounds on generics
2023-10-24 14:20:01 +02:00
Antonio Scandurra
e4fe9538d7
Checkpoint
2023-10-21 16:01:47 +02:00
Antonio Scandurra
f3979a9f28
Checkpoint
2023-10-21 15:59:52 +02:00
f26ca0866c
Mainline GPUI2 UI work ( #3062 )
...
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: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com >
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com >
Co-authored-by: Nate <nate@zed.dev >
Co-authored-by: Mikayla <mikayla@zed.dev >
2023-09-28 19:36:21 -04:00
Nathan Sobo
f2e87a3429
Add Element::when method
2023-09-18 20:25:12 -06:00
Nathan Sobo
e0fdc7d0aa
Eliminate PaintContext
2023-09-11 09:00:59 -06:00
Nathan Sobo
c3b1264c05
Checkpoint
2023-09-08 14:09:29 -06:00
Nathan Sobo
7738867639
Always pass parent origin when painting elements
2023-09-08 06:32:20 -06:00
Nathan Sobo
85aedf9bed
WIP: Icons not yet rendering
2023-09-05 16:40:52 -06:00
Nathan Sobo
5a9c76e080
Fix hoverable elements moving on hover
2023-09-05 15:17:09 -06:00
Nate Butler and Nathan Sobo
0695e8d3b9
Work on sample collab_panel story in the storybook
...
Co-Authored-By: Nathan Sobo <1789+nathansobo@users.noreply.github.com >
2023-09-05 15:19:44 -04:00
Nathan Sobo
6275c560e7
Fix warnings for a clean build
2023-09-01 10:08:41 -06:00
Nathan Sobo
3b5ee59273
Split playground into gpui2 and storybook
2023-08-30 16:12:14 -06:00
Nathan Sobo
ee11be98e5
Add gpui2 crate
2023-08-30 15:00:11 -06:00