Commit Graph
22 Commits
Author SHA1 Message Date
Antonio ScandurraandNathan 5df1318e75 Don't use stale layout when view cache is invalidated in GPUI (#7914)
When a view is invalidated, we want to participate in Taffy layout with
an accurate style rather than the dummy style we use when a view is
cached. Previously, we only detected invalidation during paint. This
adds logic to layout as well to avoid using the dummy style when dirty.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-02-16 19:06:11 +01:00
Julia 941e838be9 Prevent z-index id shuffle when number of z-indicies in the scene change 2024-01-29 13:08:40 -05:00
JuliaandAntonio Scandurra 455d5eeb89 Preserve stacking order ID order when reusing cached view state
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-22 10:50:52 -05:00
Mikayla df4566fd1e Refactor out element context from GPUI 2024-01-21 19:43:35 -08:00
Mikayla a44aae9e91 Finish documenting the action, asset, color, and element modules in GPUI
Remove SmallVec from the public API of GPUI
2024-01-20 20:15:23 -08:00
Marshall Bowers 01f06f96a1 Update tenses of doc comment summary lines (#4161)
This PR updates the tenses used by the summary line of doc comments to
match the [Rust API documentation
conventions](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#summary-sentence).

Specifically:

> The summary line should be written in third person singular present
indicative form. Basically, this means write ‘Returns’ instead of
‘Return’.

I'm sure there are plenty occurrences that I missed.

Release Notes:

- N/A
2024-01-19 11:18:50 -05:00
Antonio Scandurra 9446e573e9 Reuse layout for view's element when it wasn't cached 2024-01-19 10:26:39 +01:00
Piotr Osiewicz 4408d45f7a gpui: Always recompute layout on cache miss. 2024-01-18 20:55:41 +01:00
Mikayla e6ca92ffa4 Fix a few more typos 2024-01-17 14:58:58 -08:00
MikaylaandNathan 7a299e966a Document view crate
co-authored-by: Nathan <nathan@zed.dev>
2024-01-17 14:07:55 -08:00
Antonio Scandurra d088ace404 Explicitly push a node in the dispatch tree when painting a new view 2024-01-11 12:48:05 +01:00
Antonio Scandurra a4ef1bc096 Rename reuse_geometry to reuse_view 2024-01-10 23:06:10 +01:00
Antonio Scandurra 2923b71f83 Replace WindowContext::notify with WindowContext::refresh 2024-01-10 17:27:02 +01:00
Antonio Scandurra d0c101cb6e Reuse depth map entries and retain element states for cached trees 2024-01-10 15:00:40 +01:00
Antonio Scandurra 881c532256 Insert primitives associated with views from a previous scene 2024-01-10 10:50:16 +01:00
Antonio Scandurra f55870f378 Reuse mouse and keyboard listeners when reusing geometry for a view 2024-01-09 12:37:24 +01:00
Antonio Scandurra c9193b586b WIP 2024-01-08 19:31:50 +01:00
Antonio ScandurraandNathan Sobo 84c36066bc Start on caching views
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-08 19:07:20 +01:00
Piotr Osiewicz 53564fb269 Bring back zed.rs tests (#3907)
At present 3 tests still fail; 2 are related to keymap issues that (I
believe) @maxbrunsfeld is working on. The other one
(`test_open_paths_action`) I'll look into. edit: done
This PR also fixes workspace unregistration, as we've put the code to do
that behind `debug_assert`
(https://github.com/zed-industries/zed/pull/3907/files#diff-041673bbd1947a35d45945636c0055429dfc8b5985faf93f8a8a960c9ad31e28L649).
Release Notes:
- N/A
2024-01-08 12:29:54 +01:00
Piotr Osiewicz d475f1373a gpui: Further docs refinement & moved some reexports into 'private' module (#3935)
This commit mostly fixes invalid URLs in docstrings. It also
encapsulates crates we reexport (serde stuff + linkme) into a public
module named "private" in order to reduce the API surfaced through docs.
Moreover, I fixed up a bunch of crates that were pulling serde_json in
through gpui explicitly instead of using Cargo manifest.

Release Notes:
- N/A
2024-01-07 14:14:21 +01:00
Conrad IrwinandJulia 5037cca7ec Add LeakDetector for gpui2
Co-Authored-By: Julia <julia@zed.dev>
2024-01-04 20:29:44 -07:00
Max BrunsfeldandMikayla f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00