Marshall Bowers
0297a42735
Use US English spelling of "behavior" and "customize" ( #15117 )
...
This PR fixes some instances that weren't using US English spellings of
"behavior" and "customize".
Release Notes:
- N/A
2024-07-24 16:36:01 -04:00
Marshall Bowers
143035b1ed
gpui_macros: Extract border_style_methods
macro ( #14514 )
...
This PR extracts a separate `border_style_methods` macro so that it can
be used independently from `style_helpers!`.
Release Notes:
- N/A
2024-07-15 15:51:29 -04:00
Marshall Bowers
d01d76482d
gpui: Expose more granular style macros ( #14035 )
...
This PR extract more GPUI style methods into macros that can be composed
together to selectively add styles to components.
Release Notes:
- N/A
2024-07-09 19:49:25 -04:00
Marshall Bowers
3cdd465226
gpui: Make style macros more composable ( #14007 )
...
This PR begins the process of breaking up the `style_helpers!` macro
into smaller macros that can be used to generate methods for a related
subset of styles.
The style method macros also now accept an optional `visibility`
parameter to control the visibility of the generated methods. This
allows for adding these methods to a struct instead of a just a trait.
For example, to expose just the padding styles on a `Facepile` we can do
this:
```rs
impl Facepile {
fn style(&mut self) -> &mut StyleRefinement {
self.base.style()
}
gpui::padding_style_methods!({
visibility: pub
});
}
```
Release Notes:
- N/A
2024-07-09 13:52:52 -04:00
Marshall Bowers
01ba1ddef7
gpui_macros: Disable doctests ( #13015 )
...
This PR disables the doctests in the `gpui_macros` crate, as they depend
on `gpui` to run.
Since `gpui` depends on `gpui_macros`, we don't really want to add a
dependency on `gpui` (even though it _appears_ to work as a dev
dependency).
Also did some minor stylistic cleanup of some doc comments.
Release Notes:
- N/A
2024-06-13 18:45:28 -04:00
Mikayla
57400e9687
Fix typos detected by crate-ci/typos
2024-01-17 14:31:21 -08:00
Nathan Sobo
42cbd103fb
Even more docs
...
Co-authored-by: Conrad <conrad@zed.dev>
2024-01-09 12:02:12 -07:00
Max Brunsfeld
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
Kirill Bulatov
9f40a5c53f
Suppress unused vars warning generated by gpui macro
2023-11-04 13:54:37 +02:00
Nathan Sobo
e0fdc7d0aa
Eliminate PaintContext
2023-09-11 09:00:59 -06:00
Nathan Sobo
a24d94cfda
Eliminate LayoutContext
2023-09-11 08:47:00 -06:00
Nathan Sobo
ebf8b32811
Checkpoint
2023-09-08 16:25:10 -06:00
Max Brunsfeld
66c3879306
Extract randomized test infrastructure for use in other tests
2023-09-06 14:08:43 -07:00
Nathan Sobo
740b105330
Merge branch 'main' into taffy
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-14 13:50:21 -06:00
Mikayla
7970406694
Add a compile test for the element derive
2023-08-11 18:00:12 -07:00
Nathan Sobo
0bf607cd2d
WIP
2023-08-10 10:26:48 -06:00
Nathan Sobo
1dfde8eab5
WIP
2023-08-01 20:53:15 -06:00
Nathan Sobo
0374bc66ce
WIP
2023-07-26 12:54:23 -06:00
Nathan Sobo
df9c17176e
WIP
2023-07-25 16:33:58 -06:00
Nathan Sobo
54a7419fa2
WIP
2023-07-24 23:27:14 -06:00
Nathan Sobo
18b0385d73
WIP
2023-07-17 16:48:31 -06:00
Nathan Sobo
bede668b14
Add a derive macro for Element
...
To turn any struct into a composite element, you can implement a render method
with the following signature:
fn render<V: View>(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> AnyElement<V>;
Then add #[derive(Element)] to the struct definition.
This will make it easier to introduce higher-level components that are expressed in
terms of other elements.
2023-06-25 07:51:50 -06:00
Antonio Scandurra
70f8cf4cf6
Move methods querying window state into AsyncAppContext
2023-05-02 19:38:48 +02:00
Antonio Scandurra
38ab6b123f
Make production code compile again
2023-04-17 12:33:33 +02:00
Max Brunsfeld
7b0a6c0dfa
Add an 'on_failure' attribute to gpui tests
...
This lets us perform a finalization step when a randomized test fails.
2023-04-03 18:16:08 -07:00
Joseph Lyons
233b28a1b9
Appease clippy
2023-01-01 23:50:45 -05:00
Antonio Scandurra
fa3f100eff
Introduce a new detect_nondeterminism = true
attribute to gpui::test
2022-11-28 19:01:28 +01:00
Kay Simmons
81a3a22379
Merge pull request #1685 from zed-industries/vim-text-objects
...
Vim Text Objects and Numeric Repitions
2022-10-11 16:36:19 -07:00
K Simmons
515c1ea123
Fixed some neovim test context issues, added repeated commands in vim mode, and ported some tests to use the neovim testing strategy
2022-10-08 21:52:07 -07:00
Antonio Scandurra
55cc142319
Move incoming calls into ActiveCall
2022-10-06 09:50:26 +02:00
ForLoveOfCats
8ba2f77148
One big cleanup pass of clippy lints
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Antonio Scandurra
bb8dc6120b
Allow taking an Arc<Deterministic>
in [gpui::test]
-decorated tests
2022-04-11 13:42:30 +02:00
Antonio Scandurra
83a3402235
Make TestAppContext
and its dependencies available only in tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:01:52 +01:00
Antonio Scandurra
466db69780
Pass a reference to TestAppContext
in tests
...
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Max Brunsfeld
7d53e37672
Start work on detecting leaked handles in tests
...
For now, just track models. Tests fail because we don't
yet clear the app contexts at the right time.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-28 22:02:43 -08:00
Antonio Scandurra
38f225b575
Clean db pool on drop only if assertions fail or it's the last iteration
2022-02-16 15:07:41 +01:00
Antonio Scandurra
b7314ef2aa
WIP: Start restructuring executor
2022-01-24 18:49:20 +01:00
Nathan Sobo
1445ce10b5
Name the root file of every crate after the crate to ease navigation
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-11-30 12:46:39 -07:00