editor: Make editor: expand excerpts actually expand all excerpts - #54717
Conversation
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Thank you, this is quite a stark change of the existing behavior, so let's not ship the PR in this form to avoid breaking someone's workflow for an issue with no upvotes.
- First of all, a very nice spot of the
zed/crates/editor/src/actions.rs
Line 195 in 5294e16
doc being wrong: let's instead document that it expands all excerpts with selections.
-
Is it so that other actions behave differently?
That seems wrong, but would love to get a comparison. -
If selecting all and expanding excerpts (on macOs that's
cmd-aand repeatedalt-enter) does not work as a solution still, let's add a standalone action to do what's intended.
That action could have a doc and tests similar to what's done in the PR.
ea3679e to
83b332b
Compare
The action only expands excerpts that overlap a selection, not every excerpt in the editor.
83b332b to
073bf63
Compare
|
@SomeoneToIgnore Thanks for the feedback, updated it to just change the doc comment, I tested Looking into other actions this seems like the correct and consistent name for the action, the name for the action as originally described would contain the word "All", like |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Amazing, thank you for the small fix!
|
Sorry this is still confusing. I'm the author of the original issue #54651 Expand all should expand all excerpts, not just the selected ones. The non-all version should expand all the selected ones. Which behaviour got chosen? |
|
@hyperknot right now there is no so right now the behavior is |
|
I see. Not having a full 2 pane view is the most painful part of Zed for me currently, coming from JetBrains. I actually keep JetBrains open only for this feature. Ideally it'd be a setting something like "git-diff-initial-view": expanded/collapsed |
|
Opened feature request here: |
…ed-industries#54717) Expand all excerpts had a doc comment describing it as expanding all excerpts, but in practice it only expanded the excerpt that was the most relevant. I fixed that to make it expand all excerpts. video: https://github.com/user-attachments/assets/9858ebda-199c-4f72-8a2f-3cd606b0eff4 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes zed-industries#54651 Release Notes: - editor: `expand excerpts` now has correct documentation explaining its function.
…ed-industries#54717) Expand all excerpts had a doc comment describing it as expanding all excerpts, but in practice it only expanded the excerpt that was the most relevant. I fixed that to make it expand all excerpts. video: https://github.com/user-attachments/assets/9858ebda-199c-4f72-8a2f-3cd606b0eff4 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes zed-industries#54651 Release Notes: - editor: `expand excerpts` now has correct documentation explaining its function.
…ed-industries#54717) Expand all excerpts had a doc comment describing it as expanding all excerpts, but in practice it only expanded the excerpt that was the most relevant. I fixed that to make it expand all excerpts. video: https://github.com/user-attachments/assets/9858ebda-199c-4f72-8a2f-3cd606b0eff4 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes zed-industries#54651 Release Notes: - editor: `expand excerpts` now has correct documentation explaining its function.
…ed-industries#54717) Expand all excerpts had a doc comment describing it as expanding all excerpts, but in practice it only expanded the excerpt that was the most relevant. I fixed that to make it expand all excerpts. video: https://github.com/user-attachments/assets/9858ebda-199c-4f72-8a2f-3cd606b0eff4 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes zed-industries#54651 Release Notes: - editor: `expand excerpts` now has correct documentation explaining its function.
Expand all excerpts had a doc comment describing it as expanding all excerpts, but in practice it only expanded the excerpt that was the most relevant.
I fixed that to make it expand all excerpts.
video:
Screen.Recording.2026-04-23.at.5.49.43.PM.mov
Self-Review Checklist:
Closes #54651
Release Notes:
expand excerptsnow has correct documentation explaining its function.