Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve multibuffer excerpt affordances #22167

Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a252259
Add new tooltip type `with_meta_in`
danilo-leal Dec 17, 2024
6f434ed
Adjust the "Jump to Location" tooltip
danilo-leal Dec 17, 2024
941f1e6
Checkpoint: Mostly working, with bugs
danilo-leal Dec 17, 2024
40b8942
Start the work for the whole block dividing excerpts to be an expand …
danilo-leal Dec 18, 2024
4cfc789
Fix click event on expand area spilling out to the editor
danilo-leal Dec 18, 2024
edc06f5
Fix expand area tooltip flicker
danilo-leal Dec 18, 2024
c22fdfc
Make icon color change on hover
danilo-leal Dec 18, 2024
2896065
Show the "Jump to File" keybinding just on the header
danilo-leal Dec 18, 2024
ef1eb7b
Add divider lines to diagnostic excerpts, too
danilo-leal Dec 19, 2024
e75bc4f
Clean up: Remove comments and resolve warnings
danilo-leal Dec 19, 2024
8444654
Merge branch 'main' into multibuffer-excerpt-interaction-improvement
danilo-leal Dec 20, 2024
7a883a3
Checkpoint
SomeoneToIgnore Dec 23, 2024
329489d
Draft navigating into buffers using rows
SomeoneToIgnore Dec 23, 2024
41747ca
Fix navigation bugs
SomeoneToIgnore Dec 23, 2024
d7092e1
Rework line numbers' access during click handling
SomeoneToIgnore Dec 23, 2024
6cd1bdf
Underline hovered line in buffers
SomeoneToIgnore Dec 23, 2024
f5cc136
Fixes
SomeoneToIgnore Dec 23, 2024
1a331ff
Fix the tests
SomeoneToIgnore Dec 23, 2024
62bded6
Adjust line number hover styles
danilo-leal Dec 23, 2024
c92c00e
Merge branch 'main' into multibuffer-excerpt-interaction-improvement
danilo-leal Dec 24, 2024
37d0144
Merge branch 'main' into multibuffer-excerpt-interaction-improvement
danilo-leal Dec 26, 2024
e11f1b9
Clean up
danilo-leal Dec 26, 2024
77187a7
Checkpoint: Jump to file display based on focus
danilo-leal Dec 27, 2024
0c4627c
Fix is_selected for sticky buffer headers
agu-z Dec 27, 2024
d8cf46e
Merge pull request #1 from danilo-leal/display-jump-to-file-affordanc…
agu-z Dec 27, 2024
d36ea5d
Fix setting cursor position via click on multibuffers
agu-z Dec 27, 2024
6b37c19
Do not render hover state for singleton line numbers
agu-z Dec 27, 2024
a7d336f
Merge branch 'main' into multibuffer-excerpt-interaction-improvement
danilo-leal Dec 27, 2024
7d29b09
Fix clippy and formatting
agu-z Dec 27, 2024
6c19ee6
Show focused border styles only when it's folded
danilo-leal Dec 28, 2024
443affc
Merge branch 'main' into multibuffer-excerpt-interaction-improvement
danilo-leal Dec 29, 2024
1f4e07f
Merge branch 'main' into multibuffer-excerpt-interaction-improvement
danilo-leal Dec 29, 2024
3a60eca
Fix selection matching against folded buffers
agu-z Dec 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes
SomeoneToIgnore committed Dec 23, 2024

Verified

This commit was signed with the committer’s verified signature.
legendecas Chengzhong Wu
commit f5cc1368f439d2265425be0a5550cdfaf4f1b1fc
12 changes: 7 additions & 5 deletions crates/editor/src/element.rs
Original file line number Diff line number Diff line change
@@ -501,6 +501,7 @@ impl EditorElement {
)
}

#[allow(clippy::too_many_arguments)]
fn mouse_left_down(
editor: &mut Editor,
event: &MouseDownEvent,
@@ -602,7 +603,7 @@ impl EditorElement {
if hitbox.contains(&event.position) {
editor.open_excerpts_common(
Some(JumpData::MultiBufferRow(MultiBufferRow(multi_buffer_row))),
modifiers.alt == true,
modifiers.alt,
cx,
);
cx.stop_propagation();
@@ -7398,6 +7399,7 @@ mod tests {
use gpui::{TestAppContext, VisualTestContext};
use language::language_settings;
use log::info;
use similar::DiffableStr;
use std::num::NonZeroU32;
use util::test::sample_text;

@@ -7680,13 +7682,13 @@ mod tests {
EditorElement::new(&editor, style)
});
assert_eq!(state.position_map.line_layouts.len(), 4);
assert_eq!(state.line_numbers.len(), 1);
assert_eq!(
state
.line_numbers
.iter()
.map(Option::is_some)
.collect::<Vec<_>>(),
&[false, false, false, true]
.get(&MultiBufferRow(0))
.and_then(|(line, _)| line.text.as_str()),
Some("1")
);
}