Commit Graph
10 Commits
Author SHA1 Message Date
Michael Sloan c69a0c812e Add a live Rust style editor to inspector to edit a sequence of no-argument style modifiers (#31443)
Editing JSON styles is not very helpful for bringing style changes back
to the actual code. This PR adds a buffer that pretends to be Rust,
applying any style attribute identifiers it finds. Also supports
completions with display of documentation. The effect of the currently
selected completion is previewed. Warning diagnostics appear on any
unrecognized identifier.


https://github.com/user-attachments/assets/af39ff0a-26a5-4835-a052-d8f642b2080c

Adds a `#[derive_inspector_reflection]` macro which allows these methods
to be enumerated and called by their name. The macro code changes were
95% generated by Zed Agent + Opus 4.

Release Notes:

* Added an element inspector for development. On debug builds,
`dev::ToggleInspector` will open a pane allowing inspecting of element
info and modifying styles.
2025-05-26 17:43:57 +00:00
f6f0cae3ca Add initial element inspector for Zed development (#31315)
Open inspector with `dev: toggle inspector` from command palette or
`cmd-alt-i` on mac or `ctrl-alt-i` on linux.

https://github.com/user-attachments/assets/54c43034-d40b-414e-ba9b-190bed2e6d2f

* Picking of elements via the mouse, with scroll wheel to inspect
occluded elements.

* Temporary manipulation of the selected element.

* Layout info and JSON-based style manipulation for `Div`.

* Navigation to code that constructed the element.

Big thanks to @as-cii and @maxdeviant for sorting out how to implement
the core of an inspector.

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Federico Dionisi <code@fdionisi.me>
2025-05-23 23:08:59 +00:00
Piotr Osiewicz 62a2cc68f2 Another batch of fixups 2024-01-02 00:24:11 +01:00
Antonio Scandurra 9ffdf0e105 WIP 2023-10-13 19:06:03 +02:00
Nathan Sobo c9e6d09f23 Add group hovers 2023-10-11 21:34:08 -06:00
Nathan Sobo 1ccd2eda6b WIP 2023-09-12 07:34:42 -06:00
Nathan SoboandConrad Irwin 6a86eb0486 Use RefinementCascade to compose pressability and hoverability
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2023-08-23 12:18:12 -06:00
Nathan Sobo e1034181ec Compiling checkpoint 2023-08-19 19:51:22 -06:00
Nathan Sobo ea297c002a Compiling 2023-08-18 01:59:21 -06:00
Nathan Sobo 14368fd0b4 Introduce Refinement trait and derive macro 2023-08-18 01:03:46 -06:00