editor: Move blame popover from hover_tooltip
to editor prepaint (#29320)
WIP! In light of having more control over blame popover from editor. This fixes: https://github.com/zed-industries/zed/issues/28645, https://github.com/zed-industries/zed/issues/26304 - [x] Initial rendering - [x] Handle smart positioning (edge detection, etc) - [x] Delayed hovering, release, etc - [x] Test blame message selection - [x] Fix tagged issues Release Notes: - Git inline blame popover now dismisses when the cursor is moved, the editor is scrolled, or the command palette is opened.
This commit is contained in:
parent
87f85f1863
commit
d3911e34de
6 changed files with 501 additions and 83 deletions
|
@ -78,18 +78,19 @@ use futures::{
|
|||
};
|
||||
use fuzzy::StringMatchCandidate;
|
||||
|
||||
use ::git::Restore;
|
||||
use ::git::blame::BlameEntry;
|
||||
use ::git::{Restore, blame::ParsedCommitMessage};
|
||||
use code_context_menus::{
|
||||
AvailableCodeAction, CodeActionContents, CodeActionsItem, CodeActionsMenu, CodeContextMenu,
|
||||
CompletionsMenu, ContextMenuOrigin,
|
||||
};
|
||||
use git::blame::{GitBlame, GlobalBlameRenderer};
|
||||
use gpui::{
|
||||
Action, Animation, AnimationExt, AnyElement, AnyWeakEntity, App, AppContext,
|
||||
AsyncWindowContext, AvailableSpace, Background, Bounds, ClickEvent, ClipboardEntry,
|
||||
ClipboardItem, Context, DispatchPhase, Edges, Entity, EntityInputHandler, EventEmitter,
|
||||
FocusHandle, FocusOutEvent, Focusable, FontId, FontWeight, Global, HighlightStyle, Hsla,
|
||||
KeyContext, Modifiers, MouseButton, MouseDownEvent, PaintQuad, ParentElement, Pixels, Render,
|
||||
Action, Animation, AnimationExt, AnyElement, App, AppContext, AsyncWindowContext,
|
||||
AvailableSpace, Background, Bounds, ClickEvent, ClipboardEntry, ClipboardItem, Context,
|
||||
DispatchPhase, Edges, Entity, EntityInputHandler, EventEmitter, FocusHandle, FocusOutEvent,
|
||||
Focusable, FontId, FontWeight, Global, HighlightStyle, Hsla, KeyContext, Modifiers,
|
||||
MouseButton, MouseDownEvent, PaintQuad, ParentElement, Pixels, Render, ScrollHandle,
|
||||
SharedString, Size, Stateful, Styled, Subscription, Task, TextStyle, TextStyleRefinement,
|
||||
UTF16Selection, UnderlineStyle, UniformListScrollHandle, WeakEntity, WeakFocusHandle, Window,
|
||||
div, impl_actions, point, prelude::*, pulsating_between, px, relative, size,
|
||||
|
@ -117,6 +118,7 @@ use language::{
|
|||
};
|
||||
use language::{BufferRow, CharClassifier, Runnable, RunnableRange, point_to_lsp};
|
||||
use linked_editing_ranges::refresh_linked_ranges;
|
||||
use markdown::Markdown;
|
||||
use mouse_context_menu::MouseContextMenu;
|
||||
use persistence::DB;
|
||||
use project::{
|
||||
|
@ -798,6 +800,21 @@ impl ChangeList {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct InlineBlamePopoverState {
|
||||
scroll_handle: ScrollHandle,
|
||||
commit_message: Option<ParsedCommitMessage>,
|
||||
markdown: Entity<Markdown>,
|
||||
}
|
||||
|
||||
struct InlineBlamePopover {
|
||||
position: gpui::Point<Pixels>,
|
||||
show_task: Option<Task<()>>,
|
||||
hide_task: Option<Task<()>>,
|
||||
popover_bounds: Option<Bounds<Pixels>>,
|
||||
popover_state: InlineBlamePopoverState,
|
||||
}
|
||||
|
||||
/// Zed's primary implementation of text input, allowing users to edit a [`MultiBuffer`].
|
||||
///
|
||||
/// See the [module level documentation](self) for more information.
|
||||
|
@ -866,6 +883,7 @@ pub struct Editor {
|
|||
context_menu_options: Option<ContextMenuOptions>,
|
||||
mouse_context_menu: Option<MouseContextMenu>,
|
||||
completion_tasks: Vec<(CompletionId, Task<Option<()>>)>,
|
||||
inline_blame_popover: Option<InlineBlamePopover>,
|
||||
signature_help_state: SignatureHelpState,
|
||||
auto_signature_help: Option<bool>,
|
||||
find_all_references_task_sources: Vec<Anchor>,
|
||||
|
@ -922,7 +940,6 @@ pub struct Editor {
|
|||
show_git_blame_gutter: bool,
|
||||
show_git_blame_inline: bool,
|
||||
show_git_blame_inline_delay_task: Option<Task<()>>,
|
||||
pub git_blame_inline_tooltip: Option<AnyWeakEntity>,
|
||||
git_blame_inline_enabled: bool,
|
||||
render_diff_hunk_controls: RenderDiffHunkControlsFn,
|
||||
serialize_dirty_buffers: bool,
|
||||
|
@ -1665,6 +1682,7 @@ impl Editor {
|
|||
context_menu_options: None,
|
||||
mouse_context_menu: None,
|
||||
completion_tasks: Default::default(),
|
||||
inline_blame_popover: Default::default(),
|
||||
signature_help_state: SignatureHelpState::default(),
|
||||
auto_signature_help: None,
|
||||
find_all_references_task_sources: Vec::new(),
|
||||
|
@ -1730,7 +1748,6 @@ impl Editor {
|
|||
show_git_blame_inline: false,
|
||||
show_selection_menu: None,
|
||||
show_git_blame_inline_delay_task: None,
|
||||
git_blame_inline_tooltip: None,
|
||||
git_blame_inline_enabled: ProjectSettings::get_global(cx).git.inline_blame_enabled(),
|
||||
render_diff_hunk_controls: Arc::new(render_diff_hunk_controls),
|
||||
serialize_dirty_buffers: ProjectSettings::get_global(cx)
|
||||
|
@ -1806,6 +1823,7 @@ impl Editor {
|
|||
);
|
||||
});
|
||||
editor.hide_signature_help(cx, SignatureHelpHiddenBy::Escape);
|
||||
editor.inline_blame_popover.take();
|
||||
}
|
||||
}
|
||||
EditorEvent::Edited { .. } => {
|
||||
|
@ -2603,6 +2621,7 @@ impl Editor {
|
|||
self.update_visible_inline_completion(window, cx);
|
||||
self.edit_prediction_requires_modifier_in_indent_conflict = true;
|
||||
linked_editing_ranges::refresh_linked_ranges(self, window, cx);
|
||||
self.inline_blame_popover.take();
|
||||
if self.git_blame_inline_enabled {
|
||||
self.start_inline_blame_timer(window, cx);
|
||||
}
|
||||
|
@ -5483,6 +5502,82 @@ impl Editor {
|
|||
}
|
||||
}
|
||||
|
||||
fn show_blame_popover(
|
||||
&mut self,
|
||||
blame_entry: &BlameEntry,
|
||||
position: gpui::Point<Pixels>,
|
||||
cx: &mut Context<Self>,
|
||||
) {
|
||||
if let Some(state) = &mut self.inline_blame_popover {
|
||||
state.hide_task.take();
|
||||
cx.notify();
|
||||
} else {
|
||||
let delay = EditorSettings::get_global(cx).hover_popover_delay;
|
||||
let show_task = cx.spawn(async move |editor, cx| {
|
||||
cx.background_executor()
|
||||
.timer(std::time::Duration::from_millis(delay))
|
||||
.await;
|
||||
editor
|
||||
.update(cx, |editor, cx| {
|
||||
if let Some(state) = &mut editor.inline_blame_popover {
|
||||
state.show_task = None;
|
||||
cx.notify();
|
||||
}
|
||||
})
|
||||
.ok();
|
||||
});
|
||||
let Some(blame) = self.blame.as_ref() else {
|
||||
return;
|
||||
};
|
||||
let blame = blame.read(cx);
|
||||
let details = blame.details_for_entry(&blame_entry);
|
||||
let markdown = cx.new(|cx| {
|
||||
Markdown::new(
|
||||
details
|
||||
.as_ref()
|
||||
.map(|message| message.message.clone())
|
||||
.unwrap_or_default(),
|
||||
None,
|
||||
None,
|
||||
cx,
|
||||
)
|
||||
});
|
||||
self.inline_blame_popover = Some(InlineBlamePopover {
|
||||
position,
|
||||
show_task: Some(show_task),
|
||||
hide_task: None,
|
||||
popover_bounds: None,
|
||||
popover_state: InlineBlamePopoverState {
|
||||
scroll_handle: ScrollHandle::new(),
|
||||
commit_message: details,
|
||||
markdown,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
fn hide_blame_popover(&mut self, cx: &mut Context<Self>) {
|
||||
if let Some(state) = &mut self.inline_blame_popover {
|
||||
if state.show_task.is_some() {
|
||||
self.inline_blame_popover.take();
|
||||
cx.notify();
|
||||
} else {
|
||||
let hide_task = cx.spawn(async move |editor, cx| {
|
||||
cx.background_executor()
|
||||
.timer(std::time::Duration::from_millis(100))
|
||||
.await;
|
||||
editor
|
||||
.update(cx, |editor, cx| {
|
||||
editor.inline_blame_popover.take();
|
||||
cx.notify();
|
||||
})
|
||||
.ok();
|
||||
});
|
||||
state.hide_task = Some(hide_task);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn refresh_document_highlights(&mut self, cx: &mut Context<Self>) -> Option<()> {
|
||||
if self.pending_rename.is_some() {
|
||||
return None;
|
||||
|
@ -16657,12 +16752,7 @@ impl Editor {
|
|||
|
||||
pub fn render_git_blame_inline(&self, window: &Window, cx: &App) -> bool {
|
||||
self.show_git_blame_inline
|
||||
&& (self.focus_handle.is_focused(window)
|
||||
|| self
|
||||
.git_blame_inline_tooltip
|
||||
.as_ref()
|
||||
.and_then(|t| t.upgrade())
|
||||
.is_some())
|
||||
&& (self.focus_handle.is_focused(window) || self.inline_blame_popover.is_some())
|
||||
&& !self.newest_selection_head_on_empty_line(cx)
|
||||
&& self.has_blame_entries(cx)
|
||||
}
|
||||
|
|
|
@ -32,15 +32,19 @@ use client::ParticipantIndex;
|
|||
use collections::{BTreeMap, HashMap};
|
||||
use feature_flags::{Debugger, FeatureFlagAppExt};
|
||||
use file_icons::FileIcons;
|
||||
use git::{Oid, blame::BlameEntry, status::FileStatus};
|
||||
use git::{
|
||||
Oid,
|
||||
blame::{BlameEntry, ParsedCommitMessage},
|
||||
status::FileStatus,
|
||||
};
|
||||
use gpui::{
|
||||
Action, Along, AnyElement, App, AvailableSpace, Axis as ScrollbarAxis, BorderStyle, Bounds,
|
||||
ClickEvent, ContentMask, Context, Corner, Corners, CursorStyle, DispatchPhase, Edges, Element,
|
||||
ElementInputHandler, Entity, Focusable as _, FontId, GlobalElementId, Hitbox, Hsla,
|
||||
Action, Along, AnyElement, App, AppContext, AvailableSpace, Axis as ScrollbarAxis, BorderStyle,
|
||||
Bounds, ClickEvent, ContentMask, Context, Corner, Corners, CursorStyle, DispatchPhase, Edges,
|
||||
Element, ElementInputHandler, Entity, Focusable as _, FontId, GlobalElementId, Hitbox, Hsla,
|
||||
InteractiveElement, IntoElement, Keystroke, Length, ModifiersChangedEvent, MouseButton,
|
||||
MouseDownEvent, MouseMoveEvent, MouseUpEvent, PaintQuad, ParentElement, Pixels, ScrollDelta,
|
||||
ScrollWheelEvent, ShapedLine, SharedString, Size, StatefulInteractiveElement, Style, Styled,
|
||||
TextRun, TextStyleRefinement, WeakEntity, Window, anchored, deferred, div, fill,
|
||||
ScrollHandle, ScrollWheelEvent, ShapedLine, SharedString, Size, StatefulInteractiveElement,
|
||||
Style, Styled, TextRun, TextStyleRefinement, WeakEntity, Window, anchored, deferred, div, fill,
|
||||
linear_color_stop, linear_gradient, outline, point, px, quad, relative, size, solid_background,
|
||||
transparent_black,
|
||||
};
|
||||
|
@ -49,6 +53,7 @@ use language::language_settings::{
|
|||
IndentGuideBackgroundColoring, IndentGuideColoring, IndentGuideSettings, ShowWhitespaceSetting,
|
||||
};
|
||||
use lsp::DiagnosticSeverity;
|
||||
use markdown::Markdown;
|
||||
use multi_buffer::{
|
||||
Anchor, ExcerptId, ExcerptInfo, ExpandExcerptDirection, ExpandInfo, MultiBufferPoint,
|
||||
MultiBufferRow, RowInfo,
|
||||
|
@ -1749,6 +1754,7 @@ impl EditorElement {
|
|||
content_origin: gpui::Point<Pixels>,
|
||||
scroll_pixel_position: gpui::Point<Pixels>,
|
||||
line_height: Pixels,
|
||||
text_hitbox: &Hitbox,
|
||||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) -> Option<AnyElement> {
|
||||
|
@ -1780,21 +1786,13 @@ impl EditorElement {
|
|||
padding * em_width
|
||||
};
|
||||
|
||||
let workspace = editor.workspace()?.downgrade();
|
||||
let blame_entry = blame
|
||||
.update(cx, |blame, cx| {
|
||||
blame.blame_for_rows(&[*row_info], cx).next()
|
||||
})
|
||||
.flatten()?;
|
||||
|
||||
let mut element = render_inline_blame_entry(
|
||||
self.editor.clone(),
|
||||
workspace,
|
||||
&blame,
|
||||
blame_entry,
|
||||
&self.style,
|
||||
cx,
|
||||
)?;
|
||||
let mut element = render_inline_blame_entry(blame_entry.clone(), &self.style, cx)?;
|
||||
|
||||
let start_y = content_origin.y
|
||||
+ line_height * (display_row.as_f32() - scroll_pixel_position.y / line_height);
|
||||
|
@ -1820,11 +1818,122 @@ impl EditorElement {
|
|||
};
|
||||
|
||||
let absolute_offset = point(start_x, start_y);
|
||||
let size = element.layout_as_root(AvailableSpace::min_size(), window, cx);
|
||||
let bounds = Bounds::new(absolute_offset, size);
|
||||
|
||||
self.layout_blame_entry_popover(
|
||||
bounds,
|
||||
blame_entry,
|
||||
blame,
|
||||
line_height,
|
||||
text_hitbox,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
|
||||
element.prepaint_as_root(absolute_offset, AvailableSpace::min_size(), window, cx);
|
||||
|
||||
Some(element)
|
||||
}
|
||||
|
||||
fn layout_blame_entry_popover(
|
||||
&self,
|
||||
parent_bounds: Bounds<Pixels>,
|
||||
blame_entry: BlameEntry,
|
||||
blame: Entity<GitBlame>,
|
||||
line_height: Pixels,
|
||||
text_hitbox: &Hitbox,
|
||||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) {
|
||||
let mouse_position = window.mouse_position();
|
||||
let mouse_over_inline_blame = parent_bounds.contains(&mouse_position);
|
||||
let mouse_over_popover = self.editor.update(cx, |editor, _| {
|
||||
editor
|
||||
.inline_blame_popover
|
||||
.as_ref()
|
||||
.and_then(|state| state.popover_bounds)
|
||||
.map_or(false, |bounds| bounds.contains(&mouse_position))
|
||||
});
|
||||
|
||||
self.editor.update(cx, |editor, cx| {
|
||||
if mouse_over_inline_blame || mouse_over_popover {
|
||||
editor.show_blame_popover(&blame_entry, mouse_position, cx);
|
||||
} else {
|
||||
editor.hide_blame_popover(cx);
|
||||
}
|
||||
});
|
||||
|
||||
let should_draw = self.editor.update(cx, |editor, _| {
|
||||
editor
|
||||
.inline_blame_popover
|
||||
.as_ref()
|
||||
.map_or(false, |state| state.show_task.is_none())
|
||||
});
|
||||
|
||||
if should_draw {
|
||||
let maybe_element = self.editor.update(cx, |editor, cx| {
|
||||
editor
|
||||
.workspace()
|
||||
.map(|workspace| workspace.downgrade())
|
||||
.zip(
|
||||
editor
|
||||
.inline_blame_popover
|
||||
.as_ref()
|
||||
.map(|p| p.popover_state.clone()),
|
||||
)
|
||||
.and_then(|(workspace, popover_state)| {
|
||||
render_blame_entry_popover(
|
||||
blame_entry,
|
||||
popover_state.scroll_handle,
|
||||
popover_state.commit_message,
|
||||
popover_state.markdown,
|
||||
workspace,
|
||||
&blame,
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
})
|
||||
});
|
||||
|
||||
if let Some(mut element) = maybe_element {
|
||||
let size = element.layout_as_root(AvailableSpace::min_size(), window, cx);
|
||||
let origin = self.editor.update(cx, |editor, _| {
|
||||
let target_point = editor
|
||||
.inline_blame_popover
|
||||
.as_ref()
|
||||
.map_or(mouse_position, |state| state.position);
|
||||
|
||||
let overall_height = size.height + HOVER_POPOVER_GAP;
|
||||
let popover_origin = if target_point.y > overall_height {
|
||||
point(target_point.x, target_point.y - size.height)
|
||||
} else {
|
||||
point(
|
||||
target_point.x,
|
||||
target_point.y + line_height + HOVER_POPOVER_GAP,
|
||||
)
|
||||
};
|
||||
|
||||
let horizontal_offset = (text_hitbox.top_right().x
|
||||
- POPOVER_RIGHT_OFFSET
|
||||
- (popover_origin.x + size.width))
|
||||
.min(Pixels::ZERO);
|
||||
|
||||
point(popover_origin.x + horizontal_offset, popover_origin.y)
|
||||
});
|
||||
|
||||
let popover_bounds = Bounds::new(origin, size);
|
||||
self.editor.update(cx, |editor, _| {
|
||||
if let Some(state) = &mut editor.inline_blame_popover {
|
||||
state.popover_bounds = Some(popover_bounds);
|
||||
}
|
||||
});
|
||||
|
||||
window.defer_draw(element, origin, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn layout_blame_entries(
|
||||
&self,
|
||||
buffer_rows: &[RowInfo],
|
||||
|
@ -5851,24 +5960,35 @@ fn prepaint_gutter_button(
|
|||
}
|
||||
|
||||
fn render_inline_blame_entry(
|
||||
editor: Entity<Editor>,
|
||||
workspace: WeakEntity<Workspace>,
|
||||
blame: &Entity<GitBlame>,
|
||||
blame_entry: BlameEntry,
|
||||
style: &EditorStyle,
|
||||
cx: &mut App,
|
||||
) -> Option<AnyElement> {
|
||||
let renderer = cx.global::<GlobalBlameRenderer>().0.clone();
|
||||
renderer.render_inline_blame_entry(&style.text, blame_entry, cx)
|
||||
}
|
||||
|
||||
fn render_blame_entry_popover(
|
||||
blame_entry: BlameEntry,
|
||||
scroll_handle: ScrollHandle,
|
||||
commit_message: Option<ParsedCommitMessage>,
|
||||
markdown: Entity<Markdown>,
|
||||
workspace: WeakEntity<Workspace>,
|
||||
blame: &Entity<GitBlame>,
|
||||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) -> Option<AnyElement> {
|
||||
let renderer = cx.global::<GlobalBlameRenderer>().0.clone();
|
||||
let blame = blame.read(cx);
|
||||
let details = blame.details_for_entry(&blame_entry);
|
||||
let repository = blame.repository(cx)?.clone();
|
||||
renderer.render_inline_blame_entry(
|
||||
&style.text,
|
||||
renderer.render_blame_entry_popover(
|
||||
blame_entry,
|
||||
details,
|
||||
scroll_handle,
|
||||
commit_message,
|
||||
markdown,
|
||||
repository,
|
||||
workspace,
|
||||
editor,
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
}
|
||||
|
@ -7046,14 +7166,7 @@ impl Element for EditorElement {
|
|||
blame.blame_for_rows(&[row_infos], cx).next()
|
||||
})
|
||||
.flatten()?;
|
||||
let mut element = render_inline_blame_entry(
|
||||
self.editor.clone(),
|
||||
editor.workspace()?.downgrade(),
|
||||
blame,
|
||||
blame_entry,
|
||||
&style,
|
||||
cx,
|
||||
)?;
|
||||
let mut element = render_inline_blame_entry(blame_entry, &style, cx)?;
|
||||
let inline_blame_padding = INLINE_BLAME_PADDING_EM_WIDTHS * em_advance;
|
||||
Some(
|
||||
element
|
||||
|
@ -7262,6 +7375,7 @@ impl Element for EditorElement {
|
|||
content_origin,
|
||||
scroll_pixel_position,
|
||||
line_height,
|
||||
&text_hitbox,
|
||||
window,
|
||||
cx,
|
||||
);
|
||||
|
|
|
@ -7,10 +7,11 @@ use git::{
|
|||
parse_git_remote_url,
|
||||
};
|
||||
use gpui::{
|
||||
AnyElement, App, AppContext as _, Context, Entity, Hsla, Subscription, Task, TextStyle,
|
||||
WeakEntity, Window,
|
||||
AnyElement, App, AppContext as _, Context, Entity, Hsla, ScrollHandle, Subscription, Task,
|
||||
TextStyle, WeakEntity, Window,
|
||||
};
|
||||
use language::{Bias, Buffer, BufferSnapshot, Edit};
|
||||
use markdown::Markdown;
|
||||
use multi_buffer::RowInfo;
|
||||
use project::{
|
||||
Project, ProjectItem,
|
||||
|
@ -98,10 +99,18 @@ pub trait BlameRenderer {
|
|||
&self,
|
||||
_: &TextStyle,
|
||||
_: BlameEntry,
|
||||
_: &mut App,
|
||||
) -> Option<AnyElement>;
|
||||
|
||||
fn render_blame_entry_popover(
|
||||
&self,
|
||||
_: BlameEntry,
|
||||
_: ScrollHandle,
|
||||
_: Option<ParsedCommitMessage>,
|
||||
_: Entity<Markdown>,
|
||||
_: Entity<Repository>,
|
||||
_: WeakEntity<Workspace>,
|
||||
_: Entity<Editor>,
|
||||
_: &mut Window,
|
||||
_: &mut App,
|
||||
) -> Option<AnyElement>;
|
||||
|
||||
|
@ -139,10 +148,20 @@ impl BlameRenderer for () {
|
|||
&self,
|
||||
_: &TextStyle,
|
||||
_: BlameEntry,
|
||||
_: &mut App,
|
||||
) -> Option<AnyElement> {
|
||||
None
|
||||
}
|
||||
|
||||
fn render_blame_entry_popover(
|
||||
&self,
|
||||
_: BlameEntry,
|
||||
_: ScrollHandle,
|
||||
_: Option<ParsedCommitMessage>,
|
||||
_: Entity<Markdown>,
|
||||
_: Entity<Repository>,
|
||||
_: WeakEntity<Workspace>,
|
||||
_: Entity<Editor>,
|
||||
_: &mut Window,
|
||||
_: &mut App,
|
||||
) -> Option<AnyElement> {
|
||||
None
|
||||
|
|
|
@ -957,6 +957,7 @@ impl Item for Editor {
|
|||
cx.subscribe(&workspace, |editor, _, event: &workspace::Event, _cx| {
|
||||
if matches!(event, workspace::Event::ModalOpened) {
|
||||
editor.mouse_context_menu.take();
|
||||
editor.inline_blame_popover.take();
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue