Commit log

86630bb Add extra clone

Mikayla created

269c3ea Uncomment tests

Mikayla created

7a7ef10 Add Context::read_window, WindowHandle::root, and change ViewContext.view() to return a reference

Mikayla created

b5f60b7 Merge branch 'main' into update-workspace-styles

Nate Butler created

4404e76 Merge branch 'main' into editor-integration

Mikayla created

0bfd18b WIP

Mikayla created

ad3b0bd port notifications2 and integration tests (#3283)

Click to expand commit body
Release Notes:

- N/A

Mikayla Maki created

8c44f6a Simplify input handling (#3282)

Click to expand commit body
This PR takes a different approach to input handling.

Rather than returning the optional input handler, focus handle pair from
the element trait, we instead allow you to register an input handler
imperatively on the window context with `WindowContext::handle_input`.
You pass a focus handle reference and any implementer of
`PlatformInputHandler`. There's an `ElementInputHandler<V>` that
implements `PlatformWindowHandler` so long as `V` implements
`InputHandler`.

Release Notes:

- N/A

Nathan Sobo created

7888dc4 Add notifications2

Mikayla created

d52c564 Add docs

Nathan Sobo created

7c922ad Remove comments

Nathan Sobo created

8278a07 Actually set the input handler

Nathan Sobo created

8330fb5 port rope2 to zed2 (#3224)

Click to expand commit body
port rope2 to zed2

Release Notes:

- NA

Mikayla Maki created

e2130ca Switch from associated type to generic on EventEmitter trait (#3281)

Click to expand commit body
This removes a lot of ad-hoc event translation code in the workspace and
replaces it with a GPUI feature and trait bounds.

TODO:
- [x] Proof out idea
- [x] Convert the workspace
- [x] Convert the rest of the app

Release Notes:

- N/A

Mikayla Maki created

2c67cc8 Merge branch 'main' into event-emitter

Mikayla created

9a02267 Simplify IME support

Nathan Sobo created

3c57b91 Update editor to use new event emitter

Mikayla created

a97c8bf Get workspace compiling with new event emitters

Mikayla created

97ce9e9 de-dbg (#3280)

Click to expand commit body
Remove some debugging from GoToLine

Release Notes:

- N/A

Conrad Irwin created

2bf8616 Implement `bounds_for_range`, so that text input windows are positioned correctly (#3278)

Click to expand commit body
![Screenshot 2023-11-08 at 5 33
10 PM](https://github.com/zed-industries/zed/assets/326587/09efd785-2c43-41b2-9429-c17067497fd2)

![Screenshot 2023-11-08 at 5 33
28 PM](https://github.com/zed-industries/zed/assets/326587/14a9faee-3547-40b6-a31f-16f653cdcb36)

Max Brunsfeld created

47a63d5 de-dbg

Conrad Irwin created

4350801 Merge branch 'main' into bounds-for-range

Max Brunsfeld created

277fbda Fix vertical position in first_rect_for_character_range

Max Brunsfeld created

8686543 Assign gutter widht on editor view when painting element

Max Brunsfeld created

26fc36e First pass at allowing multiple event types to be emitted by an entity

Mikayla created

15f6fbf Merge branch 'bounds-for-range' of github.com:zed-industries/zed into bounds-for-range

Marshall Bowers created

9a41c58 Hard-code the gutter margin temporarily

Marshall Bowers created

b77fab0 :art:

Max Brunsfeld created

b90e34a go to line2 (#3261)

Click to expand commit body
- MODAL
- center a div
- MOAR CODE
- Beautiful go to line modal


Release Notes:
- N/A

Conrad Irwin created

7a8f219 Account for element's bounds in Editor::bounds_for_range

Click to expand commit body
Co-authored-by: Marshall <marshall@zed.dev>

Max Brunsfeld and Marshall created

cef8fa5 tidy tidy

Conrad Irwin created

1a37d9e Register text input handlers via new element hook

Click to expand commit body
Provide element bounds to the input handler's `bounds_for_rect` method.

Co-authored-by: Marshall <marshall@zed.dev>

Max Brunsfeld and Marshall created

1b9f76c Refactor GoToLine to use cx.observe_new_views()

Conrad Irwin created

d273fa6 Fix DisplaySnapshot::x_for_point always returning 0

Click to expand commit body
Co-authored-by: Marshall <marshall@zed.dev>

Max Brunsfeld and Marshall created

c814404 Fix blinking in `editor2` (#3272)

Click to expand commit body
This also introduces new APIs in `ViewContext` for observing window
focus changes.

Release Notes:

- N/A

Max Brunsfeld created

c7139db Get tsserver running again

Julia created

cbdd4ac Merge branch 'main' into go-to-line2

Conrad Irwin created

6a802e2 Make Modals dismissable in theory

Conrad Irwin created

e505fb3 WIP

Nate Butler created

23a97f5 Document ColorScaleSteps (#3271)

Click to expand commit body
[[PR Description]]

Adds documentation to ColorScaleSteps:

```rust
/// Returns the specified step in the [`ColorScale`].
    #[inline]
    pub fn step(&self, step: ColorScaleStep) -> Hsla {
        // Steps are one-based, so we need convert to the zero-based vec index.
        self.0[step.0 - 1]
    }

    /// `Step 1` - Used for main application backgrounds.
    ///
    /// This step provides a neutral base for any overlaying components, ideal for applications' main backdrop or empty spaces such as canvas areas.
    ///
    #[inline]
    pub fn step_1(&self) -> Hsla {
        self.step(ColorScaleStep::ONE)
    }

    /// `Step 2` - Used for both main application backgrounds and subtle component backgrounds.
    ///
    /// Like `Step 1`, this step allows variations in background styles, from striped tables, sidebar backgrounds, to card backgrounds.
    #[inline]
    pub fn step_2(&self) -> Hsla {
        self.step(ColorScaleStep::TWO)
    }

    /// `Step 3` - Used for UI component backgrounds in their normal states.
    ///
    /// This step maintains accessibility by guaranteeing a contrast ratio of 4.5:1 with steps 11 and 12 for text. It could also suit hover states for transparent components.
    #[inline]
    pub fn step_3(&self) -> Hsla {
        self.step(ColorScaleStep::THREE)
    }

    /// `Step 4` - Used for UI component backgrounds in their hover states.
    ///
    /// Also suited for pressed or selected states of components with a transparent background.
    #[inline]
    pub fn step_4(&self) -> Hsla {
        self.step(ColorScaleStep::FOUR)
    }

    /// `Step 5` - Used for UI component backgrounds in their pressed or selected states.
    #[inline]
    pub fn step_5(&self) -> Hsla {
        self.step(ColorScaleStep::FIVE)
    }

    /// `Step 6` - Used for subtle borders on non-interactive components.
    ///
    /// Its usage spans from sidebars' borders, headers' dividers, cards' outlines, to alerts' edges and separators.
    #[inline]
    pub fn step_6(&self) -> Hsla {
        self.step(ColorScaleStep::SIX)
    }

    /// `Step 7` - Used for subtle borders on interactive components.
    ///
    /// This step subtly delineates the boundary of elements users interact with.
    #[inline]
    pub fn step_7(&self) -> Hsla {
        self.step(ColorScaleStep::SEVEN)
    }

    /// `Step 8` - Used for stronger borders on interactive components and focus rings.
    ///
    /// It strengthens the visibility and accessibility of active elements and their focus states.
    #[inline]
    pub fn step_8(&self) -> Hsla {
        self.step(ColorScaleStep::EIGHT)
    }

    /// `Step 9` - Used for solid backgrounds.
    ///
    /// `Step 9` is the most saturated step, having the least mix of white or black.
    ///
    /// Due to its high chroma, `Step 9` is versatile and particularly useful for semantic colors such as
    /// error, warning, and success indicators.
    #[inline]
    pub fn step_9(&self) -> Hsla {
        self.step(ColorScaleStep::NINE)
    }

    /// `Step 10` - Used for hovered or active solid backgrounds, particularly when `Step 9` is their normal state.
    #[inline]
    pub fn step_10(&self) -> Hsla {
        self.step(ColorScaleStep::TEN)
    }

    /// `Step 11` - Used for text and icons requiring low contrast or less emphasis.
    #[inline]
    pub fn step_11(&self) -> Hsla {
        self.step(ColorScaleStep::ELEVEN)
    }

    /// `Step 12` - Used for text and icons requiring high contrast or prominence.
    #[inline]
    pub fn step_12(&self) -> Hsla {
        self.step(ColorScaleStep::TWELVE)
    }
```

Release Notes:

- N/A

Nate Butler created

208f5f5 Extend `Styled` for Zed-specific methods (#3276)

Click to expand commit body
[[PR Description]]

- Adds `StyledExt` for Zed-specific methods like `ui_text`, `v_flex`,
etc.
- Updates components previously using `text_*` methods.

Release Notes:

- N/A

Nate Butler created

097efde WIP

Mikayla created

9cc3ee9 Update usages of `text_size_*` to `text_ui` in ui components

Click to expand commit body
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>

Nate Butler and Marshall Bowers created

9bdfc7a Update StyledExt to impl over I & F as well as V for Div

Click to expand commit body
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>

Nate Butler and Marshall Bowers created

acf3780 Use a fork of `ctor` to silence warnings generated by macro (#3275)

Click to expand commit body
This PR switches us over to a fork of `ctor` that contains the fixes
from https://github.com/mmastrac/rust-ctor/pull/295, backported to our
current version of `ctor` (v0.1.20).

Once 1) the `ctor` maintainer publishes a new version with that change
and 2) we're ready to upgrade to the latest version of `ctor` we can
switch back to the mainline version.

Release Notes:

- N/A

Marshall Bowers created

f4abd95 Remove the Stack trait, update StyledExt to include stacks

Click to expand commit body
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>

Nate Butler and Marshall Bowers created

cb830a4 Remove unused code in `avatar`

Nate Butler created

94e1a75 WIP: Add collab tests (#3232)

Click to expand commit body
TODO:
- [x] GPUI2: Implement record_backtrace on executor
- [x] GPUI2: Implement rng on executor
- [x] GPUI2: Determine whether to Implement global notifications for
removals
- [x] Get existing tests passing

TODO later:
- [ ] Port: collab_ui and uncomment tests
- [ ] Port: editor and uncomment tests
- [ ] Port: notifications and uncomment tests



Release Notes:

- N/A

Mikayla Maki created

4ef2f0b Update StyledExt to use more idiomatic method naming

Nate Butler created

e90f6ac Silence problem

Conrad Irwin created