e505fb3
WIP
Nate Butler created
e505fb3
WIP
Nate Butler created
23a97f5
Document ColorScaleSteps (#3271)
[[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)
[[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
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
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)
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
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)
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
dbe06fe
Merge branch 'main' into add-collab-tests
Conrad Irwin created
409e17a
Merge branch 'main' into go-to-line2
Mikayla created
6ecf629
BROKEN: Checkpoint
Nate Butler created
1864d37
Fix double borrow in synchronous tests
Mikayla created
b6b0fea
Merge branch 'main' into fix-editor-blinking
Max Brunsfeld created
b33ea3c
Preserve stateless interactivity when assigning elements an id (#3274)
Max Brunsfeld created
2ac2824
Merge branch 'main' into picker-actions
Max Brunsfeld created
5480c01
Extract a `Frame` struct from `Window` (#3273)
This PR pulls the previous/current frame data out of the `Window` and into a separate `Frame` struct. Release Notes: - N/A
Max Brunsfeld created
4c31a0c
Preserve stateless interactivity when assigning elements an id
Co-authored-by: Nathan <nathan@zed.dev> Co-authored-by: Piotr <piotr@zed.dev>
Max Brunsfeld , Nathan , and Piotr created
cb03159
Don't generate licenses on every PR (#3260)
Build speed improvification
Mikayla Maki created
e1cb993
Get tests green
Mikayla created
ca2cc42
Remove unused `SceneBuilder` constructor
Marshall Bowers created
866df77
Extract a `Frame` struct from `Window`
Co-Authored-By: Marshall <marshall@zed.dev> Co-Authored-By: Nathan <nathan@zed.dev> Co-Authored-By: Piotr <piotr@zed.dev>
Antonio Scandurra , Marshall , Nathan , and Piotr created
14b41d6
Introduce `ViewContext::on_blur`
Co-Authored-By: Marshall <marshall@zed.dev>
Antonio Scandurra and Marshall created
2fd8b1f
Fix blinking behavior in editor when receiving/losing focus
Co-Authored-By: Marshall <marshall@zed.dev>
Antonio Scandurra and Marshall created
e4ca2cb
Update titlebar
Nate Butler created
6e11044
add `ui_text_size` functions
Nate Butler created
9b30f49
Merge branch 'main' into add-collab-tests
Mikayla created
3050c44
Merge branch 'main' into add-collab-tests
Mikayla created
d25f48e
Register menu2 actions using actions macro
Max Brunsfeld created
738b2ce
Extract a `Frame` struct from `Window`
Co-Authored-By: Marshall <marshall@zed.dev> Co-Authored-By: Nathan <nathan@zed.dev> Co-Authored-By: Piotr <piotr@zed.dev>
Antonio Scandurra , Marshall , Nathan , and Piotr created
c67f78c
Improve get preview channel changes script (#3270)
- Improve reliability of finding release note lines - Identify cases where release notes were accidentally omitted (no "N/A line) - Filter out N/As Release Notes: - N/A
Joseph T. Lyons created
0143fa2
Fix clipping bugs in `editor2` (#3269)
Release Notes: - N/A
Antonio Scandurra created
761d4fc
Port the picker and uniform list (#3248)
This adds a `UniformList` element and partially implements `Picker` as a component, using `UniformList`. Because editor2 isn't fully implemented yet, the picker doesn't have filtering logic yet. We want to merge this for now though, to make the UniformList element available for other crates. Release Notes: - N/A
Marshall Bowers created
e6bda02
Improve get preview channel changes script
- Filter out N/As - Identify missing release note lines Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Joseph T. Lyons and Piotr Osiewicz created
b6766ba
Replace `GitStatusColors` with `StatusColors` (#3268)
This PR removes `GitStatusColors` in favor of just using `StatusColors` instead. Release Notes: - N/A
Marshall Bowers created
d71f671
Fix clipping in `Line::draw`
Co-Authored-By: Nathan <nathan@zed.dev> Co-Authored-By: Marshall <marshall@zed.dev>
Antonio Scandurra , Nathan , and Marshall created
727fb4f
Use a consistent clipping strategy for drawing all the primitives
Co-Authored-By: Nathan <nathan@zed.dev>
Antonio Scandurra and Nathan created
e9650c0
Fix overflow in `UniformList`
Marshall Bowers created
fe28d8f
Merge branch 'main' into picker
Marshall Bowers created
9e5a4ea
v0.113.x dev
Joseph T. Lyons created
1310747
Wire up mouse interaction in `editor2` (#3267)
Release Notes: - N/A
Antonio Scandurra created
55dca1e
:lipstick:
Antonio Scandurra created
15d40d6
Determine whether the gutter was hovered
Antonio Scandurra created
dfc536b
Handle MouseUpEvent in editor2
Antonio Scandurra created
e500c05
Move building of key listeners outside of EditorElement::initialize
Antonio Scandurra created
bef3b80
Clear hover background highlights
Co-Authored-By: Piotr <piotr@zed.dev>
Antonio Scandurra and Piotr created
e5f78ec
Uncomment mouse_dragged event
Co-authored-by: Antonio <antonio@zed.dev>
Piotr Osiewicz and Antonio created