We still aren't handling CLI requests in the app, but this lays the foundation for bi-directional communication.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This allows us to focus the query editor of the project search when deploying it. Previously, a complex interplay between focus events was preventing this from working in an intuitive way. What happened previously:
- We'd activate the project search, which enqueued a focus effect for the project search view
- We'd focus the query editor, which enqueued an effect
- We'd process the focus effect for the search view, which would enqueue an effect to transfer focus to the results editor
- We'd process the effect to focus the query editor
- We'd process the effect to focus the results editor
Now...
- We activate the project search pane item, enqueuing a focus effect for the project search itself
- We focus the query editor and *remove* the previous pending focus change effect
- We process the focus effect
Also, allow arbitrary types to be used as Actions via the impl_actions macro
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
This is in contrast to not dispatching the event altogether in `Flex` when
the event is not contained in the flex element bounds. That approach was
problematic because it didn't give an opportunity to `MouseEventHandler`s
to handle mouse move events when they didn't intersect with the element bounds,
causing elements to never clear their hover state, cursor style, etc.
This adds the ability to make a Flex element scrollable by passing a type tag and instance id, which we use to store the scroll position in an ElementStateHandle.
Still need to allow the element to auto-scroll.
Previously, we weren't updating the toolbar's active item when emptying out a pane. This enhances an integration test to ensure that we don't hold references to any editors or buffers once we close everything.
Instead, derive it from the presenter. This makes tests easier to write and more reliable since we'll be accurately simulating the actual relationship between parent and child views.
We still have issues with project search styling.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>