Commit graph

14786 commits

Author SHA1 Message Date
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
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
Kirill Bulatov
92953fb53d If enabled, search in ignored files during project search 2023-11-22 16:41:02 +02:00
Piotr Osiewicz
ce3acf17cf
CI: use global config toml (#3384)
It looks like we should keep RUSTFLAGS consistent in CI if possible;
some commands augmented RUSTFLAGS with "-D warnings" which overrode
`.cargo/config.toml`, causing unnecessary rebuilds even for non-bundling
runs. Tl;dr: for the last few days our average CI time spiked
significantly.
There are several solutions:
- We can place `-D warnings` in our `.cargo/config.toml`. That's not a
good solution, because then you wouldn't ever be able to build Zed with
warnings locally. A true PITA!
- We can place another config.toml somewhere in the search path
(https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure)
and rely on the merging of properties. That way we can avoid having `-D
warnings` on developer machines while being able to override CI
behaviour at will.

This PR implements the latter approach by creating the new config file
manually. Ideally we should have it a a separate file in repository
that's moved into $HOME/.cargo on each CI run. Maybe we should even
place it somewhere more local to the checked out Zed version, as placing
it in a global spot is kinda bad too - what if we start building
multiple cargo projects on our CI machines?

Release Notes:

- N/A
2023-11-22 15:25:43 +01:00
Piotr Osiewicz
492c3a1e83 Bump artifact size limit for CI to 100GB 2023-11-22 15:14:24 +01:00
Piotr Osiewicz
6f8e03470c Use printf instead of echo 2023-11-22 14:41:26 +01:00
Piotr Osiewicz
8a6d3094c4 Change tabs to spaces 2023-11-22 14:37:41 +01:00
Piotr Osiewicz
552f03c49d chore/CI: place .cargo/config.toml augmentations in ~/.cargo/config.toml 2023-11-22 14:36:10 +01:00
Mikayla Maki
c199d92dac
Update main.rs 2023-11-21 18:14:14 -08:00
Marshall Bowers
a94cf54aab
Fix storybook (#3379)
This PR fixes storybook and gets it back into a compiling and running
state.

Release Notes:

- N/A
2023-11-21 14:28:00 -05:00
Nate Butler
6fe7b22164
UI refinements + Popover (#3377)
[[PR Description]]

- Update default ui_font_size
- Update toolbar style
- Start on ui::Popover

Release Notes:

- N/A
2023-11-21 13:49:10 -05:00
Marshall Bowers
1b05aad30c
Extract Story into separate story crate (#3378)
This PR extracts the `Story` component into a separate `story` crate so
that it can be shared among various crates that define stories.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2023-11-21 13:42:00 -05:00
Nate Butler
40a49e6896 Update popover doc
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-21 12:43:56 -05:00
Nate Butler
9a145a4d86 Correctly position popover aside, add list item states
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-21 12:40:48 -05:00
Nate Butler
9f2e3bab9b Allow popover to take an aside
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-21 12:26:10 -05:00
Nate Butler
dac7912e87 Start on popover 2023-11-21 12:10:06 -05:00
Marshall Bowers
f4b4bdfd83
ui2: Get component stories compiling again (#3376)
This PR gets the component stories defined in `ui2` compiling again.

Release Notes:

- N/A
2023-11-21 12:06:25 -05:00
Nate Butler
f04deeb5f9 Document InteractionState 2023-11-21 11:51:15 -05:00
Nate Butler
bec61123fd Update toolbar.rs 2023-11-21 11:06:27 -05:00
Marshall Bowers
6cd0bcc578
Fix panic when opening settings in zed2 (#3375)
This PR fixes a panic that occurs when opening the settings in zed2.

We store the `ThemeRegistry` as a global without wrapping it in an
`Arc`, so we need to retrieve it the same way.

Release Notes:

- N/A
2023-11-21 10:58:52 -05:00
Nate Butler
6d6aa3b253 Update default ui font settings 2023-11-21 10:43:18 -05:00
Nate Butler
79c890f31a
ui2 cleanup (#3374)
[[PR Description]]

Tidies up the `ui2` crate, removing all components we aren't using and
doing a bit of reorganization.

Release Notes:

- N/A
2023-11-21 01:55:00 -05:00
Nate Butler
209fb10731 Remove stories mod until it is re-enabled 2023-11-21 01:36:35 -05:00
Nate Butler
8947438510 Update elevation 2023-11-21 01:23:47 -05:00
Nate Butler
453aa5ffd7 TextColor -> Color 2023-11-21 01:05:29 -05:00
Nate Butler
56d45e72cd Add Shape enum to avatar component, refactor UITextSize to styles/typography.rs 2023-11-21 00:59:29 -05:00
Nate Butler
205607a9cd Clean out UI 2023-11-21 00:44:51 -05:00
Piotr Osiewicz
b4275008f9
Search2 (#3332)
This is just a buffer search (without project search), as the latter
needs a multibuffer from `editor`
Release Notes:

- N/A
2023-11-21 01:38:14 +01:00
Mikayla Maki
361801e527
WIP: Remove V parameter on elements (#3366)
This is an exploration of what it would take to remove the `V` generic
from the element type. Answer: less than I expected.

I added a new struct to GPUI2: `CallbackHandle<Event>`, and reworked the
interactivity related APIs to take this type. I also added a
`.callback()` function to `ViewContext` that can construct a
`CallbackHandle` to wrap our current `|&mut View, &Evt, &mut
ViewContext| {...}` based APIs. With these two changes, we can now
capture the context of the callsite of a click handler, allowing us to
capture all relevant types and data _before_ sending them into GPUI.
This lets us achieve a similar programing style to the existing system,
while also letting us remove all of the generics from the entire element
system. For an example of what this looks like in practice, here's a
side by side diff of the test in `interactive.rs` (which compiles and
passes):

<img width="1310" alt="Screenshot 2023-11-19 at 7 32 08 PM"
src="https://github.com/zed-industries/zed/assets/2280405/596f2a9a-9c8e-4158-bf6d-0003cf973015">

Note how the new arrangement of types is more amenable to rust's type
inference, allowing the code to be just as terse as before despite the
extra function call in the middle.

This approach also allows components to provide well typed APIs to
views, without ever knowing that view's type. This PR includes an
example rewrite of the button component in `ui2`, here's what it's
struct could look like now:

<img width="1105" alt="Screenshot 2023-11-19 at 7 24 28 PM"
src="https://github.com/zed-industries/zed/assets/2280405/fc98d3c2-6831-4c0f-a324-ab0fae33b0bc">

However, I have not yet ported the derive macro for Component to this
new structure, as I know @nathansobo is currently reworking that code.

Once that macro has been rewritten, it should be relatively easy to
rewrite the rest of Zed2 with this approach, the only major difference
that I can foresee is that the editor element would need to wrap it's
operations in an update callback. Though I can think of a few ways to
fix this with a new `ViewElement` trait, that does the wrapping for you.
2023-11-20 16:24:01 -08:00
Piotr Osiewicz
2138715fca Merge remote-tracking branch 'origin/callback-handles' into search2 2023-11-21 01:16:21 +01:00
Mikayla
a844bf7d41
Fix stories
co-authored-by: Piotrek <piotr@zed.dev>
2023-11-20 16:06:10 -08:00
Piotr Osiewicz
3e329861f9 Brave new world awaits
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-11-21 00:47:47 +01:00
Piotr Osiewicz
54a3b56935 Merge remote-tracking branch 'origin/callback-handles' into search2 2023-11-21 00:40:20 +01:00
Conrad Irwin
8049ec674e Fix last thing 2023-11-20 16:35:56 -07:00
Conrad Irwin
5c0f2e75ea Remove all the settings 2023-11-20 16:30:14 -07:00
Conrad Irwin
3e2dba36b4 Merge branch 'main' into callback-handles 2023-11-20 16:28:35 -07:00
Nate Butler
3096222672
Add deploy-docs script (#3373)
[[PR Description]]

Adds `script/deploy-docs`:
- If you don't already have it, it will clone the `zed-docs` repo into
`../zed-docs`
    - It will build the docs and output them in `../zed-docs`
    - Then it will open the docs.
- By default this "dry runs" (doesn't push) but you can pass `-p` to
push the changes.
    - If you add `-c` it will clean out the old docs before running.
    
If you run the script with `p` it will push up the changes, and vercel
will automatically deploy them.

Release Notes:

- N/A
2023-11-20 18:07:37 -05:00
Conrad Irwin
8b6b7e60be borrow less 2023-11-20 16:00:47 -07:00
Nate Butler
a83d626912 Make the script a bit more resilient 2023-11-20 17:50:25 -05:00
Mikayla
2c4d83c9af
WIP
co-authored-by: conrad <conrad@zed.dev>
co-authored-by: Nathan <nathan@zed.dev>
2023-11-20 14:46:01 -08:00
Nate Butler
a87ffa58ff Add more crates 2023-11-20 17:07:14 -05:00
Nate Butler
3210d36727 Create deploy-docs 2023-11-20 16:13:18 -05:00
Marshall Bowers
652e3b0bb6
Rename ListEntry to ListItem (#3371)
This PR renames the `ListEntry` component to `ListItem` to better
reflect its intent.

Release Notes:

- N/A
2023-11-20 16:13:06 -05:00
Max Brunsfeld
4f4ef4a357
More fixes for zed nightly (#3370)
When running `script/bundle` with the new `-2` flag, we needed to adjust
the fat-binary creation step to look for the binary called `Zed2`.

We also fixed a source of intermittent build failures in `script/bundle`
due to running multiple `swift build` processes concurrently for the
`live_kit_client2` crate, building for the two architectures.

Release Notes:

NA
2023-11-20 12:36:25 -08:00
Max Brunsfeld
2731855487 Fix error when building live_kit_client2 for two architectures concurrently
Co-authored-by: Julia <julia@zed.dev>
2023-11-20 12:10:35 -08:00
Marshall Bowers
eb307b22f0
Rework List to use children (#3369)
This PR reworks the `List` component to use `children` instead of
accepting a `Vec<ListItem>` in its constructor.

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

Release Notes:

- N/A
2023-11-20 14:58:31 -05:00
Mikayla
6985b70859
fix gpui2 2023-11-20 11:55:27 -08:00
Conrad Irwin
25ed7c57c1 WIP 2023-11-20 12:34:08 -07:00