Fix documentation labels obscuring other content in completion menu (#4167)
This PF fixes an issue where the documentation labels in the completion menu could end up completing obscuring the primary content. #### Before <img width="691" alt="Screenshot 2024-01-19 at 1 42 19 PM" src="https://github.com/zed-industries/zed/assets/1486634/187f2978-08be-4f5e-ba93-91ed09cd6e87"> #### After <img width="704" alt="Screenshot 2024-01-19 at 1 39 45 PM" src="https://github.com/zed-industries/zed/assets/1486634/e5929c04-bace-4336-b878-4ada5660d235"> Since this involved changes to the `ListItem`, I also made sure to test the other problematic case that was fixed in #3845 to make sure we didn't regress there: <img width="665" alt="Screenshot 2024-01-19 at 1 39 11 PM" src="https://github.com/zed-industries/zed/assets/1486634/14b72d44-b6a6-4aef-a708-37fb60b8875a"> I also tried to capture these cases in the `ListItem` stories to make it easier to test all of them at once: <img width="1141" alt="Screenshot 2024-01-19 at 1 40 03 PM" src="https://github.com/zed-industries/zed/assets/1486634/333886ff-e394-4cba-89db-98352481c7f6"> Release Notes: - Fixed an issue where documentation labels could obscure other content in the editor completion menu ([#2419](https://github.com/zed-industries/community/issues/2419)).
This commit is contained in:
parent
2166f071b3
commit
1cc7f66f86
3 changed files with 53 additions and 4 deletions
|
@ -307,6 +307,13 @@ pub trait Styled: Sized {
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the initial size of flex items for this element.
|
||||
/// [Docs](https://tailwindcss.com/docs/flex-basis)
|
||||
fn flex_basis(mut self, basis: impl Into<Length>) -> Self {
|
||||
self.style().flex_basis = Some(basis.into());
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the element to allow a flex item to grow to fill any available space.
|
||||
/// [Docs](https://tailwindcss.com/docs/flex-grow)
|
||||
fn flex_grow(mut self) -> Self {
|
||||
|
@ -314,6 +321,20 @@ pub trait Styled: Sized {
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the element to allow a flex item to shrink if needed.
|
||||
/// [Docs](https://tailwindcss.com/docs/flex-shrink)
|
||||
fn flex_shrink(mut self) -> Self {
|
||||
self.style().flex_shrink = Some(1.);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the element to prevent a flex item from shrinking.
|
||||
/// [Docs](https://tailwindcss.com/docs/flex-shrink#dont-shrink)
|
||||
fn flex_shrink_0(mut self) -> Self {
|
||||
self.style().flex_shrink = Some(0.);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the element to align flex items to the start of the container's cross axis.
|
||||
/// [Docs](https://tailwindcss.com/docs/align-items#start)
|
||||
fn items_start(mut self) -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue