- Returning `IntoElement` because it's more universal than `Element` and
allows us to easily return components.
- Using `impl IntoElement` in `RenderOnce` for consistency, which
requires `Component` to allocate an `AnyElement`. We use a bump
allocated arena anyway for these, and my benchmark doesn't show an
impact.
![frame-time-histogram](https://github.com/zed-industries/zed/assets/1789/d3889cca-9ebc-4d72-aa68-34a5be3bad3c)
In this histogram, frames-0 is this PR, frames-1 is main.
Release Notes:
- N/A
This makes it a bit more approachable to implement.
This required converting the state of Component to AnyElement, which
costs an allocation. I'm hoping this will be ok performance-wise now
that AnyElements use bump allocation, but I need to benchmark still.
This PR applies another round of refinements to the ported Zed1 themes.
Most of this was focused around the coloration of UI text to better
match Zed1.
Release Notes:
- N/A
This PR is a first pass at porting the Zed1 themes to Zed2.
For the initial release of Zed2 we'll be shipping just the themes that
existed in Zed1, ported to Zed2. The new themes that were previously
added just in Zed2 have been removed.
Release Notes:
- N/A
Fixes:
- drag and drop into terminal element does not change its style
- drag and drop terminal tab into main pane then back panics
- can drop non-terminal items into the terminal pane
Release Notes:
- N/A
Once a drag starts, we won't fire click listeners or style any elements
as active.
- Don't fire click listeners or show active state once a drag is in
progress
- Don't show hover style when a drag is in progress
- Draw borders above content
- If borders are opaque, apply them to the content mask. This prevents
hovers from firing on content underneath the border, which was creating
issues where the drag handle was inside the border, so we'd flicker the
hover when the mouse moved out of the drag handle and into the 1px
border on the left dock.
- Add a `block_mouse` helper which causes transparent elements to paint
an "opaque" layer to prevent mouse events from falling through. We use
this for the drag handle as well to disable hover, click, etc on items
in the panel.
Release Notes:
- N/A
* Ensure that views' on_release callbacks are always called (even if
their window is gone), by passing them a `AppContext`, not a
`WindowContext`.
* Fix leaked handles to `CollabPanel`, `NotificationPanel`, and
`ChatPanel` caused by captures in a `ListState` render callback.
This fixes two issues we were seeing with following:
* inability to rejoin a remote project after you closed it
* following not working if a window had previously been closed
This allows the content mask to correctly apply to bounds used in event handlers,
which prevents content under opaque borders from being hovered in overflow hidden
containers.
Co-Authored-By: Antonio <antonio@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>