Combine excerpt footer and header into a single block (#19441)
This simplifies rendering of excerpt headers and footers, and removes the need to store a `BlockDisposition` on these boundary blocks. It's a step toward implementing "replace blocks", which we want to use in the assistant panel. We've also cleaned up the way heights are specified for headers and footers and fixed some visual asymmetries between the "expand upward" and "expand downward" buttons. Release Notes: - N/A --------- Co-authored-by: Richard <richard@zed.dev>
This commit is contained in:
parent
3e0c5c10b7
commit
d209eab058
7 changed files with 401 additions and 553 deletions
|
@ -962,7 +962,6 @@ fn random_diagnostic(
|
|||
|
||||
const FILE_HEADER: &str = "file header";
|
||||
const EXCERPT_HEADER: &str = "excerpt header";
|
||||
const EXCERPT_FOOTER: &str = "excerpt footer";
|
||||
|
||||
fn editor_blocks(
|
||||
editor: &View<Editor>,
|
||||
|
@ -998,7 +997,7 @@ fn editor_blocks(
|
|||
.ok()?
|
||||
}
|
||||
|
||||
Block::ExcerptHeader {
|
||||
Block::ExcerptBoundary {
|
||||
starts_new_buffer, ..
|
||||
} => {
|
||||
if *starts_new_buffer {
|
||||
|
@ -1007,7 +1006,6 @@ fn editor_blocks(
|
|||
EXCERPT_HEADER.into()
|
||||
}
|
||||
}
|
||||
Block::ExcerptFooter { .. } => EXCERPT_FOOTER.into(),
|
||||
};
|
||||
|
||||
Some((row, name))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue