ZIm/crates/ui/src
Kirill Bulatov 8451dba6a7
Introduce an outline panel (#12637)
Adds a new panel: `OutlinePanel` which looks very close to project
panel:

<img width="256" alt="Screenshot 2024-06-10 at 23 19 05"
src="https://github.com/zed-industries/zed/assets/2690773/c66e6e78-44ec-4de8-8d60-43238bb09ae9">

has similar settings and keymap (actions work in the `OutlinePanel`
context and are under `outline_panel::` namespace), with two notable
differences:
* no "edit" actions such as cut/copy/paste/delete/etc.
* directory auto folding is enabled by default

Empty view: 
<img width="841" alt="Screenshot 2024-06-10 at 23 19 11"
src="https://github.com/zed-industries/zed/assets/2690773/dc8bf37c-5a70-4fd5-9b57-76271eb7a40c">


When editor gets active, the panel displays all related files in a tree
(similar to what the project panel does) and all related excerpts'
outlines under each file.
Same as in the project panel, directories can be expanded or collapsed,
unfolded or folded; clicking file entries or outlines scrolls the buffer
to the corresponding excerpt; changing editor's selection reveals the
corresponding outline in the panel.

The panel is applicable to any singleton buffer:
<img width="1215" alt="Screenshot 2024-06-10 at 23 19 35"
src="https://github.com/zed-industries/zed/assets/2690773/a087631f-5c2d-4d4d-ae25-30ab9731d528">

<img width="1728" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/e4f8082c-d12d-4473-8500-e8fd1051285b">

or any multi buffer:

(search multi buffer)

<img width="1728" alt="Screenshot 2024-06-10 at 23 19 41"
src="https://github.com/zed-industries/zed/assets/2690773/60f768a3-6716-4520-9b13-42da8fd15f50">

(diagnostics multi buffer)
<img width="1728" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/64e285bd-9530-4bf2-8f1f-10ee5596067c">

Release Notes:
- Added an outline panel to show a "map" of the active editor
2024-06-12 23:22:52 +03:00
..
components Introduce an outline panel (#12637) 2024-06-12 23:22:52 +03:00
styles Allow UI font weight to be assigned in settings (#12333) 2024-05-26 23:06:58 -06:00
utils Avoid failing format test with current date (#10068) 2024-04-02 10:37:14 +02:00
clickable.rs Document ui crate traits 2024-01-09 14:15:25 -05:00
components.rs Allow ssh connection for setting up zed (#12063) 2024-05-21 22:39:16 -06:00
disableable.rs Fix possessive "its" in docs and comments (#3998) 2024-01-10 10:09:48 -05:00
fixed.rs Document ui crate traits 2024-01-09 14:15:25 -05:00
prelude.rs Add Tool Strip (#11756) 2024-05-13 17:58:08 -04:00
selectable.rs Clean up references in doc comments in ui and theme crates (#3985) 2024-01-09 15:22:36 -05:00
styled_ext.rs Make border methods always require an explicit width (#11450) 2024-05-06 13:22:47 -04:00
styles.rs Add wiring for UI density (#11260) 2024-05-01 14:28:52 -04:00
ui.rs Add WithRemSize element (#11928) 2024-05-16 14:37:55 -04:00
utils.rs Document UI modules 2024-01-09 12:57:12 -05:00
visible_on_hover.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
with_rem_size.rs ui: Don't break flex layout when using WithRemSize (#12076) 2024-05-20 21:39:18 -04:00