2 Commits

Author SHA1 Message Date
Marcos Paulo cac0276c51 chore(release): 0.7.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:41:38 -03:00
Marcos Paulo c5bd4c650d fix(ui): Enter, Escape and clicking away end a rename again
The project, library asset and version rename fields asked for focus every
frame before checking `lost_focus()`. In egui 0.36 `lost_focus()` reads the
focus as it is at the call, so taking it back first hid Enter, Escape and a
click elsewhere: the field could not be left. Focus is now taken back only
while the edit goes on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 19:12:05 -03:00
8 changed files with 15 additions and 5 deletions
Generated
+1 -1
View File
@@ -3128,7 +3128,7 @@ dependencies = [
[[package]]
name = "papercraft"
version = "0.7.0"
version = "0.7.1"
dependencies = [
"arboard",
"axum",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "papercraft"
version = "0.7.0"
version = "0.7.1"
edition = "2024"
rust-version = "1.95"
description = "A native infinite-canvas app for planning, working and sketching"
+4
View File
@@ -76,6 +76,10 @@ are credited in `THIRD_PARTY.md`.
* **Not carried over**: comments, design tokens, AI image generation, video export, teams;
moving layers between pages; remote image URLs (see README Known gaps).
### 2026-10-24: 0.7.1 (rename fix)
* Enter, Escape and clicking away end a rename again (projects on the home screen, library assets, versions). The fields took focus back before checking whether they had lost it.
### 2026-10-24: 0.7.0 (images, research, plugins, fewer tokens)
* Images in chat: paste from the clipboard (Cmd/Ctrl+V with an image-only clipboard now reaches the composer), thumbnails in the composer and in sent messages, a lightbox, image-only messages. Attachments are sent at most 1568 px (originals kept); `zoom_image` reads a region of the original.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 173 KiB

+4 -1
View File
@@ -579,13 +579,16 @@ fn project_card(ui: &mut Ui, hv: &mut HomeView, e: &Entry) {
.margin(crate::theme::INPUT_MARGIN)
.desired_width(CARD_W),
);
r.request_focus();
// Check before taking focus back: `lost_focus` reads the focus as it is now, so
// requesting it first would hide Enter, Escape and a click elsewhere.
if r.lost_focus() {
let (dir, name) = hv.renaming.take().unwrap();
if !ui.input(|i| i.key_pressed(egui::Key::Escape)) && name.trim() != e.manifest.name
{
hv.actions.push(HomeAction::Rename(dir, name));
}
} else {
r.request_focus();
}
} else {
ui.horizontal(|ui| {
+2 -1
View File
@@ -452,10 +452,11 @@ fn name_label(ui: &mut Ui, lib: &mut LibraryUi, key: &str, name: &str, w: f32) -
.margin(theme::INPUT_MARGIN)
.desired_width(w),
);
r.request_focus();
// Check before taking focus back (see `home::project_card`).
if r.lost_focus() {
return lib.renaming.take().map(|r| r.1);
}
r.request_focus();
return None;
}
ui.add(egui::Label::new(RichText::new(name).size(theme::SECONDARY)).truncate());
+3 -1
View File
@@ -215,12 +215,14 @@ fn versions_section(ui: &mut Ui, ed: &mut Editor, st: &mut UiState) {
.desired_width(f32::INFINITY)
.margin(theme::INPUT_MARGIN),
);
r.request_focus();
// Check before taking focus back (see `home::project_card`).
if r.lost_focus() {
if !ui.input(|i| i.key_pressed(egui::Key::Escape)) {
rename = Some((id.clone(), draft.clone()));
}
st.version_renaming = None;
} else {
r.request_focus();
}
continue;
}