[[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
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
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
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
- [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