Commit graph

14755 commits

Author SHA1 Message Date
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
Conrad Irwin
d0dd44faad Merge branch 'main' into callback-handles 2023-11-20 12:21:42 -07:00
Max Brunsfeld
6e84f740aa Set -e in bump-nightly script
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-11-20 11:01:37 -08:00
Max Brunsfeld
c571273ab4 Allow bundling in debug mode with both architectures
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-11-20 11:00:12 -08:00
Max Brunsfeld
babd41916a Remove gpui (1) dependencies from zed2
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-11-20 10:46:16 -08:00
Mikayla
acbad4c7b7
WIP 2023-11-20 10:34:22 -08:00
Piotr Osiewicz
fe0a8b4be2 Fix warnings in tests 2023-11-20 19:25:14 +01:00
Piotr Osiewicz
d60855b06d Merge branch 'main' into search2 2023-11-20 19:23:35 +01:00
Piotr Osiewicz
99ef8ccd3f fixup dismissing of search bar 2023-11-20 19:07:37 +01:00
Conrad Irwin
6f0cdc35f3
Refine element and component traits (#3367)
This PR changes `Element::paint` to move self and introduces a new
`RenderOnce` trait, which renders into an element by moving self.
Elements are required to be `RenderOnce`, and `element_id` is now on
`RenderOnce` so we can get the id without moving self. The `child` and
`children` methods now expect `impl RenderOnce`.

```rust
pub trait Element<V: 'static>: 'static + RenderOnce<V> {
    type State: 'static;

    fn layout(
        &mut self,
        view_state: &mut V,
        element_state: Option<Self::State>,
        cx: &mut ViewContext<V>,
    ) -> (LayoutId, Self::State);

    fn paint(
        self,
        bounds: Bounds<Pixels>,
        view_state: &mut V,
        element_state: &mut Self::State,
        cx: &mut ViewContext<V>,
    );

    fn into_any(self) -> AnyElement<V> {
        AnyElement::new(self)
    }
}

pub trait RenderOnce<V: 'static>: Sized {
    type Element: Element<V> + 'static;

    fn element_id(&self) -> Option<ElementId>;

    fn render_once(self) -> Self::Element;

   // default helpers ...
}
```

To make a type a component, you can add `#[derive(RenderOnce)]`, which
will require your type to implement the `Component` trait:

```rust
pub trait Component<V: 'static>: 'static {
    type Rendered: RenderOnce<V>;

    fn render(self, view: &mut V, cx: &mut ViewContext<V>) -> Self::Rendered;
}
```

I'm satisfied with this being what we open source for elements, aside
from maybe adding a `StatefulComponent` trait that uses element state.
Things finally feel like they slot into a coherent and simple narrative.

Release Notes:

- N/A
2023-11-20 10:48:50 -07:00
Piotr Osiewicz
3ddfc7ff61 Remove unused import 2023-11-20 18:44:51 +01:00
Piotr Osiewicz
fa8cd843ca fixup! Merge branch 'main' into search2 2023-11-20 18:42:15 +01:00
Piotr Osiewicz
07cc5904f8 Merge branch 'main' into search2 2023-11-20 18:37:41 +01:00
Piotr Osiewicz
3d28495c67 fixup! Remove dbg statements 2023-11-20 18:35:39 +01:00
Piotr Osiewicz
ad38708ede Remove dbg statements 2023-11-20 18:31:30 +01:00
Piotr Osiewicz
c1f0ac30a0 Fix up tests once and for good 2023-11-20 18:24:37 +01:00
Conrad Irwin
b19a6c0dcc Fix storybook2 2023-11-20 10:16:05 -07:00
Conrad Irwin
5d16f76518 fmt 2023-11-20 10:05:57 -07:00
Conrad Irwin
8599ba557d Fix more import errors 2023-11-20 10:01:21 -07:00
Conrad Irwin
f08426c7a0 shhhh 2023-11-20 10:00:37 -07:00
Conrad Irwin
f86480ba5d Merge followup mess 2023-11-20 09:58:05 -07:00
Conrad Irwin
0798cfd58c Merge branch 'main' into derive-element-redux 2023-11-20 09:15:38 -07:00
Joseph T. Lyons
385028865e
Add timestamp delta to telemetry events (#3365)
- [X] assistant_events
- [X] call_events
- [X] copilot_events
- [X] cpu_events
- [X] download_events
- [X] editor_events
- [X] memory_events
- [X] page_events
- [X] panic_events
---
- [X] For each of the previous tables:
    - [X] backup events to comp
    - [X] make new table (changing any time fields to be datetime64)
    - [X] copy data
    - [X] rename old table
    - [X] rename new table
---
- [ ] Delete all old tables once (going to hold off on this for some
time - want to make sure things are working correctly)
    - [X] we see new data coming in on new tables
    - [X] old times truncate correctly
    - [X] new times show millisecond values
---
- [X] check dashboards to make sure queries didn't get broken from
changing time data type
    - [X] Fix broken charts
- [X] monitor vercel for runtime errors

---

- [X] zed.dev changes
- [X] chrono changes to panicked_on
    - [X] Make sure new panics are good
- [X] remove commented out code and dbg code
- [X] triple check that both crate versions have the changes
- [X] make sure all event function calls use the same original arguments
- [X] Finish testing version 2

Release Notes:

- N/A
2023-11-20 09:27:18 -05:00
Joseph T. Lyons
966bf56ddb Activate telemetry in zed2 2023-11-20 09:08:07 -05:00
Piotr Osiewicz
8d4828a2e8 Circumvent part of the tests 2023-11-20 13:43:56 +01:00
Mikayla
f3eb1d4abf
Add button port example 2023-11-19 19:11:51 -08:00
Joseph T. Lyons
5dc3369cf6 Remove unused imports 2023-11-19 22:09:14 -05:00
Joseph T. Lyons
722ad5a01d Fix data types 2023-11-19 22:03:55 -05:00
Joseph T. Lyons
8e612e4287 Restore commented-out code 2023-11-19 22:00:01 -05:00
Joseph T. Lyons
e0f8615d52 Remoe dbg!()s 2023-11-19 21:55:19 -05:00
Joseph T. Lyons
3abd376d6a Add timestamp delta to telemetry events 2023-11-19 21:52:28 -05:00
Conrad Irwin
45371584b1
Focus workspace on launch (#3364)
Fixes action dispatch when no focus is there.

Release Notes:

- N/A
2023-11-19 19:38:41 -07:00