Commit Graph
14851 Commits
Author SHA1 Message Date
Antonio Scandurra 510320bb47 Introduce InteractiveText (#3397)
This new element will let us react to click events on arbitrary ranges
of some rendered text, e.g.:

```rs
InteractiveText::new(
    "element-id",
    StyledText::new("Hello world, how is it going?").with_runs(vec![
        cx.text_style().to_run(6),
        TextRun {
            background_color: Some(green()),
            ..cx.text_style().to_run(5)
        },
        cx.text_style().to_run(18),
    ]),
)
.on_click(vec![2..4, 1..3, 7..9], |range_ix, cx| {
    println!("Clicked range {range_ix}");
})
```

As part of this, I also added the ability to give text runs a background
color.

Release Notes:

- N/A
2023-11-23 19:35:03 +01:00
Antonio Scandurra 7eeb8078f6 Allow setting text background color via TextStyle 2023-11-23 19:22:18 +01:00
Antonio Scandurra 1ad22231d2 Allow providing a background color in a TextRun 2023-11-23 18:55:16 +01:00
Kirill Bulatov df7b89b6cb Allow to include gitignored files into project search (#3394) 2023-11-23 19:28:11 +02:00
Piotr Osiewicz 204218b5f5 chore: Use "limited" debug info (#3396)
This one does not contain variable-level debug info; since we mostly
rely on backtraces though, this should be fine. It also improves compile
times a bunch for both incremental and clean scenarios.

Release Notes:

- N/A
2023-11-23 18:17:55 +01:00
Antonio Scandurra 56d043f671 Allow finding which ranges were clicked on an InteractiveText 2023-11-23 18:08:49 +01:00
Piotr Osiewicz 41b7acc1de chore: Use "limited" debug info
This one does not contain variable-level debug info; since we mostly rely on backtraces though, this should be fine. It also improves compile times a bunch for both incremental and clean scenarios.
2023-11-23 17:54:43 +01:00
Piotr Osiewicz 72a1ada0ae Add scripts for running Zed2 collab environment (#3395)
./script/zed-local now looks for "--zed2" flag in its args and runs Zed2
binaries instead of zed1. 'foreman start' can be launched with '-f
Procfile.zed2" argument to launch zed2 collab server.

Release Notes:

- N/A
2023-11-23 14:45:52 +01:00
Piotr Osiewicz 0b67983ddf Add scripts for running Zed2 collab environment
./script/zed-local now looks for "--zed2" flag in its args and runs Zed2 binaries instead of zed1.
'foreman start' can be launched with '-f Procfile.zed2" argument to launch zed2 collab server.
2023-11-23 14:19:06 +01:00
Antonio Scandurra 2cc1df9053 Rename element-related traits (#3390)
@as-cii I think this naming makes more sense. If you like it, can you
push forward?

Release Notes:

- N/A
2023-11-23 13:03:05 +01:00
Antonio Scandurra 3b918bfee8 Merge branch 'main' into rename-element-traits
# Conflicts:
#	crates/gpui2/src/elements/uniform_list.rs
#	crates/ui2/src/components/context_menu.rs
#	crates/ui2/src/components/list.rs
2023-11-23 12:47:46 +01:00
Kirill Bulatov cee6fd8dd3 Port to gpui2 2023-11-23 10:44:05 +02:00
Kirill Bulatov eee63835fb Exclude more ignored/worktree-less/project-less buffers from inlay hint requests 2023-11-23 10:30:52 +02:00
Kirill Bulatov c2751c717e Parallelize ignored entries for search lookup 2023-11-23 09:53:00 +02:00
Joseph T. Lyons f33c0e80a6 Add app events (#3372)
Adds app events (`first open` and `open`). For the time being, I'm
abandonding trying to add `close`, after running into many issues
trying. The code is in place for me to continue on that work, but at the
moment, we require having the telemetry settings in hand when calling
any of the methods that log an event, so we can honor the user's
preference for sending telemetry or not, but when running the
`on_app_close` method, to send off an app `close` event, the settings
are no longer available (probably the order of teardown?), which causes
some tests to end up failing. I'm not sure how to solve this. Maybe we
keep the settings on the telemetry struct and update it each time any
event is logged, then, on app shutdown, when logging the app `close`
event, we can use the stored version (idk).

Release Notes:

- N/A
2023-11-22 23:16:28 -05:00
Joseph T. Lyons 35f35dd476 Remove unused import 2023-11-22 23:03:11 -05:00
Joseph T. Lyons 575ab81409 Disable app close event 2023-11-22 23:01:31 -05:00
Joseph T. Lyons a876b6f700 Remove comments 2023-11-22 23:01:18 -05:00
Julia 88af458f62 zed2(ish) Cancel completion resolution when new list (#3391)
Release Notes:

- N/A
2023-11-22 18:44:34 -05:00
Mikayla Maki f01a04a8e0 Fix pane splitting panic (#3381)
Also opens the window on startup.

Release Notes:

-
2023-11-22 14:12:28 -08:00
Piotr Osiewicz ebeb0fda28 ci: Add ci-config.toml in .cargo folder. (#3392)
Release Notes:

- N/A
2023-11-22 22:54:16 +01:00
Mikayla 6e84d8fbc0 Merge branch 'main' into panic-hunting 2023-11-22 13:47:17 -08:00
Mikayla eb74ad7caa Fix failing test 2023-11-22 13:41:48 -08:00
Piotr Osiewicz 6da57cbc6e Decouple workspace from call (#3380)
This PR decouples `call2` from `workspace2` in order to improve our
compile times.
Why pick such a small, innocent crate as `call`? It depends on
`live_kit_client`, which is not-so-innocent and is in fact stalling our
clean builds.
In this PR, `call2` depends on `workspace2`; workspace crate defines a
`CallHandler` trait for which the implementation resides in `call`; it
it then all tied together in `zed`, which passes a factory of `Box<dyn
CallHandler>` into workspace's `AppState`.
Clean debug build before this change: ~1m45s
Clean debug build after this change: ~1m25s

Clean release build before this change: ~6m30s
Clean release build after this change: ~4m30s

~Gonna follow up with release timings where I expect the change to be
more impactful (as this allows 2/3 of the infamous trio of
"project-workspace-editor" long pole to proceed quicker, without being
blocked on live-kit-client build script)~.
This should have little effect (if any) in incremental scenarios, where
live_kit_client is already built.
[release
timings.zip](https://github.com/zed-industries/zed/files/13431121/release.timings.zip)

Release Notes:
- N/A
2023-11-22 22:31:47 +01:00
Julia 37e3cc1291 zed2(ish) Cancel completion resolution when new list 2023-11-22 16:26:27 -05:00
Joseph T. Lyons 0def2bc0d2 Remove dbg 2023-11-22 16:26:15 -05:00
Piotr Osiewicz c04f123e44 ci: Add ci-config.toml in .cargo folder. 2023-11-22 22:25:26 +01:00
Joseph T. Lyons ee2b6834bd Revert "Convert telemetry into a model"
This reverts commit 6e4268a471.
2023-11-22 16:16:44 -05:00
Joseph T. Lyons c86e99928b Merge branch 'main' into add-app-events 2023-11-22 16:16:11 -05:00
Joseph T. LyonsandJulia 6e4268a471 Convert telemetry into a model
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-11-22 16:16:10 -05:00
Julia 62b1843704 zed1: Cancel completion resolution when new list (#3389)
Release Notes:

- Fixed a bug where Zed would continue to request documentation for
completion lists which were stale or no longer visible.
2023-11-22 14:23:09 -05:00
Julia f0c7b3e6ee Update copilot when we are the last task 2023-11-22 14:03:43 -05:00
Antonio Scandurra 2611b5d6d7 Fix positioning editor2's context menu when scrolling up/down (#3388)
Release Notes:

- N/A
2023-11-22 19:56:36 +01:00
Piotr Osiewicz b45234eece Fix warnings in unimplemented function 2023-11-22 19:24:38 +01:00
Piotr Osiewicz fa74c49dbb Add dummy call handler for tests 2023-11-22 19:23:58 +01:00
Nathan Sobo c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
JuliaandMax Brunsfeld 9abce4bdd9 zed1: Cancel completion resolution when new list
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-11-22 13:16:52 -05:00
Joseph T. Lyons 10c4df20e9 collab 0.29.0 2023-11-22 13:05:29 -05:00
Antonio Scandurra 524f892fb0 Correctly swap position of context menu 2023-11-22 19:02:44 +01:00
Joseph T. Lyons 7b0b87380d v0.115.x dev 2023-11-22 12:57:32 -05:00
Marshall Bowers cac6e22e8e Rework ListItem to use children (#3387)
This PR reworks the `ListItem` component to accept `children` rather
than just a `Label`.

This is a step towards making the `ListItem` component more open.

As part of this the `ContextMenu` was simplified to only construct the
various list components in `render` rather than holding them as part of
its state.

Release Notes:

- N/A
2023-11-22 12:55:20 -05:00
Marshall Bowers fd5793ddec Use children for ListItems 2023-11-22 12:44:51 -05:00
Marshall Bowers 031fca4105 Simplify ContextMenu by not storing list components 2023-11-22 12:41:29 -05:00
Marshall Bowers 2c8d243d22 Comment out todo!() to fix panic when opening context menus 2023-11-22 12:41:06 -05:00
Antonio Scandurra eaf90a4fbd Fix drawing uniform list elements when scrolling 2023-11-22 18:32:02 +01:00
Antonio Scandurra ca1d9dd0e5 Fix scrolling in gpui2::UniformList (#3386)
Release Notes:

- N/A
2023-11-22 18:10:49 +01:00
Kirill Bulatov 71e9bd8fa3 Use a git file icon for toggle gitignored search option 2023-11-22 19:09:10 +02:00
Kirill Bulatov 566857b0b7 Output non-ignored files first 2023-11-22 19:03:27 +02:00
Antonio Scandurra 8aaa46a1b6 Track scroll in editor's context menu 2023-11-22 17:58:00 +01:00
Antonio Scandurra bd4a710cef Use interactivity's base style for UniformList 2023-11-22 17:50:34 +01:00